arvpUofA / video_labeler

Video tagging tool using KCF tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Video labeler

Video labeling software with KCF tracker.
Default In/Out Label Format: YOLO
yolo format: class, centerX, centerY, box width, box height (all in percentages of image size)
*Note: Labeler assumes that all images are the same size

Getting Started

Build

After downloading the repository, open the project in Qt Creator. Then apply the following configurations:

  1. cmake .
  2. make

Usage

./VideoLabeler path_to_images {class_number}

*Note: class_number must be a int and all classes must be continuous for combineLabels.py to work

Optional Usage

./VideoLabeler path_to_images {class_number} {secondary_class_number}

Labeling Data

If the output_file specified already contains ROIs, these will be loaded up into the labeler.

Drawing ROIs is done clicking and holding the LMB on the image. This is enabled after pressing w or r

r Will draw an ROI on the current frame and start tracking for following frames. If the following frames have ANY ROIs already set, those ROIs will be deleted.

w Will draw an ROI but the following frames will not track. This does not affect any other frames.

The following keys will stop the tracking until r is used again: w x b h

Recommended Controls

Key Action
y u Increase/Decrease up delay between frames
h j Go backwards/forwards one frame
r Reset (destructive marking). Draws ROI on frame and starts tracker for following frames
t Show/Hide info panel
Esc Finish labeling
Key Action (These actions also stops the tracker on the next frame)
h Go backwards
w Non-destructive marking. Draws ROI on frame but stops tracker
x Mark frame without object
b Move to beginning

Additional Controls

Key Action
space Pause/Play
z Save current ROIs to file

Combining and checking labels

To combine all class labels into an individual file

python combineLabels {image_directory} {num_of_classes}

Once all labels are combined you can check the bounding boxes using

python checkLabels {image_directory}

Choose option 0 to check labels, and remove any wrongly labeled files. Warning this will completely remove the image and it's associated labels. Removing labels (as well as the images) will prevent the labeller from working on the existing images

Generating train.txt file

python checkLabels {image_directory}

Choose option 1

Image generation

To generate images from a video, use ffmpeg sudo apt-get install ffmpeg:

Create directory to store images mkdir <image_folder_name>

Generate images from video at 5hz ffmpeg -i <video file> -r 5 <image_folder_name>/<image_folder_name>%05d.jpg

About

Video tagging tool using KCF tracker


Languages

Language:C++ 94.3%Language:Python 5.3%Language:CMake 0.4%