minivision-ai / photo2cartoon

人像卡通化探索项目 (photo-to-cartoon translation project)
MIT License
3.93k stars 765 forks source link

error : raise AttributeError(name) from None #79

Open themass opened 4 months ago

themass commented 4 months ago

save_path ~/Downloads/test.jpg Traceback (most recent call last): File "/Users/liguoqing/work/photo2cartoon/test.py", line 59, in c2p = Photo2Cartoon() ^^^^^^^^^^^^^^^ File "/Users/liguoqing/work/photo2cartoon/test.py", line 19, in init self.pre = Preprocess() ^^^^^^^^^^^^ File "/Users/liguoqing/work/photo2cartoon/utils/preprocess.py", line 8, in init self.detect = FaceDetect(device, detector) # device = 'cpu' or 'cuda', detector = 'dlib' or 'sfd' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/liguoqing/work/photo2cartoon/utils/face_detect.py", line 10, in init self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device, face_detector=detector) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/liguoqing/.pyenv/versions/3.11.7/lib/python3.11/enum.py", line 784, in getattr raise AttributeError(name) from None AttributeError: _2D

colorfulandcjy0806 commented 3 months ago

It is possible to change _2D to TWO_D, which is effective in my environment.