yolov9 icon indicating copy to clipboard operation
yolov9 copied to clipboard

YOLOv9 + DeepSORT

Open sujanshresstha opened this issue 1 year ago • 4 comments

Hi,I hope you're doing well. I've integrated YOLOv9 with DeepSORT in the following repository: https://github.com/sujanshresstha/YOLOv9_DeepSORT.git

sujanshresstha avatar Feb 27 '24 10:02 sujanshresstha

Oh, no. No more AI-generaated messages, please.

jdiaz97 avatar Feb 27 '24 11:02 jdiaz97

Congrats @sujanshresstha seems very good!

jdiaz97 avatar Feb 27 '24 11:02 jdiaz97

Hi @jdiaz97, Thank you for your positive feedback! Indeed, integrating YOLOv9 with DeepSORT opens up a lot of exciting possibilities. I appreciate your support!

sujanshresstha avatar Feb 27 '24 23:02 sujanshresstha

Added to readme.

WongKinYiu avatar Feb 28 '24 02:02 WongKinYiu

@sujanshresstha

I am not sure, but you may need to check which one is correct. for det in results.pred[0]: or for det in results.pred[1]: https://github.com/sujanshresstha/YOLOv9_DeepSORT/blob/main/object_tracking.py#L60

WongKinYiu avatar Mar 02 '24 13:03 WongKinYiu

@WongKinYiu,

I have opted to use for det in results.pred[0]: instead of for det in results.pred[1]: due to the following reason:

Inside the DetectMultiBackend class, there are lines of code:

if self.pt:  # PyTorch
    y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im)

if isinstance(y, (list, tuple)):
    return self.from_numpy(y[0]) if len(y) == 1 else [self.from_numpy(x) for x in y]

Since the model outputs an aggregated single tensor even for multiple object detection, len(y) == 1.

I have double-checked with for det in results.pred[1]:, but it throws an IndexError: list index out of range since len(results.pred) = 1.

sujanshresstha avatar Mar 03 '24 01:03 sujanshresstha

Bytetrack is better for practical application than Deepsort for less latency

karthikbalu avatar Mar 08 '24 03:03 karthikbalu