bytetrack ——demo_track.py『AttributeError: module 'numpy' has no attribute 'float'.』
错误::::AttributeError: module ‘numpy’ has no attribute ‘float’.
(bytetrack) ls@ls:~/ByteTrack$ python tools/demo_track.py video -f exps/example/mot/yolox_s_mix_det.py -c ./models/bytetrack_s_mot17.pth.tar --path ./videos/palace.mp4 --fp16 --fuse --save_result
Traceback (most recent call last):
File “tools/demo_track.py”, line 14, in
from yolox.tracker.byte_tracker import BYTETracker
File “/home/ls/ByteTrack/yolox/tracker/byte_tracker.py”, line 10, in
from yolox.tracker import matching
File “/home/ls/ByteTrack/yolox/tracker/matching.py”, line 7, in
from cython_bbox import bbox_overlaps as bbox_ious
File “src/cython_bbox.pyx”, line 12, in init cython_bbox
File “/home/ls/anaconda3/envs/bytetrack/lib/python3.8/site-packages/numpy/init.py”, line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘float’.
np.float
was a deprecated alias for the builtin float
. To avoid this error in existing code, use float
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.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
numpy版本过高
修改::
pip uninstall numpy
pip install numpy==1.23.5