ZhenglinZhou / STAR

[CVPR 2023] STAR Loss: Reducing Semantic Ambiguity in Facial Landmark Detection
157 stars 17 forks source link

train on new dataset #22

Closed yangli-lab closed 10 months ago

yangli-lab commented 10 months ago

Thanks for your excellent work. I want to train the STAR model on my own dataset, could give some advice on how to prepare the training data. Can I finetune the model on my own dataset, with only the face images and corresponding landmarks. I see that in your code, only images and landmarks are the datas used to train the STAR model. image

ZhenglinZhou commented 10 months ago

Hi @yangli-lab, thanks for your interest!

The input params for preprocess function are img, landmarks_target, scale, center_w, center_h (see here, landmarks_5pts is not used in our exp).

The scale, center_w and center_h are associated with the detected face box and could be calculated as below:

Therefore, I suggest to first use a face detector to preprocess your own face images, and calculate the needed params. Then you could organize them in a tsv format (like this) or rewrite the AlignmentDataset.

yangli-lab commented 10 months ago

sorry for the late reply, thanks for your answer. I've made it.

ZhenglinZhou commented 10 months ago

That's great! If you have any further questions, feel free to reopen this issue.