qpal147147 / AutoLabel

Automatic annotation system based on SAM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoLabel

This project is developed using PyQt and is inspired by SAM, creating an automatic annotation system based on the concept of LabelImg.

Features

Similar functionalities to LabelImg (although very basic).

Annotate the rect box

Annotate

Automated annotations with SAM

  1. Right mouse on the object you're interested in.

Automated annotations

Automated annotations

  1. Left mouse to exclude the objects you're not interested in.

Automated annotations

Saving

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.

Visualization

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. Visualization

Hotkeys

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

Environment

Model

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")

Usage

  1. Your directory must include classes.txt and you can edit the classes on your own.
    dog
    person
    cat
    ...
  2. Run
    python autoLabel.py

Reference

About

Automatic annotation system based on SAM

License:MIT License


Languages

Language:Python 100.0%