Uses the Segment-Anything Model By Meta AI and adds a barebones interface to label images and saves the masks in the COCO format.
- Install Segment Anything on any machine with a GPU. (Need not be the labelling machine).
- Download a model checkpoint here.
- (Optional) Install coco-viewer to scroll through your annotations quickly.
Run ./setup.sh [DATA DIRECTORY]
in the root directory to pre-process the images and start labeling.
There are a few keybindings that make the annotation process fast:
- Click on the object using left clicks and right click (to indicate outside object boundary) (left click means the pixel is inside the object, and right click means it's outside)
n
adds predicted mask into your annotations. (Add button)r
rejects the predicted mask. (Reject button)a
andd
to cycle through images in your your set. (Next and Prev)l
andk
to increase and decrease the transparency of the other annotations.Ctrl + S
to save progress to the COCO-style annotations file.
- coco-viewer to view your annotations.
python cocoviewer.py -i <dataset> -a <dataset>/annotations.json