pytorch/hub

How to load a custom YOLOv9 model using torch.hub.load()?

dsbyprateekg opened this issue · 1 comments

Hi,

I have trained a YOLOV9-e model on a custom dataset from this repo: https://github.com/WongKinYiu/yolov9

Now I tried to load it as below-
image

But getting the following error-
image

It says- RuntimeError: Cannot find callable best.pt in hubconf

Please share the correct way to load the model.

@dsbyprateekg sorry I'm not sure how to help here since the original code snippet you used wasn't shared. I'm seeing a reference to best.pt in the link you shared:

https://github.com/WongKinYiu/yolov9/blob/519346bd88c4e735e5ce9dc4c1a41c7033cc7402/hubconf.py#L8C1-L8C66

so I assume there is either something within that repo (in which case you need to address the issue there), or in your own code (in which case please share a minimal reproducing example).

I'll close the issue for now but feel free to reopen or follow-up