coco-annotator icon indicating copy to clipboard operation
coco-annotator copied to clipboard

Automation of annotation

Open carmenrt opened this issue 2 years ago • 5 comments

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

carmenrt avatar May 31 '23 11:05 carmenrt

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.

SixK avatar Jun 01 '23 08:06 SixK

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!

carmenrt avatar Jun 01 '23 13:06 carmenrt

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

SixK avatar Jun 01 '23 15:06 SixK

Are there any video tutorials available on this tool?

carmenrt avatar Jun 18 '23 23:06 carmenrt

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

SixK avatar Jun 21 '23 23:06 SixK