Open ZareAlucard opened 11 months ago
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\count.py", line 457, in detect(args) File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\count.py", line 330, in detect outputs = deepsort.update(xywhs, confss, im0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in update detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\sort\detection.py", line 30, in init self.tlwh = np.asarray(tlwh, dtype=np.float) ^^^^^^^^ File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\venv\Lib\site-packages\numpyinit.py", line 319, in getattr raise AttributeError(former_attrs[attr]) AttributeError: module 'numpy' has no attribute 'float'.
np.float
was a deprecated alias for the builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64
here. 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. Did you mean: 'cfloat'?
看错误提示里有说的,应该是numpy新版本弃用了np.float,试下把numpy版本改成1.18.5 pip3 install numpy==1.18.5
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\count.py", line 457, in
detect(args)
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\count.py", line 330, in detect
outputs = deepsort.update(xywhs, confss, im0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in update
detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in
detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\deep_sort_pytorch\deep_sort\sort\detection.py", line 30, in init
self.tlwh = np.asarray(tlwh, dtype=np.float)
^^^^^^^^
File "D:\数学建模\Yolov5_DeepSort_Traffic-counter-main\venv\Lib\site-packages\numpy__init.py", line 319, in getattr
raise AttributeError(former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
np.float
was a deprecated alias for the builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64
here. 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. Did you mean: 'cfloat'?