Inpaint-Anything
Inpaint-Anything copied to clipboard
The Gradio Web UI segment mask shows the last image not current image
It is an awesome segment project. I try your new web ui, but I see the wrong result in the web ui.
First I load the baseball image, I click the image and obtain the result. Then I reset the web ui and I load the dog image.When I click the dog image and click the predict mask using sam. The segment result is last image not the current image.
I haven't seen such bug on my side. Can you give more details about how to reimplement the bug? We plan to upgrade the web UI this week. You can also check it out later.
The main reason is that: the sam feature of a newly uploaded image is pre-computed before you click "Predict Masks Using SAM", which requires several seconds to finish; and if you click too fast, the local web ui will predict the masks using the sam feature of the previous image.
Now the bug is fixed :), you will get an error if you click very quickly, (don't forget to reset the web ui before uploading a new image).
Thanks for all your reply. I will read your code and study it deeply. @RysonFeng @geekyutao