Open lweingart opened 11 months ago
Hello,
I simply cloned the repo and tried to run the video_objet_detection.py, but it directly fails with:
$ python3 video_object_detection.py Traceback (most recent call last): File "video_object_detection.py", line 4, in <module> from yolov8 import YOLOv8 File "/home/jetson/git/ONNX-YOLOv8-Object-Detection/yolov8/__init__.py", line 1, in <module> from .YOLOv8 import YOLOv8 File "/home/jetson/git/ONNX-YOLOv8-Object-Detection/yolov8/YOLOv8.py", line 6, in <module> from yolov8.utils import xywh2xyxy, draw_detections, multiclass_nms File "/home/jetson/git/ONNX-YOLOv8-Object-Detection/yolov8/utils.py", line 108, in <module> def draw_box( image: np.ndarray, box: np.ndarray, color: tuple[int, int, int] = (0, 0, 255), TypeError: 'type' object is not subscriptable
I had to remove the type description to make it work (i.e. color: tuple[int, int, int] = (0, 0, 255) turned into color=(0, 0, 255)
color: tuple[int, int, int] = (0, 0, 255)
color=(0, 0, 255)
Maybe there is a way to fix this that I'm not aware of yet ?
Cheers
For older python version like 3.8 use the following modifications for utils.py:
utils.py
from typing import Tuple
tuple
Tuple
Which Python version do you use?
Hello,
I simply cloned the repo and tried to run the video_objet_detection.py, but it directly fails with:
I had to remove the type description to make it work (i.e.
color: tuple[int, int, int] = (0, 0, 255)
turned intocolor=(0, 0, 255)
Maybe there is a way to fix this that I'm not aware of yet ?
Cheers