Skip to content
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

bad segmentation #119

Closed
nisanaryal-MTEG opened this issue Jun 29, 2023 · 12 comments
Closed

bad segmentation #119

nisanaryal-MTEG opened this issue Jun 29, 2023 · 12 comments

Comments

@nisanaryal-MTEG
Copy link

I just updated to 0.3.2 and there seems to be some issue. The segmentation mask is wrong for mobileSAM as well as Vit-b version.(gives almost all the images as output). I think this is due to some error during the latest update. Please review it.

@nisanaryal-MTEG
Copy link
Author

Previously, I had made a user version of SAM and it was working fine. I tried with that one and the following error occurred. I hope it will be helpful to find the bug.
image

@nisanaryal-MTEG
Copy link
Author

from pip, 0.2.24 is working fine, something went wrong in 0.3.0.

Hope this will be helpful.

@vietanhdev
Copy link
Owner

@nisanaryal-MTEG Thank you for testing out.
The models need to be exported by samexporter https://github.com/vietanhdev/samexporter. Previous models may not be compatible.
Have you downloaded new models using the UI?

@nisanaryal-MTEG
Copy link
Author

@vietanhdev I just selected the model from the option, the models are auto downloaded aren't they?. If not then the problem might be because of local downloaded file with the same name from previous version.

I created the onnx with my own code and matched the input and output after watching the documentation. I did not know that there was a separate repository for onnx, thanks for the hard work.

@nisanaryal-MTEG
Copy link
Author

image
I selected a model that I normally dont use and tested it, the error still exits.

image
The output comes as the whole image.

I am using windows and install/upgraded using PIP.

I think there is some problem.

@vietanhdev
Copy link
Owner

@nisanaryal-MTEG There is an issue here: Labeling UI is not blocked while downloading the model. Please wait until the message "Downloading http..." disappears.
I will fix this issue in the next version.

@vietanhdev
Copy link
Owner

For the MobileSAM, please note that it has been only trained on 1% of the SAM dataset. Maybe the generalization is not as good as the original models, causing bad results on special objects or domains (just my guess).

@nisanaryal-MTEG
Copy link
Author

@vietanhdev sorry for the confusion, the model downloaded properly last time, I just took the image to convey that I am using the latest version of model.

I converted MobileSAM to onnx with my code and tested on 0.2.24, it is working fine. All the models are giving wrong output from 0.3.0. The surgical image from previous comment was from vit-l.

I have not tried on another PC yet so this might be a local problem as well. I will get back to you after testing on another pc.

@vietanhdev
Copy link
Owner

Could you try following:

  • Delete $HOME/anylabeling_data and then reopen the program. The models will be downloaded from scratch.
  • Send me some images and results (0.2.24, 0.3.2) if possible. My email: [email protected].
    Thank you!

@ydzhang12345
Copy link

ydzhang12345 commented Jun 30, 2023

same here. Results are really bad for v0.3.2 (no matter where I prompt the image using whatever models). Using v0.2.24 is fine

@vietanhdev
Copy link
Owner

@nisanaryal-MTEG @ydzhang12345
Could you help me to test v0.3.3? https://github.com/vietanhdev/anylabeling/releases/tag/v0.3.3.
I fixed an issue when casting the mask value, but I don't know if it can fix your issue.
I still cannot reproduce the issue on my machine, so it's best if you can provide more details:

  • Your OS
  • Your images
  • Steps to get the wrong results. How is it different from the last version (0.2.x)
    Thank you very much!

@nisanaryal-MTEG
Copy link
Author

@vietanhdev the problem is solved in the v0.3.3. Thanks for the hard work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants