luoyetx / face-alignment-at-3000fps

C++ implementation of Face Alignment at 3000 FPS via Regressing Local Binary Features
BSD 3-Clause "New" or "Revised" License
197 stars 120 forks source link

SWAP of landmarks #3

Closed hemanthkorrapati closed 8 years ago

hemanthkorrapati commented 8 years ago

Hi

I see in the data_augmentation function of train.cpp, there is macro SWAP. I am worried that it destroys the data integrity. May I know why this is being done ?

Thank you

luoyetx commented 8 years ago

Hi, what the code do in data_augmentation function is just flip the face. When your flip a face, all landmarks will change their position to (1-x, y), and symmetrical landmarks also will change their meaning. For example, left eye center is turned to be right eye center. The data has all landmarks in an order, 5 landmarks for example, left eye center, right eye center, nose, left mouth corner, right mouth corner, then, we need to swap the symmetrical landmarks after changing their position.

Hope you get the idea of why we need SWAP. :-)

hemanthkorrapati commented 8 years ago

Hey, Thanks for the quick reply. I do get the idea now :)