New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Object selection using Segment Anything #6625
Comments
Also found this WebGPU Implementation example. https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/segment-anything With WebGPU the speed is amazing, 1 second encoding for the base model (RTX3080). |
I think the Segment Anything + smoothing is a bad result for most of the people. The seleciton is smooth, but not precise. Also, I am afraid most of the people would not want to wait minutes to download 375 MB, they would rather use the lasso tool for two minutes. |
Yes, but let's not forget that they'd call the Magic Cut result worse. Also, I doubt that anyone would say that the Glove example with Segment Anything + Smoothing is bad. It is much more important to focus on the real-world examples of use cases I presented (hair, glove, face etc.) rather than the bear which was a stress test. Not every selection object is going to have hair. Regarding the download, the ONNX implementation I linked showcases a quantized model that is only 108MB in size, that isn't going to be minutes to download for most users, and internet is only going to get faster. Also, it is only a one time download as it can be cached in storage. |
I agree that Segment Anything would be a wonderful addition to the Photopea tool set. But I also understand what Ivan is concerned about with the 320MB download. Perhaps making the tool available with a pop-up window making the user aware of a one-time download of 320MB to make it work? IS it a one-time download? Or would that download have to happen every time it was used? If you could make something like that a one-time download, I think it would be great to have. |
It would be very cool if Photopea would have Object selection that is more comparable in performance to the one in Photoshop. Select subject is a good feature but lacks control, the user doesn't always want to select only the subject.
An approach that came to my mind is using the Segment Anything model locally in browser, there are two versions, mini (50mb) and base (300mb). Embedding of 1080p image on mini (AMD 5600X) takes 11 seconds. After an embedding is done, selection takes 0.1 seconds. On the base model embedding takes 6x longer.
Examples of local in-browser implementation:
The implementations above have selection that's worse quality than the official MetaAI showcase available here
The Meta showcase has amazing selection and is a great showcase of the models power.
I am a paying user and I use Photopea professionally and love it. I would gladly even pay credits for good object selection if local execution of the model wouldn't be suitable. Thank you for considering this.
Segment Anything uses the Apache 2.0 License.
The text was updated successfully, but these errors were encountered: