GilLevi / AgeGenderDeepLearning

628 stars 285 forks source link

Optimal image for detection #16

Closed Ravisik closed 6 years ago

Ravisik commented 7 years ago

Hello,

Thanks for all this work!

I have a question: what is the optimal image that should be sent in the neural network? I'm trying to use your network with videos. However, results seems to be very differents according to the image sent for detection.

What I've done:

1 - People detection + face detection 2 - Alignement 3 - We sent the aligned image to the neural network.

--> Do I have to sent only the face aligned? Or a larger cropped part of the image?

Moreover: it seems that the neural network will detect all the time if you send an image with a "black" border

Thanks a lot!

GilLevi commented 7 years ago

Hi,

Thank you for your interest in our work.

Indeed, you need to feed the aligned cropped faces.

Can you upload some examples?

Best, Gil

Ravisik commented 7 years ago

Hi Gil, Thanks a lot for your answer.

This is 2 examples:

test_1

Detected as Female 60/100 years

test_2

Detected as Male 60/100 years.

test_3

Detected as female 60/100 years

test_4

Detected as female 60/100 years.

All images are aligned. Again thanks a lot for your work, I just want to know if there is a way to improve the detection.

Another probable issues: -does the size of the input image matter?

Thanks a lot!

Ravisik commented 7 years ago

Additional info:

I read frames using openCV, do you think it can be a cause of the issue? Thanks

GilLevi commented 7 years ago

Hi,

The images are too large, you should feed only the cropped faces.

Best, Gil

Ravisik commented 7 years ago

Hi Gil,

Thanks for you response. It seems to work better that way.

However, for the age detection, I get "60/100 year" detection quasi all the time. Do you know what could cause this wrong detection?

Thanks again, Florian

GilLevi commented 7 years ago

On which images do you get that detection? can you upload some images?

Ravisik commented 7 years ago

Hi Gil,

This is an example of face detection + alignment:

test_5

(For the colour, the problem is simply openCV which reads files in BGR)

GilLevi commented 7 years ago

And you got 60/100 detection for that?

The detection and alignment looks good, keep in mind that the model is far from perfect.

Best, Gil

Ravisik commented 7 years ago

Yep!

thanks for your help :)

GilLevi commented 7 years ago

You welcome and thank you for your interest in our work.

Ravisik commented 7 years ago

Ha, I just found a stupid error (I think). I used opencv to read images, which us a 0 to 255 scale. Caffe.io seems to uses a 0 to 1 scale. Maybe that should explain a lot of errors. I will see what's going on

GilLevi commented 7 years ago

Great! let me know if that helps.

Ravisik commented 7 years ago

Gender detection is better (quasi perfect), however age detection seems still not really accurate!

Thanks a lot for your help!

GilLevi commented 7 years ago

You welcome and thanks again for using our models.