A tool for creating face detection ground-truth either from pre-cropped dataset or manually cropping.
- C++11
- boost 1.58 (on linux:
libboost-all-dev
) - OpenCV 3.2
./facecrop [-f] [-d] <FILE_OR_DIRECTORY> -g <GT_FILE>
-f filename
, only one file will be processed-d directory
, all files indirectory
will be processed-g gt_file
, tsv file withfile_name
,x
,y
,width
,height
- Corner: Mouse click will set the top-left corner and move the rectangle
- Douple corner: Mouse click will first define the top-left corner and then the bottom-right one
- Rectangle will be created only after the second click
- After cropping, hitting
RET
, the image will be moved todone
and the cropped part tocropped
- If skipped, hitting
ESC
, the image will be cropped later, being moved tolater
- If no face is present, hitting
SPACE
will move the image tono-face
Crop Preview
window shows a crop preview
- Left click and drag anywhere in the image to move the crop rectangle
- Right click anywhere in the image to move the crop rectangle to the clicked position
- q - quits the program
- RET - crop the image like shown in the
Crop Preview
window - ESC - skips the image (move to
later
) - Arrows - move the rectangle
moveUnit
pixels - 1, 2, 3 ... 0 - changes the
moveUnit
to 1, 5, 15 ... 500, 1000 pixels per move - z - alternates between
Normal Mode
andSplit Crop Mode
- SPC - move image to
no-face
- i - invert colors (only displayed image, not the cropped result)