insightface icon indicating copy to clipboard operation
insightface copied to clipboard

example error / warning

Open mohammadSHP opened this issue 3 years ago • 5 comments

hello. I wanna try the example in Readme but i got this error (warning). can somebody give me a advice?

Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: /home/mohammad/.insightface/models/buffalo_l/1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: /home/mohammad/.insightface/models/buffalo_l/2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: /home/mohammad/.insightface/models/buffalo_l/det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: /home/mohammad/.insightface/models/buffalo_l/genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: /home/mohammad/.insightface/models/buffalo_l/w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640) /home/mohammad/Project/nextaibox/insightface_master/python-package/insightface/utils/transform.py:68: FutureWarning: rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1. P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4

what should I do?!

mohammadSHP avatar Sep 15 '22 11:09 mohammadSHP

I can not see any error, it's just a warning.

nttstar avatar Sep 15 '22 11:09 nttstar

I can not see any error, it's just a warning.

yes you are right. but it does not detect faces and creat t1_output.jpg. it did not to anything.

mohammadSHP avatar Sep 15 '22 11:09 mohammadSHP

Could maintainers apply single-word fix? Here: insightface/utils/transform.py:68 Replace: P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4

With: P = np.linalg.lstsq(X_homo, Y, rcond=None)[0].T # Affine matrix. 3 x 4

Reference doc: https://numpy.org/doc/stable/reference/generated/numpy.linalg.lstsq.html

ArtemKiyashko avatar Jun 02 '23 12:06 ArtemKiyashko

@ArtemKiyashko its just a warning but it is occurring due to the face detector models all models except buffalo_s and buffalo_sc that contain 500m flops. output bounding boxes overflow the maximum and minimum values. kindly check it. I mentioned this issue in #2365. Thats why the output image doesn't display any bboxes. @mohammadSHP did you find a way out. @nttstar kindly look into that.

box [-323657120 -711482304 603869440 1453621376] box [-1543355392 -3272627968 1541873792 6579140096]

insightface/python-package/insightface/app/face_analysis.py", line 87, in draw_on cv2.rectangle(dimg, (box[0], box[1]), (box[2], box[3]), color, 2) cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'rectangle'

Overload resolution failed:

  • Can't parse 'pt1'. Sequence item with index 1 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 1 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

ZubairKhan001 avatar Jul 12 '23 04:07 ZubairKhan001

Any new about this issue? It's extremely annoying. 😢

image

changchiyou avatar Mar 05 '24 02:03 changchiyou