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

Will it be possible to integrate SAM here? #597

Open
kudaibergenu opened this issue Apr 24, 2023 · 4 comments
Open

Will it be possible to integrate SAM here? #597

kudaibergenu opened this issue Apr 24, 2023 · 4 comments

Comments

@kudaibergenu
Copy link

COCO annotator is great!
Would it be possible to integrate a coco annotator tool here?

Best

@SixK
Copy link

SixK commented Apr 25, 2023

For SAM, I think you are talking about Segment Anything Model (SAM) from facebook.
https://github.com/facebookresearch/segment-anything
It would be clearly a good idea.
And it's probably not that difficult to adapt.

Note that SAM is already extracting segmented objects to coco format.
python scripts/amg.py --checkpoint <path/to/checkpoint> --model-type <model_type> --input <image_or_folder> --output <path/to/output>
So you can actually import json files generated by SAM

@SixK
Copy link

SixK commented Jun 1, 2023

Just published a Proof Of Concept to use SAM with coco-annotator here :
https://github.com/SixK/sam2coco_server

Follow the README.md to use it.
Note, that I thought SAM was identifying classes, but it seem's to only generate masks. The command line I provided in my previous message only extract masks images.

@SixK
Copy link

SixK commented Jun 7, 2023

Created a vue3 version of coco-annotator (still bogus, use it at your own risk), with SAM support added.
Difference with sam2coco_server that annotate everything in the picture, simply click SAM button then object you want to annotate and the mask will be created.
This version require a Cuda graphic card, you may try to force CPU if needed, but this is untested.
https://github.com/SixK/coco-annotator/tree/vue3+sam

Follow README instructions to build images

@SixK
Copy link

SixK commented Jun 16, 2023

Now use SAM-HQ in place of SAM:
https://github.com/SysCV/sam-hq

To test it in coco-annotator, use same link as previous post:
https://github.com/SixK/coco-annotator/tree/vue3+sam

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

2 participants