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
import cv2
import numpy as np
import insightface
from insightface.app import FaceAnalysis
from insightface.data import get_image as ins_get_image
app = FaceAnalysis(providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
app.prepare(ctx_id=0, det_size=(640, 640))
img = ins_get_image('t1')
faces = app.get(img)
rimg = app.draw_on(img, faces)
cv2.imwrite("./t1_output.jpg", rimg)
output:
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Administrator/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
Traceback (most recent call last):
File "c:\Users\Administrator\Desktop\face_detect\face_detect.py", line 11, in <module>
rimg = app.draw_on(img, faces)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\sdk\miniconda3\envs\face_detect\Lib\site-packages\insightface\app\face_analysis.py", line 84, in draw_on
box = face.bbox.astype(np.int)
^^^^^^
File "D:\sdk\miniconda3\envs\face_detect\Lib\site-packages\numpy\__init__.py", line 410, in __getattr__
raise AttributeError(__former_attrs__[attr], name=None)
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
```
The text was updated successfully, but these errors were encountered:
I run the example snippet
output:
The text was updated successfully, but these errors were encountered: