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:
#272
Labels
bug
Something isn't working
Search before asking
Notebook name
Track and Count Vehicles with YOLOv8 + ByteTRACK + Supervision
Bug
0: 384x640 1 person, 1 backpack, 3901.6ms
Speed: 6.2ms preprocess, 3901.6ms inference, 1.8ms postprocess per image at shape (1, 3, 384, 640)
AttributeError Traceback (most recent call last)
in <cell line: 22>()
31 )
32
---> 33 tracks = byte_tracker.update(
34 output_results=detections2boxes(detections=detections),
35 img_info=frame.shape,
3 frames
/content/ByteTrack/yolox/tracker/byte_tracker.py in update(self, output_results, img_info, img_size)
187 if len(dets):
188 '''Detections'''
--> 189 detections = [STrack(STrack.tlbr_to_tlwh(tlbr), s) for
190 (tlbr, s) in zip(dets, scores_keep)]
191 else:
/content/ByteTrack/yolox/tracker/byte_tracker.py in (.0)
187 if len(dets):
188 '''Detections'''
--> 189 detections = [STrack(STrack.tlbr_to_tlwh(tlbr), s) for
190 (tlbr, s) in zip(dets, scores_keep)]
191 else:
/content/ByteTrack/yolox/tracker/byte_tracker.py in init(self, tlwh, score)16
17 # wait activate
---> 18 self._tlwh = np.asarray(tlwh, dtype=float)
19 self.kalman_filter = None
20 self.mean, self.covariance = None, None
/usr/local/lib/python3.10/dist-packages/numpy/init.py in getattr(attr)
317
318 if attr in former_attrs:
--> 319 raise AttributeError(former_attrs[attr])
320
321 if attr == 'testing':
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.Environment
-Google Colab
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: