ainrichman / Peppa-Facial-Landmark-PyTorch

Facial Landmark Detection based on PyTorch
Apache License 2.0
211 stars 56 forks source link

how to model custom data train? #15

Closed kimtaehyeong closed 3 years ago

kimtaehyeong commented 3 years ago

First, thank you for your good research. I have a few questions.

  1. There are two models, one for finding faces and one for finding landmarks. Is the method correct for finding a face, cropping this found face, and then finding a landmark?

  2. The face finding model seems to be using the model here 'https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB'. Is it correct? Also, is there a custom train method for learning landmarks?

Thank you.

ainrichman commented 3 years ago

First, thank you for your good research. I have a few questions.

  1. There are two models, one for finding faces and one for finding landmarks. Is the method correct for finding a face, cropping this found face, and then finding a landmark?
  2. The face finding model seems to be using the model here 'https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB'. Is it correct? Also, is there a custom train method for learning landmarks?

Thank you.

Hi Kim,

  1. Yes. The code in this repo firstly detects the face in the whole image. Secondly it crops the face from the image and inferring landmarks of the face.
  2. Yes, I mentioned the repo in README in Chinese :D. No straightforward custom training code. You could organize your own dataset following the instructions in README which help you generate train.json and val.json.
kimtaehyeong commented 3 years ago

Thank you so much for your reply. First, I am learning this part of'https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB', so I will try a custom train on the landmark as soon as the learning is finished. Thank you very much. If there is something that doesn't work, I will leave a question again.

kimtaehyeong commented 3 years ago

Hi. After face detection training is finished, we want to perform landmark detection. If it is not practical, I would like to fine tuning according to my data using a pre-trained model. Can you tell me how to do it?

Thank you.

kimtaehyeong commented 3 years ago

I have done fine-tuning with the model trained using torch.load. Do you have any code to convert .pth file to onnx file?

Thank you very much.

kimtaehyeong commented 3 years ago

Solved!! Thanks.