This tool based on OpenCV and CMake. Please install OpenCV and CMake first.
This tool helps me fill the area of positive samples in the picture. Therefore I could regard these picture as negative sample in training.
- Build this project first
mkdir build
cmake ..
make
- Run fillpos and input a path as argument
cd bin
./fillpos [the file path]
An example of description file:
Directory structure:
/img
img1.jpg
img2.jpg
data.txt
File data.txt:
img/img1.jpg 1 296 171 52 52
img/img2.jpg 2 100 200 50 50 50 30 25 25
Image img1.jpg contains single object instance with the following coordinates of bounding rectangle: (296, 171, 52, 52). Image img2.jpg contains two object instances.
- Output
Images will fill like this.