Roboflow
Roboflow has everything you need to build and deploy computer vision models. Connect Roboflow at any step in your pipeline with APIs and SDKs, or use the end-to-end interface to automate the entire process from image to inference. Whether you're in need of data labeling, model training, or model deployment, Roboflow gives you building blocks to bring custom computer vision solutions to your project.
许可
Ultralytics 提供两种许可选项:
- AGPL-3.0 许可证是经 OSI 批准的开放源码许可证,非常适合学生和爱好者使用。
- 企业许可证适用于希望将我们的人工智能模型纳入其产品和服务的企业。
更多详情,请参阅Ultralytics Licensing。
In this guide, we are going to showcase how to find, label, and organize data for use in training a custom Ultralytics YOLO11 model. Use the table of contents below to jump directly to a specific section:
- Gather data for training a custom YOLO11 model
- Upload, convert and label data for YOLO11 format
- 预处理和扩充数据,提高模型的稳健性
- Dataset management for YOLO11
- 以 40 多种格式导出数据,用于模型训练
- Upload custom YOLO11 model weights for testing and deployment
- Gather Data for Training a Custom YOLO11 Model
Roboflow provides two services that can help you collect data for YOLO11 models: Universe and Collect.
Universe 是一个在线存储库,拥有超过 25 万个视觉数据集,总计超过 1 亿张图像。
通过 Roboflow 免费账户,您可以导出 Universe 上的任何数据集。要导出数据集,请点击任何数据集上的 "下载此数据集 "按钮。
For YOLO11, select "YOLO11" as the export format:
Universe also has a page that aggregates all public fine-tuned YOLO11 models uploaded to Roboflow. You can use this page to explore pre-trained models you can use for testing or for automated data labeling or to prototype with Roboflow inference.
如果你想自己收集图像,可以试试Collect,这是一个开源项目,允许你使用边缘网络摄像头自动收集图像。您可以使用 Collect 的文本或图像提示来指示应该收集哪些数据,这样您就可以只捕捉建立视觉模型所需的有用数据。
Upload, Convert and Label Data for YOLO11 Format
Roboflow Annotate is an online annotation tool for use in labeling images for object detection, classification, and segmentation.
To label data for a YOLO11 object detection, instance segmentation, or classification model, first create a project in Roboflow.
然后,将图像和其他工具中已有的注释(使用 40 多种支持的导入格式之一)上传到Roboflow 。
在 "注释 "页面上选择您上传的一批图像,上传图像后会进入该页面。然后,点击 "开始注释",为图片贴标签。
要使用边界框标注,请按 B
key on your keyboard or click the box icon in the sidebar. Click on a point where you want to start your bounding box, then drag to create the box:
创建注释后,弹出窗口会要求您为注释选择一个类。
要使用多边形标注,按 P
键,或侧边栏中的多边形图标。启用多边形注释工具后,单击图像中的各个点即可绘制多边形。
Roboflow 提供了一个基于SAM 的标签助手,您可以用它以前所未有的速度对图像进行标注。SAM (Segment Anything Model)是一种先进的计算机视觉模型,可以精确地为图像贴标签。有了SAM ,您可以大大加快图像标注过程。用多边形标注图像变得简单,只需点击几下即可,而无需再精确点击物体周围的点。
要使用标签助手,请单击侧边栏中的光标图标,SAM ,即可在项目中使用。
将鼠标悬停在图像中的任何对象上,SAM 就会推荐注释。您可以通过鼠标悬停来找到合适的注释位置,然后点击即可创建注释。要修改注释的具体内容,可以点击SAM 在文档上创建的注释的内部或外部。
您还可以通过侧边栏的标签面板为图像添加标签。您可以为特定区域的数据、特定相机拍摄的数据等添加标签。然后,您可以使用这些标签在数据中搜索与标签匹配的图像,并生成包含特定标签或标签集的数据集版本。
Models hosted on Roboflow can be used with Label Assist, an automated annotation tool that uses your YOLO11 model to recommend annotations. To use Label Assist, first upload a YOLO11 model to Roboflow (see instructions later in the guide). Then, click the magic wand icon in the left sidebar and select your model for use in Label Assist.
选择一个型号,然后点击 "继续 "启用标签辅助功能:
打开新图像进行注释时,标签助手会触发并推荐注释。
Dataset Management for YOLO11
Roboflow 提供了一套用于理解计算机视觉数据集的工具。
首先,您可以使用数据集搜索来查找符合语义文本描述(即查找包含人物的所有图像)或符合指定标签(即图像与特定标签相关联)的图像。要使用数据集搜索,请单击侧边栏中的 "数据集"。然后,使用页面顶部的搜索栏和相关筛选器输入搜索查询。
例如,以下文本查询可在数据集中找到包含人物的图像:
您可以使用 "标签 "选择器将搜索范围缩小到带有特定标签的图片:
在开始使用数据集训练模型之前,我们建议您使用Roboflow Health Check,这是一款网络工具,可帮助您深入了解数据集,以及如何在训练视觉模型之前改进数据集。
要使用 "健康检查",请单击 "健康检查 "侧边栏链接。将出现一个统计列表,显示数据集中图像的平均大小、类平衡、图像中注释位置的热图等。
健康检查可能会建议进行更改,以帮助提高数据集性能。例如,类平衡功能可能会显示标签不平衡,如果解决了这个问题,就能提高性能或模型的性能。
以 40 多种格式导出数据,用于模型培训
要导出数据,您需要一个数据集版本。版本是数据集冻结在时间中的一种状态。要创建版本,首先点击侧边栏中的 "版本"。然后点击 "创建新版本 "按钮。在此页面中,您可以选择应用于数据集的增强和预处理步骤:
对于您选择的每种增强效果,都会出现一个弹出窗口,让您根据需要调整增强效果。下面是一个在指定参数范围内调整亮度增强功能的示例:
数据集版本生成后,您可以将数据导出为一系列格式。点击数据集版本页面上的 "导出数据集 "按钮即可导出数据:
You are now ready to train YOLO11 on a custom dataset. Follow this written guide and YouTube video for step-by-step instructions or refer to the Ultralytics documentation.
Upload Custom YOLO11 Model Weights for Testing and Deployment
Roboflow 为已部署的模型和 SDK 提供了可无限扩展的 API,可与NVIDIA Jetsons、Luxonis OAK、Raspberry Pis、基于GPU 的设备等一起使用。
You can deploy YOLO11 models by uploading YOLO11 weights to Roboflow. You can do this in a few lines of Python code. Create a new Python file and add the following code:
import roboflow # install with 'pip install roboflow'
roboflow.login()
rf = roboflow.Roboflow()
project = rf.workspace(WORKSPACE_ID).project("football-players-detection-3zvbc")
dataset = project.version(VERSION).download("yolov8")
project.version(dataset.version).deploy(model_type="yolov8", model_path=f"{HOME}/runs/detect/train/")
在此代码中,用您的账户和项目的值替换项目 ID 和版本 ID。了解如何检索Roboflow API 密钥。
运行上述代码时,系统会要求您进行身份验证。然后,您的模型将被上传,并为您的项目创建一个 API。这个过程可能需要 30 分钟才能完成。
要测试您的模型并查找受支持 SDK 的部署说明,请访问Roboflow 侧边栏中的 "部署 "选项卡。在该页面顶部会出现一个小工具,您可以使用它来测试您的模型。您可以使用网络摄像头进行实时测试,也可以上传图片或视频。
您还可以将上传的模型用作标注助手。该功能使用您训练好的模型对上传到Roboflow 的图像推荐注释。
How to Evaluate YOLO11 Models
Roboflow 提供了一系列用于评估模型的功能。
Once you have uploaded a model to Roboflow, you can access our model evaluation tool, which provides a confusion matrix showing the performance of your model as well as an interactive vector analysis plot. These features can help you find opportunities to improve your model.
要访问混淆矩阵,请访问Roboflow 面板上的模型页面,然后单击 "查看详细评估":
弹出窗口显示混淆矩阵:
将鼠标悬停在混淆矩阵上的方框上,可查看与该方框相关的值。点击方框可查看相应类别的图像。点击图像可查看与该图像相关的模型预测和地面实况数据。
要了解更多信息,请单击矢量分析。这将显示使用 CLIP 计算出的数据集中图像的散点图。图像在散点图中的距离越近,说明它们在语义上越相似。每张图片都用一个点来表示,颜色介于白色和红色之间。点越红,模型的表现就越差。
您可以使用矢量分析来
- 查找图像集群
- 确定模型表现不佳的群组,并
- 可视化模型表现不佳的图像之间的共性。
学习资源
Want to learn more about using Roboflow for creating YOLO11 models? The following resources may be helpful in your work.
- Train YOLO11 on a Custom Dataset: Follow our interactive notebook that shows you how to train a YOLO11 model on a custom dataset.
- Autodistill: Use large foundation vision models to label data for specific models. You can label images for use in training YOLO11 classification, detection, and segmentation models with Autodistill.
- 监督:Python 软件包,其中包含用于计算机视觉模型的实用工具。您可以使用监督功能过滤检测结果、计算混淆矩阵等,所有这些只需几行Python 代码即可完成。
- Roboflow Blog: The Roboflow Blog features over 500 articles on computer vision, covering topics from how to train a YOLO11 model to annotation best practices.
- Roboflow YouTube channel: Browse dozens of in-depth computer vision guides on our YouTube channel, covering topics from training YOLO11 models to automated image labeling.
项目展示
Below are a few of the many pieces of feedback we have received for using YOLO11 and Roboflow together to create computer vision models.
常见问题
How do I label data for YOLO11 models using Roboflow?
Labeling data for YOLO11 models using Roboflow is straightforward with Roboflow Annotate. First, create a project on Roboflow and upload your images. After uploading, select the batch of images and click "Start Annotating." You can use the B
键用于边界框或 P
键用于多边形。要加快标注速度,可点击侧边栏中的光标图标,使用基于SAM 的标签助手。详细步骤可参见 这里.
What services does Roboflow offer for collecting YOLO11 training data?
Roboflow provides two key services for collecting YOLO11 training data: Universe and Collect. Universe offers access to over 250,000 vision datasets, while Collect helps you gather images using a webcam and automated prompts.
How can I manage and analyze my YOLO11 dataset using Roboflow?
Roboflow offers robust dataset management tools, including dataset search, tagging, and Health Check. Use the search feature to find images based on text descriptions or tags. Health Check provides insights into dataset quality, showing class balance, image sizes, and annotation heatmaps. This helps optimize dataset performance before training YOLO11 models. Detailed information can be found here.
How do I export my YOLO11 dataset from Roboflow?
To export your YOLO11 dataset from Roboflow, you need to create a dataset version. Click "Versions" in the sidebar, then "Create New Version" and apply any desired augmentations. Once the version is generated, click "Export Dataset" and choose the YOLO11 format. Follow this process here.
How can I integrate and deploy YOLO11 models with Roboflow?
Integrate and deploy YOLO11 models on Roboflow by uploading your YOLO11 weights through a few lines of Python code. Use the provided script to authenticate and upload your model, which will create an API for deployment. For details on the script and further instructions, see this section.
What tools does Roboflow provide for evaluating YOLO11 models?
Roboflow 提供模型评估工具,包括混淆矩阵和矢量分析图。通过模型页面上的 "查看详细评估 "按钮访问这些工具。这些功能有助于发现模型性能问题并找到需要改进的地方。有关详细信息,请参阅本节。