Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I just use yolov5s.pt #13334

Open
1 task done
DarkLeaves opened this issue Sep 25, 2024 · 2 comments
Open
1 task done

how can I just use yolov5s.pt #13334

DarkLeaves opened this issue Sep 25, 2024 · 2 comments
Labels
question Further information is requested

Comments

@DarkLeaves
Copy link

DarkLeaves commented Sep 25, 2024

Search before asking

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 DarkLeaves added the question Further information is requested label Sep 25, 2024
@UltralyticsAssistant
Copy link
Member

UltralyticsAssistant commented Sep 25, 2024

👋 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 🌟

@pderrenger
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants