Use Yolo_mark to mark bounding boxes for training ovml networks.
Credit: this repo is a clone of Yolo_mark, modified/preconfigured for ovml
training.
-
Compile the executable (see below)
-
Assemble your collection of images, which are usually frame grabs from video files. You can use e.g.
ovideo::ov_video_frame
for this if you have video files locally, or https://www.youtubescreenshot.com/ to extract frames from YouTube videos -
Put your
.jpg
images into thedata/img
directory -
Run
./mark_ovml.sh
(Linux) ormark_ovml.cmd
(Windows). You might find it useful to make the bounding box lines thinner (cycle through line widths by pressingw
) and hide the object names (k
). See below for further key controls or pressh
-
Send us the contents of the
data/img
directory (the image files and their bounding box.txt
annotation files)
-
Images should generally have all or most of the court in view. For ball detections, the minimum image size (video resolution) should be 1280 x 720
-
Try and collect images with varying ball colouration, lighting, court surrounds, and backgrounds
-
Avoid images with blurry balls (mild blurring is OK), or balls that are more than about 20% occluded by other objects (player bodies, net posts, etc)
-
Mark all target objects in an image. If you are marking balls, don't just mark the ball in play. All other balls in view must also be marked. You might want to avoid images with ball trolleys full of balls, or balls all over the court during warmup for this reason
-
The bounding box should be tight around the object but include all of it
-
To compile on Windows open
yolo_mark.sln
in MSVS2013/2015, compile it x64 & Release. Change paths inyolo_mark.sln
to the OpenCV 2.x/3.x installed on your computer:-
(right click on project) -> properties -> C/C++ -> General -> Additional Include Directories:
C:\opencv_3.0\opencv\build\include;
-
(right click on project) -> properties -> Linker -> General -> Additional Library Directories:
C:\opencv_3.0\opencv\build\x64\vc14\lib;
-
-
To compile on Linux:
cmake . make
Button | Description |
---|---|
Left | Draw box |
Right | Move box |
Shortcut | Description |
---|---|
→ | Next image |
← | Previous image |
r | Delete selected box (mouse hovered) |
c | Clear all marks on the current image |
p | Copy previous mark |
o | Track objects |
ESC | Close application |
n | One object per image |
0-9 | Object id |
m | Show coords |
w | Line width |
k | Hide object name |
h | Help |