You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loading ...
from EmotionDetector: weights loaded
type q for exit
Traceback (most recent call last):
File "/home/sheikhartin/w/.tmp/facelib_demo.py", line 15, in <module>
detector.run()
File "/home/sheikhartin/.local/lib/python3.10/site-packages/facelib/FacialExpression/from_camera.py", line 27, in run
special_draw(frame, b, landmarks[i], name=emotions[i], score=emo_probs[i])
File "/home/sheikhartin/.local/lib/python3.10/site-packages/facelib/InsightFace/models/utils.py", line 117, in special_draw
cv2.rectangle(img, c1, c2, color, thickness=tl)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
> - argument for rectangle() given by name ('thickness') and position (4)
> - argument for rectangle() given by name ('thickness') and position (4)
The text was updated successfully, but these errors were encountered:
It's a late response, but maybe can help future readers.
This is due to OpenCV version. With OpenCV > 4.X.X coordinate argument for function cv.rectangle must be tuple of integer. So in utils.py enclose them in int(). For example in line 115 it becomes:
I wanted to try FaceLib with the emotion detector from my webcam, but I got an error after a few seconds when a frame opens!
Code (from the README file):
Error message:
The text was updated successfully, but these errors were encountered: