yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

how can I just use yolov5s.pt

Open DarkLeaves opened this issue 1 year ago • 1 comments
trafficstars

Search before asking

  • [X] I have searched the YOLOv5 issues and discussions and found no similar questions.

Question

I want to use yolov5s.pt to do some experiments. but when I run my code: model = YOLO('yolov5s.pt')

the ultralytics will Replace 'model=pics/yolov5s.pt' with new 'model=pics/yolov5su.pt'. how to cancel this replacement?

Additional

No response

DarkLeaves avatar Sep 25 '24 08:09 DarkLeaves

👋 Hello @DarkLeaves, thank you for reaching out about YOLOv5 🚀!

For using yolov5s.pt, please ensure you're following the correct setup and process. You can find guidance in our ⭐️ Tutorials to help you get started with different tasks, including the use of YOLOv5 models.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. This will allow our team to better understand the problem.

If this is a ❓ Question related to custom use, please share detailed information, ensuring you're using our Tips for Best Training Results.

Requirements

Please ensure your environment meets these requirements:

Environments

Consider running YOLOv5 in one of our verified environments:

Status

Check our current status with this badge: YOLOv5 CI

Rest assured, an Ultralytics engineer will assist you soon. Meanwhile, explore using our latest YOLOv8 for cutting-edge results!

Thanks again for your patience and interest 🌟

UltralyticsAssistant avatar Sep 25 '24 08:09 UltralyticsAssistant

@DarkLeaves to prevent the automatic replacement, ensure you are using the correct version of YOLOv5 that supports your intended usage. You can specify the exact model path without triggering updates by using the torch.hub.load method like this:

import torch
model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.pt')

This should allow you to use yolov5s.pt without any automatic changes.

pderrenger avatar Nov 09 '24 06:11 pderrenger

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

  • Docs: https://docs.ultralytics.com
  • HUB: https://hub.ultralytics.com
  • Community: https://community.ultralytics.com

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

github-actions[bot] avatar Oct 10 '25 00:10 github-actions[bot]