ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

Specify the axis to np.squeeze #318

Closed abhilb closed 3 years ago

abhilb commented 3 years ago

When there is only one face in the input image, the original implementation gives an error

Traceback (most recent call last):
  File "python/detect.py", line 96, in <module>
    x1=d[0], y1=d[1], x2=d[2], y2=d[3], score=d[-1]))
IndexError: invalid index to scalar variable.

This commit fixes that error.

fengyuentau commented 3 years ago

Thanks for the contribution!