tensorturtle / classy-sort-yolov5

Ready-to-use realtime multi-object tracker that works for any object category. YOLOv5 + SORT implementation.
GNU General Public License v3.0
110 stars 29 forks source link

Error when using v5m6 models with img_size 1280 #3

Closed OleksiiYeromenko closed 3 years ago

OleksiiYeromenko commented 3 years ago

Hi, Thanks for cool work, but I'm receiving error RuntimeError: Sizes of tensors must match except in dimension 1. Got 24 and 23 in dimension 2 (The offending index is 1) when trying to run _6 models with image size 1280.

OleksiiYeromenko commented 3 years ago

Ok, mistake in classy_track.py - line 145 - missing stride:

 dataset = LoadImages(source, img_size=imgsz)
dataset = LoadImages(source, img_size=imgsz, stride=stride)
tensorturtle commented 3 years ago

Hi @OleksiiYeromenko , I'm glad you were able to find the fix. It looks like that argument was added in YOLOV5 version 5.0. This repo is currently based on YOLOV5 version 4.0