yolov8-face-landmarks-opencv-dnn
yolov8-face-landmarks-opencv-dnn copied to clipboard
AttributeError: 'tuple' object has no attribute 'flatten'
图片无人脸情况下,cv2.dnn.NMSBoxes输出的indices是空的tuple()。 有人脸情况下输出的是array([2])。 所以if len(indices) > 0: 判断这里是无效的,会在上一句直接报错。烦请修改一下
在main.py里122行
对,这个异常情况,需要考虑的
---Original--- From: @.> Date: Tue, Apr 16, 2024 11:21 AM To: @.>; Cc: @.***>; Subject: [hpc203/yolov8-face-landmarks-opencv-dnn] AttributeError: 'tuple'object has no attribute 'flatten' (Issue #13)
图片无人脸情况下,cv2.dnn.NMSBoxes输出的indices是空的tuple()。 有人脸情况下输出的是array([2])。 所以if len(indices) > 0: 判断这里是无效的,会在上一句直接报错。烦请修改一下
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>