MuhammadMoinFaisal / YOLOv8-DeepSORT-Object-Tracking

YOLOv8 Object Tracking using PyTorch, OpenCV and DeepSORT
666 stars 197 forks source link

tracking two video #32

Open anonyprogrammer opened 11 months ago

anonyprogrammer commented 11 months ago

Hi, I want to do speed estimate and object tracking for two video and when I do that with thread it goes until the second thread stop with this error : Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "G:\Programming\Python Project\Speed Detection\myVenv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\engine\predictor.py", line 189, in call s += self.write_results(i, preds, (p, im, im0s)) File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\predict.py", line 326, in write_results outputs = deepsort.update(xywhs, confss, oids, im0) File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\deep_sort_pytorch\deep_sort\deep_sort.py", line 39, in update self.tracker.update(detections) File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\deep_sort_pytorch\deep_sort\sort\tracker.py", line 74, in update self._match(detections) File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\deep_sort_pytorch\deep_sort\sort\tracker.py", line 130, in _match linear_assignment.min_cost_matching( File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\deep_sort_pytorch\deep_sort\sort\linear_assignment.py", line 56, in min_cost_matching cost_matrix = distance_metric( File "G:\Programming\Python Project\Speed Detection\YOLOv8-DeepSORT-Object-Tracking\ultralytics\yolo\v8\detect\deep_sort_pytorch\deep_sort\sort\iou_matching.py", line 74, in iou_cost if tracks[track_idx].time_since_update > 1: IndexError: list index out of range what do you suggest me to do? and is there another way to do that without a thread? I want to do that with an id for every video to save its detections with its video id please help me with this error thanks for your Time...