However, image is defined outside of the face loop, so when multiple detections are made which overlap with the ground truth, I believe the image will effectively be over-cropped.
This could be resolved by cloning the image and ground_truth_shape in the loop:
In
Utils.cpp
line 296 you calladjustImage
when looping over face detections within an image which overlap with a face detection:However,
image
is defined outside of the face loop, so when multiple detections are made which overlap with the ground truth, I believe the image will effectively be over-cropped.This could be resolved by cloning the image and ground_truth_shape in the loop:
Furthermore, in the
adjustImage
function, you have the lines:Followed later by:
Should the first two lines not read
max(0.0, ...
?Perhaps I'm missing something, but let me know if you agree there are errors here as happy to issue a PR.