Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some question about pre-processing #2

Open
HeGaoYuan opened this issue May 13, 2016 · 6 comments
Open

some question about pre-processing #2

HeGaoYuan opened this issue May 13, 2016 · 6 comments

Comments

@HeGaoYuan
Copy link

HeGaoYuan commented May 13, 2016

Hi,
In your PreProcessing folder, in the mapAll2FER.m file, https://github.com/saebrahimi/Emotion-Recognition-RNN/blob/master/PreProcessing/mapAll2FER.m#L18
you comment

%add border of 32 for TFD which results in 160 image size

but actually you add 48 to the pavg

@saebrahimi
Copy link
Owner

I updated the comments. If you map TFD to FER you can use smaller border.
I did this since some datasets are cropped tighter and pooling them resulted in lower performance without aligning faces.
The last block of code for verification should roughly show faces matching the mean shape.

@HeGaoYuan
Copy link
Author

Thank you for your reply!
I have some confusion that why didn't you just align every face picture to one confirmed facial keypoints position? Because when I follow your method using the mean shape of the dataset. I found that in the verification code, the face is hard to match the mean shape. Or maybe about the roughly, we understand it differently.

Here is my example using your method.
2016-05-17 8 08 28

@saebrahimi
Copy link
Owner

If your dataset is different from Emotiw15 or FER, you need to run a keypoint detector such as the one I referred to here: https://github.com/saebrahimi/Emotion-Recognition-RNN/tree/master/PreProcessing
If your dataset is cropped tighter than FER then you need to add a border to roughly have same location for face (the line you initially asked about).

Why mean shape:

  • you don't need perfect alignment for CNNs but we found that an approximate alignment as done here helps with limited dataset size.
  • it helps if keypoint detector fails on part of your dataset and you don't need to detect them at test time as you have a fixed transformation pre-computed on train set.
  • a simple work around is to hand-label a small subset of your training data and average the keypoint's location and use it as mean-shape of your dataset. (we only map mean-shape to mean-shape to merge different datasets, if you have only one dataset you can skip this step)

@HeGaoYuan
Copy link
Author

Your reply is very helpful!
Thank you so much!

@HeGaoYuan HeGaoYuan reopened this May 30, 2016
@HeGaoYuan
Copy link
Author

Sorry that reopen the issue.
You uploaded the comments,

add border of 48 for EMOTIW( 32 is enough for TFD which results in 160 image size)

Firstly, is the size of TFD images 96*96?

I know that you said

If your dataset is cropped tighter than FER then you need to add a border to roughly have same location for face

I think this is reason why we add a border, but how do we decided the size of the added border?
You use 48 for EMOTIW and 32 for TFD. Do you decide it by experiment?

Thank you!

@supercaizehua
Copy link

@HeGaoYuan 你好!我最近也在研究这个项目,但是由于他给的readme太简陋了,我又是新手不太会,能不能麻烦您说一下,跑代码的流程,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants