This project is developed using PyQt and is inspired by SAM, creating an automatic annotation system based on the concept of LabelImg.
Similar functionalities to LabelImg (although very basic).
- Right mouse on the object you're interested in.
- Left mouse to exclude the objects you're not interested in.
You can choose from three formats: YOLO
, Pascal VOC
and COCO
, the default is YOLO
.
Notice:
- If you choose the
COCO
format, it must be consistent from the beginning, otherwise, you will only obtain annotations for a single image.
You can place the annotations in the same directory as the images, and the labels file name must be same with image file name.
If it is in COCO
format, put annotations.json
in the directory.
Hotkey | Description |
---|---|
D | Next image |
A | Previous image |
Space | Automatically predict rectangle box |
del | Delete the selected rectangle box |
Ctrl + S | Save annotations |
↑→↓← | Move the selected rectangle box |
- PyQt5
- lxml
- Segment Anything
Name | Checkpoint |
---|---|
vit_h | ViT-H SAM model |
vit_l | ViT-L SAM model |
vit_b | ViT-B SAM model |
Then modify the name
and path
here:
self.sam = SA(model_name="vit_b", model_path="sam_vit_b_01ec64.pth")
- Your directory must include
classes.txt
and you can edit the classes on your own.dog person cat ...
- Run
python autoLabel.py