dougsouza / face-frontalization

This is a port of the Face Frontalization code provided by Hassner et al. at http://www.openu.ac.il/home/hassner/projects/frontalize
276 stars 113 forks source link

Black areas that appear on frontalized face images #8

Open xvbw opened 8 years ago

xvbw commented 8 years ago

When I perform Face Frontalization(by the way I used MATLAB code however I found black areas do appear in this Python code too. So I'm asking here) , I get following result.

screenshot from 2016-06-30 21 00 52

What drives me crazy is the black areas that appear in frontalized output.

I want to crop around the faces so that black areas disappear. I was actually thinking about cropping the frontalized image by manually setting ROI box to crop only around the face so that black areas will be gone. Does this makes sense?

When seeing the Adience3D.0.1.1.zip database provided in the author's webpage, it looks like the black areas are pretty much gone as shown below screenshot from 2016-06-30 21 02 34

The question is How do I deal with black areas that appear in frontalized image? I want to get only the frontalized face image without black blank pixels so that the face is fitted to the whole image just like an original input image shown above.

​That's all! Thanks

xvbw commented 8 years ago

Thanks! I've noticed you had a similar issue previously. Will try this and show the result

TalHassner commented 8 years ago

Hi Xvbw,

The frontalized images are extremely well aligned. This means that facial features appear in the frontalized view in nearly the exact same coordinates. A consequence of this is that you can decide on a crop region once -- on an ideal frontalized view -- and apply the same crop to all frontalized images.

Having said that, the "black areas" you refer to are regions outside the input image that get warped into the frontalized view. There is really nothing to be done about this other than crop, as I explaiend above.

I hope this helps,

Tal