-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
if i have hardware that support parallel ,Can i edit the network to run parallel #8767
Comments
@totoadel see Multi-GPU Training tutorial below: YOLOv5 Tutorials
Good luck 🍀 and let us know if you have any other questions! |
@glenn-jocher I don't want to do training, I want to do detecting |
@totoadel 👋 Hello! Thanks for asking about handling inference results. YOLOv5 🚀 PyTorch Hub models allow for simple model loading and inference in a pure python environment without using Simple Inference ExampleThis example loads a pretrained YOLOv5s model from PyTorch Hub as import torch
# Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # yolov5n - yolov5x6 official model
# 'custom', 'path/to/best.pt') # custom model
# Images
im = 'https://ultralytics.com/images/zidane.jpg' # or file, Path, URL, PIL, OpenCV, numpy, list
# Inference
results = model(im)
# Results
results.print() # or .show(), .save(), .crop(), .pandas(), etc.
results.xyxy[0] # im predictions (tensor)
results.pandas().xyxy[0] # im predictions (pandas)
# xmin ymin xmax ymax confidence class name
# 0 749.50 43.50 1148.0 704.5 0.874023 0 person
# 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
results.pandas().xyxy[0].value_counts('name') # class counts (pandas)
# person 2
# tie 1 See YOLOv5 PyTorch Hub Tutorial for details. Good luck 🍀 and let us know if you have any other questions! |
@glenn-jocher i know this , what i mean is , i want to change the yolo layers to work parallel |
👋 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 ⭐! |
@VYRION-Ai I understand, you are referring to parallel execution of YOLO layers. YOLOv5 already includes multi-scale prediction and weighted-bridge convolutional layers for efficient model parallelism during inference, benefiting from PyTorch's native parallel execution capabilities. Enabling further parallelism might require intricate modifications and careful testing to ensure accuracy and performance. For comprehensive control over model parallelism and custom layer optimization, exploring PyTorch's native techniques for distributed and parallel computing would be beneficial. Additionally, PyTorch's documentation provides detailed guidance on achieving fine-grained control over parallelism and optimizing custom layers to suit specific hardware capabilities. Feel free to refer to the Ultralytics Docs for further information, and let me know if you require assistance with any specific implementation. Keep up the great work, and don't hesitate to reach out if you have any more questions! |
Search before asking
Question
if i have hardware that support parallel like FPGA ,Can i edit the network to run parallel . any answer will help me allot
Additional
No response
The text was updated successfully, but these errors were encountered: