MuhammadMoinFaisal / YOLOv8-DeepSORT-Object-Tracking

YOLOv8 Object Tracking using PyTorch, OpenCV and DeepSORT
807 stars 222 forks source link

error executing job with overrides #19

Closed yeongnamtan closed 1 year ago

yeongnamtan commented 1 year ago

when I do predict, i get below error. Could you advise what I should do ?


!python predict_yolov8.0.0_track_count.py source="P35_IMG_1173_0.1.mp4" model=best_yolov8x_v8.0.0_11April2023.pt conf=0.01

[2023-04-28 15:24:31,434][root.tracker][INFO] - Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
2023-04-28 15:24:31.897684: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-28 15:24:33.672485: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Ultralytics YOLOv8.0.3 🚀 Python-3.10.11 torch-2.0.0+cu118 CPU
Fusing layers... 
Model summary: 268 layers, 68124531 parameters, 0 gradients, 257.4 GFLOPs
Error executing job with overrides: ['source=P35_IMG_1173_0.1.mp4', 'model=best_yolov8x_v8.0.0_11April2023.pt', 'conf=0.01']
Traceback (most recent call last):
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/predict_yolov8.0.0_track_count.py", line 324, in <module>
    predict()
  File "/usr/local/lib/python3.10/dist-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/usr/local/lib/python3.10/dist-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/usr/local/lib/python3.10/dist-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/predict_yolov8.0.0_track_count.py", line 320, in predict
    predictor()
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/engine/predictor.py", line 189, in __call__
    s += self.write_results(i, preds, (p, im, im0s))
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/predict_yolov8.0.0_track_count.py", line 302, in write_results
    outputs = deepsort.update(xywhs, confss, oids, im0)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep_sort.py", line 29, in update
    features = self._get_features(bbox_xywh, ori_img)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep_sort.py", line 110, in _get_features
    features = self.extractor(im_crops)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep/feature_extractor.py", line 43, in __call__
    im_batch = self._preprocess(im_crops)
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep/feature_extractor.py", line 38, in _preprocess
    im_batch = torch.cat([self.norm(_resize(im, self.size)).unsqueeze(
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep/feature_extractor.py", line 38, in <listcomp>
    im_batch = torch.cat([self.norm(_resize(im, self.size)).unsqueeze(
  File "/content/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/v8/detect/deep_sort_pytorch/deep_sort/deep/feature_extractor.py", line 36, in _resize
    return cv2.resize(im.astype(np.float32)/255., size)
cv2.error: OpenCV(4.7.0) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
ImSuMyatNoe commented 1 year ago

I am currently face this error , could you please advise me how did u solve this ? @MuhammadMoinFaisal @yeongnamtan