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

Automation of annotation #602

Open
carmenrt opened this issue May 31, 2023 · 5 comments
Open

Automation of annotation #602

carmenrt opened this issue May 31, 2023 · 5 comments

Comments

@carmenrt
Copy link

Can the annotation of a set of microscope images be automated to speed up the process?

@SixK
Copy link

SixK commented Jun 1, 2023

If you already have a model that can find "things" you want to annotate, you can use a tool like "https://github.com/ozayr/detection-assisted-annotation-tool" that will generate coco yaml files of things detected.
Coco-annotator will let you to import generated files.
If you need to annotate manually, you can use integrated DEXTR model/tool, Maskrcnn model/tool or Magic Wand integrated tool to help to generate mask, but depending on image complexity, it may be faster to manually create mask.
Note that in forks you will be able to find other model/backend support (for exemple detectron2)

Also, I just published a SAM (Segment Anything) mask generator server here to use with coco-annotator:
https://github.com/SixK/sam2coco_server

But it's actually a basic Proof Of Concept, and you may have to modify it to fit your needs.

@carmenrt
Copy link
Author

carmenrt commented Jun 1, 2023

I have microscopy images. I want to select each cell with differents IDs but with the same category. Can you explain me how I can use Magic Wand Tool in this case?

Thank you!

@SixK
Copy link

SixK commented Jun 1, 2023

Magic Wand work by floodfill (selection propagate to near colors around), you have create a new annotation (+ button on category) for each cell you want to label. It require a neat color change to stop selection properly. If not, you will have to finish selection by hand using brush, eraser, or polygon tool.

Once you have selected your new annotation.
click on magic wand tool.
click once and it will fill space or stay mouse button down and move your mouse if selection is not complete.
if you want to remove parts of selection, you can press Shift key while you click.
You can also click several times on Undo button to cancel latests selections

For better selection with Magic Wand, you will have to adjust Threshold and Blur in Magic Wand Panel (where you find Magic Wand under categories panel at right...).

So, it's Magic, but this tool have it's limitations and may not work fine in all cases

@carmenrt
Copy link
Author

Are there any video tutorials available on this tool?

@SixK
Copy link

SixK commented Jun 21, 2023

For Magic Wand tool, you can have a look at coco-annotator videos on Youtube (not sure any video explain this tool):
https://www.youtube.com/results?search_query=coco-annotator

For Segment Anything (SAM) you can have a look at this demo (There an example on microscope image):
https://segment-anything.com/demo

And if you want to try SAM in coco-annotator, I released a Vue3 port with integrated SAM (SAM-HQ in fact actually).
But you will have to build docker images (require probably at least 18Go space), and this version has few bugs (wrong id on masks if an annotation is not selected, javascript error when playing with keypoints).
Also, Generated coco annotations file are not verified yet
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