跑DECA时由于face-alignment模块更新遇到的bug

Traceback (most recent call last): File "/content/DECA/demos/demo_reconstruct.py", line 131, in main(parser.parse_args()) File "/content/DECA/demos/demo_reconstruct.py", line 40, in main testdata = datasets.TestData(args.inputpath, iscrop=args.iscrop, face_detector=args.detector, sample_step=args.sample_step) File "/content/DECA/decalib/datasets/datasets.py", line 71, in __init__ self.face_detector = detectors.FAN() File "/content/DECA/decalib/datasets/detectors.py", line 22, in __init__ self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False) File "/usr/lib/python3.10/enum.py", line 437, in __getattr__ raise AttributeError(name) from None AttributeError: _2D

这个错误是因为使用了一个不再支持的枚举类型。在我的代码中,使用的是face_alignment.LandmarksType._2D,但是在较新的版本中,_2D已经被移除了。通过查看face_alignment的官方文档,发现只要把_2D改为Two_D就可以了。

 

你可能感兴趣的:(bug,python,计算机视觉)