训练时报错AttributeError: _2D;
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
报错原因:
face_alignment库1.4.0已经更新调用方法,没有_2D
修改:
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)
报错详情:
Traceback (most recent call last):
File "data_utils/process.py", line 393, in <module>
extract_landmarks(ori_imgs_dir)
File "data_utils/process.py", line 50, in extract_landmarks
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
File "/root/miniconda3/lib/python3.8/enum.py", line 384, in __getattr__
raise AttributeError(name) from None
AttributeError: _2D
1 条评论
感谢分享,谢谢