mikel-brostrom / boxmot

BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
GNU Affero General Public License v3.0
6.71k stars 1.71k forks source link

An error occurred using my own training yolov5x.pt #216

Closed ddg238 closed 2 years ago

ddg238 commented 3 years ago

I trained a model to detect table tennis, and I want to use this code to track, but an error occurs when it runs error: issues I know my question may be repeated but #212 does not give a detailed solution

arvidle commented 3 years ago

This seems to be caused by changes in the yolov5 repo, which are not yet implemented here. This is probably why the submodule of yolov5 is still pinned to an older commit. I was able to work around the exact same error by using the version of yolov5 the submodule is pinned to to train my custom net.

The easiest way to do this is to just use the yolov5 cloned as a submodule by this repository to train your custom network. Otherwise, you can checkout the branch of yolov5 referenced by this repository in the yolov5 clone you use for training (at the moment git checkout aa18599).

While this is not a long-term fix, this should make everything work as intended.

mikel-brostrom commented 2 years ago

The yolov5 submodule is now updated. You should be able to load your weights. Pull and try again. Let me know whether this works for you or not.

arvidle commented 2 years ago

I tested the tracking with a model trained on the most recent version of yolov5 and everything works as intended.