TheNobody-12 / MOT_WITH_YOLOV9_STRONG_SORT

GNU General Public License v3.0
9 stars 1 forks source link

IndexError: index 1 is out of bounds for dimension 0 with size 1 #1

Open manoj-samal opened 5 months ago

manoj-samal commented 5 months ago

!python trackv9.py --source /content/MOT_WITH_YOLOV9_STRONG_SORT/yolov9/data/images/horses.jpg --conf-thres 0.5 --device 0 --yolo-weights yolov9-t-converted.pt

2024-06-18 11:21:23.910302: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-06-18 11:21:23.910347: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-06-18 11:21:23.911595: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-06-18 11:21:23.918227: 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.
2024-06-18 11:21:25.074517: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
YOLO 🚀 v0.1-104-g5b1ea9a Python-3.10.12 torch-2.3.0+cu121 CUDA:0 (Tesla T4, 15102MiB)

Fusing layers... 
gelan-t summary: 489 layers, 2001840 parameters, 22704 gradients
Downloading...
From: https://drive.google.com/uc?id=1Kkx2zW89jq_NETu4u42CFZTMVD5Hwm6e
To: /content/MOT_WITH_YOLOV9_STRONG_SORT/weights/osnet_x0_25_msmt17.pt
100% 9.34M/9.34M [00:00<00:00, 98.1MB/s]
Model: osnet_x0_25
- params: 203,568
- flops: 82,316,000
Successfully loaded pretrained weights from "/content/MOT_WITH_YOLOV9_STRONG_SORT/weights/osnet_x0_25_msmt17.pt"
** The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias']
(1, 256, 128, 3)
Traceback (most recent call last):
  File "/content/MOT_WITH_YOLOV9_STRONG_SORT/trackv9.py", line 392, in <module>
    main(opt)
  File "/content/MOT_WITH_YOLOV9_STRONG_SORT/trackv9.py", line 387, in main
    run(**vars(opt))
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/content/MOT_WITH_YOLOV9_STRONG_SORT/trackv9.py", line 183, in run
    pred = pred[0][1]
IndexError: index 1 is out of bounds for dimension 0 with size 1
TheNobody-12 commented 5 months ago

I have made the changes. However, the only change was to remove [1] from it. However, we need it when we access data from rtmp because the prediction frame comes in index 1 at that time.