Hello, when running the example, I got an error:
(my platform is Win10 , python version : 3.11.4.final.0)
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from pygaze import PyGaze
2 import cv2
4 image = cv2.imread("jonas.jpg")
File ~\AppData\Roaming\Python\Python311\site-packages\pygaze_init_.py:1
----> 1 from .pygaze import PyGaze, PyGazeRenderer
2 from .gaze_estimator import GazeEstimator
File ~\AppData\Roaming\Python\Python311\site-packages\pygaze\pygaze.py:9
7 import numpy as np
8 from scipy.spatial.transform import Rotation
----> 9 from .utils import get_3d_face_model
10 from .gaze_estimator import GazeEstimator
11 from .common.camera import Camera
File ~\AppData\Roaming\Python\Python311\site-packages\pygaze\utils.py:12
9 import yaml
10 from omegaconf import DictConfig
---> 12 from .common.face_model import FaceModel
13 from .common.face_model_mediapipe import FaceModelMediaPipe
16 def get_3d_face_model(config: DictConfig) -> FaceModel:
File ~\AppData\Roaming\Python\Python311\site-packages\pygaze\common_init_.py:6
4 from .face_parts import FaceParts, FacePartsName
5 from .face_model import FaceModel
----> 6 from .face_model_mediapipe import FaceModelMediaPipe
File ~\AppData\Roaming\Python\Python311\site-packages\pygaze\common\face_model_mediapipe.py:8
3 import numpy as np
5 from .face_model import FaceModel
----> 8 @dataclasses.dataclass(frozen=True)
9 class FaceModelMediaPipe(FaceModel):
10 """3D face model for MediaPipe 468 points mark-up.
11
12 In the camera coordinate system, the X axis points to the right from
(...)
25 system rotated 180 degrees around the Y axis.
26 """
27 LANDMARKS: np.ndarray = np.array([
28 [0.0, 0.02279539, 0.01496097],
29 [0.0, 0.0, 0.0],
(...)
496 ],
497 dtype=np.float64)
File ~\anaconda3\Lib\dataclasses.py:1220, in dataclass..wrap(cls)
1219 def wrap(cls):
-> 1220 return _process_class(cls, init, repr, eq, order, unsafe_hash,
1221 frozen, match_args, kw_only, slots,
1222 weakref_slot)
File ~\anaconda3\Lib\dataclasses.py:958, in _process_class(cls, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots, weakref_slot)
955 kw_only = True
956 else:
957 # Otherwise it's a field of some type.
--> 958 cls_fields.append(_get_field(cls, name, type, kw_only))
960 for f in cls_fields:
961 fields[f.name] = f
File ~\anaconda3\Lib\dataclasses.py:815, in _get_field(cls, a_name, a_type, default_kw_only)
811 # For real fields, disallow mutable defaults. Use unhashable as a proxy
812 # indicator for mutability. Read the hash attribute from the class,
813 # not the instance.
814 if f._field_type is _FIELD and f.default.class.hash is None:
--> 815 raise ValueError(f'mutable default {type(f.default)} for field '
816 f'{f.name} is not allowed: use default_factory')
818 return f
ValueError: mutable default <class 'numpy.ndarray'> for field LANDMARKS is not allowed: use default_factory`
have solved this problem by the post https://stackoverflow.com/questions/74844262/how-can-i-solve-error-module-numpy-has-no-attribute-float-in-python