Skip to content

Fix false positives of face detection network for large faces#15118

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
dkurt:fix_15106
Jul 25, 2019
Merged

Fix false positives of face detection network for large faces#15118
opencv-pushbot merged 1 commit intoopencv:3.4from
dkurt:fix_15106

Conversation

@dkurt
Copy link
Copy Markdown
Member

@dkurt dkurt commented Jul 22, 2019

This pullrequest changes

resolves #15106 after PR #10216

Merge with extra: opencv/opencv_extra#644

before:
out

with changes:
out_correct

@dkurt
Copy link
Copy Markdown
Member Author

dkurt commented Jul 22, 2019

@alalek, perhaps, we will need to update opencv_face_detector.prototxt on CI. Or it's better to replace tests to use an origin deploy.prototxt?

@alalek
Copy link
Copy Markdown
Member

alalek commented Jul 22, 2019

Update file hash here too: https://github.com/opencv/opencv_extra/blob/3.4/testdata/dnn/download_models.py#L227-L229

And probably we need to change target branch to 3.4 in URL (I'll change that to master during 3.4 merging)

@alalek
Copy link
Copy Markdown
Member

alalek commented Jul 22, 2019

In case of breaking of existed tests - add and use updated file under a new name, like opencv_face_detector_20190722.prototxt.

@dkurt
Copy link
Copy Markdown
Member Author

dkurt commented Jul 22, 2019

@alalek, please let's wait for @lubagov feedback before merge.

@lubagov
Copy link
Copy Markdown

lubagov commented Jul 23, 2019

Red box, with original padding (pad: 0, on both), blu box, from this commit.

Frame_screenshot_23 07 2019

My opinion, Conv_9 * does not work at all, although Conv_8 * works. I think, if the resolution is less than 300x300, then the image needs to be scaled to 300x300. Or use protopxt, without the last one, or two SSD blocks. Depending on how much less resolution.

@dkurt
Copy link
Copy Markdown
Member Author

dkurt commented Jul 23, 2019

@lubagov, Thanks for quick response! May I ask you to share an origin image as well?

@lubagov
Copy link
Copy Markdown

lubagov commented Jul 23, 2019

Original image:
tstimg2

Here normal output with original padding:
OpenCV_screenshot_23 07 2019_1, face position [24, -4, 239, 301], face size 215x305,
and here work conv9_2_mbox_priorbox (min_size: 264.0, max_size: 315.0).

Here with suggest padding:
OpenCV_screenshot_23 07 2019_3, face position [59, 22, 166, 248], face size
107x226 it is only fit in conv8_2_mbox_priorbox (min_size: 213.0, max_size: 264.0)

@opencv-pushbot opencv-pushbot merged commit a212559 into opencv:3.4 Jul 25, 2019
opencv-pushbot pushed a commit that referenced this pull request Jul 25, 2019
@alalek alalek mentioned this pull request Jul 25, 2019
@lubagov
Copy link
Copy Markdown

lubagov commented Jul 27, 2019

Please check, train.prototxt file also. Because it also has wrong padding, and wrong train network.

@dkurt
Copy link
Copy Markdown
Member Author

dkurt commented Jul 27, 2019

@lubagov, Will be fixed by #14938. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants