yfeng95/DECA

Unknown error when performing the demo reconstruction

AlbertBaichenDu opened this issue · 5 comments

Traceback (most recent call last):
File "C:\Users\alber\DECA\demos\demo_reconstruct.py", line 133, in
main(parser.parse_args())
File "C:\Users\alber\DECA\demos\demo_reconstruct.py", line 42, in main
testdata = datasets.TestData(args.inputpath, iscrop=args.iscrop, face_detector=args.detector, sample_step=args.sample_step)
File "C:\Users\alber\DECA\decalib\datasets\datasets.py", line 71, in init
self.face_detector = detectors.FAN()
File "C:\Users\alber\DECA\decalib\datasets\detectors.py", line 22, in init
self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
File "C:\Users\alber\miniconda3\lib\enum.py", line 437, in getattr
raise AttributeError(name) from None
AttributeError: _2D

Same issue. Don't know what to do

pip install --upgrade face-alignment==1.2.0 fixed it for me

I solved by installing face-alignment==1.3.4
It seems that _2D is removed or replaced in face-alignment>1.3.4?
I created a PR for this #186

Pchdm commented

rewrite the code “self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)” to “self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)” in DECA\decalib\datasets\detectors.py line 22.

Thank you very much guys. Both solutions worked for me :-)