Load YoloV5 Model offline in PyTorch

Hi PyTorch,

I’m learning about how to use pre-trained models in PyTorch.

I saw I can load a SSD model offline by: torchvision.models.detection.ssd_vgg16(), …

But I can not see a yoloV5 model. Why?

And how can I load a yoloV5 model offline like the SSD model?

Thank you so much

YoloV5 is not part of the torchvision repository, so you might want to check other repositories. :wink:

1 Like

Thank you.

But I see it’s really great when I can load SSD model by Torchvision.models.detection.ssd_vgg300().
It’s good when I can not use the internet at my workplace.

So, Can I load YoloV5 model same the above way?
Maybe not Torchvision, Which Torch can I load yoloV5 model in PyTorch?

Can anyone help me? Please

Which torch is hard to understand but,
You cannot load YOLOv5 model in the same manner.
It means PyTorch does not support YOLOv5 through torchvision and other PyTorch libraries yet

Please follow the instruction provided by YOLOv5 github. https://github.com/ultralytics/yolov5

1 Like

Thank you so much.

Another question for my curious,

PyTorch has torchvision and they create a lot of model inside this torchvision.models.

And we can create a model from SSD from Torchvision.models.detection.ssd()…

Why they don’t import yolov5 into Torchvision?

So we can use Torchvision.models.detection.yolov5().

Anyway, your answer helps me a lot.