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

Error--> loading the model #6113

Closed
1 task done
gigDevelopment10 opened this issue Dec 27, 2021 · 3 comments
Closed
1 task done

Error--> loading the model #6113

gigDevelopment10 opened this issue Dec 27, 2021 · 3 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@gigDevelopment10
Copy link

gigDevelopment10 commented Dec 27, 2021

Search before asking

Question

File showing error in yolov5 repository : yolov5_ultralytics_to_darnet_format
I'm trying to get weights and CFG file form for custom dataset

image
image
image

Additional

No response

@gigDevelopment10 gigDevelopment10 added the question Further information is requested label Dec 27, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 27, 2021

@gigDevelopment10 see YOLOv5 PyTorch Hub tutorial for details on loading.

Simple Example

This example loads a pretrained YOLOv5s model from PyTorch Hub as model and passes an image for inference. 'yolov5s' is the lightest and fastest YOLOv5 model. For details on all available models please see the README.

import torch

# Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')

# Image
img = 'https://ultralytics.com/images/zidane.jpg'

# Inference
results = model(img)

results.pandas().xyxy[0]
#      xmin    ymin    xmax   ymax  confidence  class    name
# 0  749.50   43.50  1148.0  704.5    0.874023      0  person
# 1  433.50  433.50   517.5  714.5    0.687988     27     tie
# 2  114.75  195.75  1095.0  708.0    0.624512      0  person
# 3  986.00  304.00  1028.0  420.0    0.286865     27     tie

YOLOv5 Tutorials

Good luck 🍀 and let us know if you have any other questions!

@gigDevelopment10
Copy link
Author

Thanks Glenn !

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2022

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

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 YOLOv5 🚀 and Vision AI ⭐!

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Jan 28, 2022
@github-actions github-actions bot closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants