Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (54 sloc) 1.98 KB

Annotationary

tool for making YOLO annotation file

This is originally for our project of ml-based tracking.

You can draw and make YOLO annotation(label) files from your jpg image sequence.

screenshot

Getting Started


1. Prepare environment

At first, this code safely run at Windows.
Although this is python code, we do not recommend Linux and mac because they don't run this code properly.

And you need:

  • python3
  • tkinter
  • pillow
  • numpy

2. Prepare image sequence

image sequence must be jpg(jpeg) format.
And give each image numbered file name.

example a: image0000.jpg, image0001.jpg, image0002.jpg, image0003.jpg ...
example b: picture-3246.JPG, picture-3247.JPG, picture-3248.JPG, picture-3249.JPG ...

Any file name is ok if python's sort can resolve.


3. Prepare class list

Make 'classes.txt' for setup YOLO class you want to input.
Format is simple. if you set the class "car" and "track" and "people",

car
track
people

and save as "classes.txt" in "data" directory of this repositry.

Operation


0. select directory

You will be asked for image directory path, and annotation directory path to save (it can load, too!).
No JPG images in image directory, cause error.
You can run with directory "sample" and "labels" if you want see demo.


1. add annotation

Click at start point, and one more click at end point to draw annotation. then choose class. Esc key can quit drawing phase.


2. move annotation

Drag rectangle for move, drag circle on vertice to deform.


3. save annotation

Press floppy disk button to save annotations on current image as txt file.


4. right click menu

you can delete and change annotations from right click menu.
the change will not saved until you press save button again.


5. other button on above

magnifier -> zoom function
triangle -> browse function

You can’t perform that action at this time.