I used it before and everything was working until suddenly after I ran the script, an error occurred just by importing face_alignment.
Traceback (most recent call last):
File "C:/Users/.../ForPython/facePoints.py", line 1, in <module>
import face_alignment
File "C:\ProgramData\Anaconda3\lib\site-packages\face_alignment\__init__.py", line 7, in <module>
from .api import FaceAlignment, LandmarksType, NetworkSize
File "C:\ProgramData\Anaconda3\lib\site-packages\face_alignment\api.py", line 31
def 3D(self):
^
SyntaxError: invalid syntax
the code at that place looks like that:
class LandmarksType(Enum):
"""Enum class defining the type of landmarks to detect.
``_2D`` - the detected points ``(x,y)`` are detected in a 2D space and follow the visible contour of the face
``_2halfD`` - this points represent the projection of the 3D points into 3D
``_3D`` - detect the points ``(x,y,z)``` in a 3D space
"""
_2D = 1
_2halfD = 2
_3D = 3
@property
def 3D(self): # error is here
class NetworkSize(Enum):
# TINY = 1
# SMALL = 2
# MEDIUM = 3
LARGE = 4
Should I change anything? or perhaps reinstall it differently if you see any specific issue?
I used it before and everything was working until suddenly after I ran the script, an error occurred just by importing face_alignment.
the code at that place looks like that:
Should I change anything? or perhaps reinstall it differently if you see any specific issue?