YOLO-style annotation tool for preparing dataset of a new object from videos directly
This program can be used to prepare/ annotate new class in
- Record videos of the object to be annotated. For instance, we will annotate oranges fromt the sample video.
- Make an empty directory to save annotation results. For instance,
dataset
in this case. - Compile the program using following command:
g++ annotate.cpp -o main `pkg-config --cflags --libs opencv` - After successfully compiling the program, run the following command to start annotation process.
./main video_path output_folder
In this case,./main ./oranges.mp4 ./dataset/
- This will open a frame window where you can select the objects using mouse.
- Once all the objects of defined class are selected in the image, double press 's' to confirm the selections to be saved.
- This will generate the YOLO-style annotation files for the object from the video.
The annotated files will be saved like this in the output folder