Roboflow + YOLOv5
Export Roboflow datasets in YOLOv5 PyTorch TXT, train YOLOv5 in our notebooks, then upload the weights to serve the model from Roboflow's API or your own hardware.
How to connect YOLOv5 to Roboflow
5 stepsLabel and generate a version
Annotate in Roboflow or upload existing labels, then generate a dataset version.
Export as YOLOv5 PyTorch TXT
Choose YOLOv5 PyTorch TXT on export, or call version.download("yolov5") in Python. You get images, one label txt per image and a data.yaml.
Train in the YOLOv5 notebook
Open the YOLOv5 object detection notebook in roboflow/notebooks, paste in your dataset download snippet and run train.py.
Upload the weights
Call version.deploy(model_type="yolov5", model_path="<run folder>"). The folder needs weights/best.pt and opt.yaml with imgsz and batch_size.
Run the model
Call your model by its project and version ID through the Serverless Hosted API, a Dedicated Deployment or a self-hosted Inference server.
What teams build with YOLOv5
Keep an existing YOLOv5 pipeline
Swap in better-labeled data from Roboflow without changing your YOLOv5 training code.
Serve YOLOv5 weights without building a server
Upload best.pt and call it over HTTP, or in a Workflow next to other models.
Questions
No. Our docs list YOLOv5 as upload and export only. For in-app training, choose RF-DETR, YOLO26 or YOLO11.
The training run folder with weights/best.pt and an opt.yaml that includes imgsz (or img_size) and batch_size. YOLOv5 upload does not use the ultralytics package.
YOLOv5 is AGPL-3.0. Running it on Roboflow cloud includes a commercial license for every user, including the free plan. Commercial self-hosting needs our Enterprise license add-on.
Yes. YOLOv8 reads the same YOLOv5 PyTorch TXT layout, so one export trains either model.
Why are companies choosing Roboflow?
The end-to-end platform for vision AI: create datasets, train models and deploy to production.
Flexible deployment modes
Move from a scalable cloud API to edge hardware like NVIDIA Jetson without managing complex dependencies.
Integrated workflow builder
Combine multiple AI models, custom business logic and third-party integrations into one production-ready pipeline in a low-code editor.
Model monitoring and alerts
Dashboards track confidence, inference time and request volume for your deployed models, and email alerts tell your team when confidence suddenly drops.






