TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.96k stars 1.85k forks source link

The Value of the Corr is nan #484

Closed Cherry2410 closed 6 years ago

Cherry2410 commented 6 years ago

Hi, In the training of CEN, the value of the Corr turns into nan. The datasets of Helen and LFPW are used. I do not understand this phenomenon. Can you give some advice?

ghost commented 6 years ago

Hello. It should not turn into Nan if you are running the hyperparameters assigned in the training file. Can you tell us more about what is the value of MSE? Have you created the training data from the provided script?

ghost commented 6 years ago

A small thing to consider is using Arch4 from the architectures we have designed. That is the architecture we used for our released files.

Cherry2410 commented 6 years ago

@A2Zadeh, here are some training results. Landmark 8 Train on 1800225 samples, validate on 200070 samples Epoch 1/100

Can you give me some suggestions? thx.

Cherry2410 commented 6 years ago

From the results, it‘s overfitting. And the dataset of afw, Helen, ibug, lfpw, 300w are used.

ghost commented 6 years ago

Thanks @LingQiu. Is this on architecture 4?

Cherry2410 commented 6 years ago

@A2Zadeh, we tried the model of arch4 and model_half. Perhaps, every dataset should have its own characteristics.

ghost commented 6 years ago

@LingQiu if you are training on our data you may get nan values but you will recover from it if you continue the training. We basically do MSE optimization and use corr as a measure of visualization rather than direct optimization. Are you able to continue your training and see if corr recovers?

Cherry2410 commented 6 years ago

We have been training. The value of MSE is better. Although, the value of the corr can recover from nan, its value is very small. Is this normal?

ghost commented 6 years ago

@LingQiu depending on the landmark number, yes quite possible. Anything higher than 0 is good for some very hard landmarks such as markers around the face. They are hard to detect and disambiguate.

Cherry2410 commented 6 years ago

ok,thx.@A2Zadeh

MoreyLiu commented 6 years ago

hello,@LingQiu @A2Zadeh In my process of training cen, I also encountered the corr value of nan. My database is different from the author's (all near infrared images). My training parameters are: num_epochs 100 (generally more than 20 corr value is nan), minibatch_size is 512 and using arch4 architecture, how can I adjust the parameters, Can you give Any suggestions? When num_epochs increased to 200, the corr value recovered at about 120 times, but then increased to the end.