Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time


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.


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


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


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


point style annotation

presssing p key, Annotationary will change the mode to point mode.
In this mode, annotation style is point and saved txt file is like (label, x_coord, y_coord).
this function is for our experimental use, of course not for proper YOLO model.
pressing r key, you can resume to regular rectangle mode.