-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Deploying yolov5 to TorchServe (GPU compatible) #1681
Comments
Hello @louisoutin, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@louisoutin awesome! Thank you for your contributions. I've not used TorchServe in the past, but I know we have had a request for a tutorial from other users. Can you explain a bit about the typical use-case here? How do you send images to the server and get results back? Thanks! |
Hey, thanks @glenn-jocher ! I just updated the Readme with a "Getting predictions" part. But basically here it's how it's done: Once the dockerimage is running, you can send POST requests to: The handler in this project expect the inputs images to be sent via a Multipart form with a "key/value" form having in the keys the strings "img"+ Example:For a batch_size of 5, we would have the following in our Multipart form request:
The returned json of the request contain a single list. Each i-th element of this list represent the i-th image detection results (represented by: Note that if there is less input images than the batch size, the rest of the inference batch will be padded with zeros inputs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
You can find my scripts for YoloV5 torchServe setup https://github.com/jdongca2003/Yolov5_torchserve |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Another YOLOv5.0 Release v7.0 deploy: https://github.com/ben-omji/serve_yolov5 |
@khelkun thank you for sharing these repositories! It's great to see the YOLOv5 community actively contributing to different deployment options. The effort to make YOLOv5 accessible for various platforms is truly appreciated. 🙌 If there's anything specific you'd like assistance with, feel free to ask! |
🚀 Feature
Motivation
I wanted to use YOLOv5 for my personal projects, using a GPU with fixed batch inference (multiple videos in concurrences),
and TorchServe seemed to be the best option. For this reason, I wanted to share this with the community, as I had some issues in settings things up (especially the handler file).
Pitch
Just sharing things :)
You can check this feature on this github repository:
https://github.com/louisoutin/yolov5_torchserve
Any feedbacks are welcome, thanks!
The text was updated successfully, but these errors were encountered: