ZhenglinZhou / STAR

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

train on new dataset #22

Closed yangli-lab closed 1 year ago

yangli-lab commented 1 year 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 1 year 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 1 year ago

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

ZhenglinZhou commented 1 year ago

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