TencentARC / GFPGAN

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
Other
35.86k stars 5.94k forks source link

如何生成自己数据的landmark文件? #91

Open alexliyang opened 3 years ago

alexliyang commented 3 years ago

FFHQ_eye_mouth_landmarks_512.pth 这个是FFHQ的数据集的landmark,如果要训练自己的数据集,这个如何生成?比如用CeleBA 数据集

jorjiang commented 3 years ago

你可以在inference的代码里找找 里面肯定有提取提取输入图片的landmark的部分 我之前看到过 具体不愿找了。反正是用到了facexlib这个库里的函数

onefish51 commented 2 years ago

I found it on scripts/parse_landmark.py

but the face_landmarks from ffhq-dataset-v2.json, so you need to get face_landmarks by dlib for your datasets

BrotherQi commented 2 years ago

您找到方法了吗

onefish51 commented 2 years ago

you can make it by dlib or face_alignment

BrotherQi commented 2 years ago

firstly thanks for your reply, my error is AttributeError: 'GFPGANModel' object has no attribute 'loc_left_eyes' but i dont see the same key 'loc_left_eyes' in scripts/parse_landmark.py can you explain it in detail