face-frontalization icon indicating copy to clipboard operation
face-frontalization copied to clipboard

wrong results for large images

Open leoneckert opened this issue 9 years ago • 8 comments

Hello, do you have an idea why I am getting so very different results for the same image depending on its dimensions? If it is too big the program doesn't seem to be doing the right thing after detecting the facial landmarks. Any help would be very much appreciated, I'll attach screenshots of two versions of the same image. Thanks! Here the large version: screenshot from 2016-06-20 14 53 11 copy And the small one: screenshot from 2016-06-20 14 54 49 copy

leoneckert avatar Jun 20 '16 13:06 leoneckert

Hi @leoneckert,

Yes, this is known issue, and was already discussed here #5. We still don't have a fix for that rather than resizing the input to a smaller dimension.

Cheers.

Doug

dougsouza avatar Jun 23 '16 19:06 dougsouza

Okay, thanks for coming back to me! I thought maybe a solution has been found already.

Is the problem maybe the 3D model that's being used? Feels like the model has those particular dimensions and trying to "wrap" something larger around it, results get crazy... Just a feeling, have been digging into the code, but couldn't rhyme together any other explanation to the problem :)

Anyhow, thanks again

leoneckert avatar Jun 24 '16 09:06 leoneckert

Hi @dougsouza,

Any update on the problem with large images? Any clue where we can search for a bug when debugging?

Best, Michal

mwlodarczyk avatar Aug 16 '16 10:08 mwlodarczyk

@mwlodarczyk,

To be honest, I haven't worked on this project lately. Regarding the issue: I think the problem may be related to size of the 3D model and the reference image that are used to calibrate the camera. I think that part is a good place to start debugging.

Cheers,

Doug

dougsouza avatar Aug 26 '16 17:08 dougsouza

@mwlodarczyk,

I'm also uncertain why this happens. There really shouldn't be any reason for this, especially if you're not using symmetry (which is the only part I believe depends on the size of the input image). I may be wrong and it has been some time since I looked at the code.

I wonder, however, why you don't simply rescale the input image to a size that works, as a simple solution.

If this leads to problems with landmark detection (i.e., you need the high resolution to detect the landmarks) you can simply detect the landmarks on the high rez image, then rescale it AND the landmark coordinates.

Did you try something like this?

Tal

TalHassner avatar Aug 30 '16 19:08 TalHassner

@TalHassner,

Once I resized the image, the code works fine. However, I want to try using this face frontalization for biometrics recognition purposes. Therefore, I want to have high quality image to get the best possible results. When resizing, the obtained image quality is not good enough for my purposes.

Currently, I am busy with some other issues. I will get back to this code around the middle of September. I will let you know if I find anything interesting.

Best, Michal

mwlodarczyk avatar Aug 31 '16 07:08 mwlodarczyk

Anyone know which dimension should a face have to work okay?

Best regards

oxydron avatar Oct 04 '16 12:10 oxydron

Some tests suggests that if the face height belongs to [150,220] interval pixels, the algorithm works just fine. While we no fix is made, I suggest to resize faces proportionally with height in this interval.

Best regards

oxydron avatar Oct 04 '16 17:10 oxydron