From b648cb564c53dd96f12d89944dc9c14abec347c8 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex <87703623+robot-ci-heartex@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:30:55 +0400 Subject: [PATCH] docs: Update label-studio-ml-backend docs (#6450) Co-authored-by: makseq Co-authored-by: Caitlin Wheeless Co-authored-by: caitlinwheeless --- docs/source/tutorials/yolo.md | 39 ++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/docs/source/tutorials/yolo.md b/docs/source/tutorials/yolo.md index 280d5ddd3d8..7bcab226901 100644 --- a/docs/source/tutorials/yolo.md +++ b/docs/source/tutorials/yolo.md @@ -214,13 +214,23 @@ Here is an example of a prompt for this. It includes 1000 labels from YOLOv8 cla -## YOLOv5 and other YOLO versions +## Supported YOLO Versions: YOLOv5, YOLO11, and others -YOLOv8 models have been successfully tested with this ML backend. +- **YOLOv5**: This model is supported for object detection tasks. Make sure to specify `model_path="yolov5nu.pt"` (don't forget the **`u`**) to use the YOLOv5 model. + +- **YOLOv8**: These models have been successfully tested with the current ML backend. Check the full list of [v8 models here](https://docs.ultralytics.com/models/yolov8/#supported-tasks-and-modes). + +- **YOLO11**: YOLO11 models have also been successfully tested with this ML backend. Check the full list of [v11 models here](https://docs.ultralytics.com/models/yolo11/#supported-tasks-and-modes). + + **Warning 1**: You must upgrade the `ultralytics` package to the latest version (`pip install -U ultralytics`) or rebuild the ML backend Docker from scratch (`docker-compose build --no-cache`) if you used it before the latest Ultralytics update on **Monday, September 30, 2024**. + + **Warning 2**: YOLO11 models do not use the `v` in their naming convention. For example, use **`yolo11n.pt`** instead of `yolov11n.pt`, unlike the naming convention in YOLOv8. + +- For a full list of supported YOLO versions and models, refer to the Ultralytics documentation: + [Ultralytics Supported YOLO Models](https://docs.ultralytics.com/models/) + + **Note**: Some YOLO models listed in the Ultralytics documentation have not been tested with this ML backend, but they might still work. -Attempts to run YOLOv5 were unsuccessful without modifications. -It may be possible to run it by applying some changes, such as installing additional dependencies. -The same applies to other YOLO models. ## Your own custom YOLO models @@ -239,6 +249,22 @@ You can load your own YOLO labels using the following steps: You can integrate your own custom-trained YOLOv8 models with the YOLO ML backend for Label Studio. Follow these detailed steps to set up your custom model in the ML backend Docker: +### Step 0: Install Label Studio and clone this Github repository + +1. Install and run Label Studio (or see [more ways here](https://labelstud.io/guide/install)). + +``` +pip install label-studio +label-studio +``` + +2. Clone the Label Studio ML backend repository and go to the `yolo` example folder: + +``` +git clone https://github.com/HumanSignal/label-studio-ml-backend.git +cd label-studio-ml-backend/examples/yolo +``` + ### Step 1: Prepare your custom YOLOv8 model Ensure that your custom YOLOv8 model is saved as a `.pt` file, which is the standard format for PyTorch models. @@ -804,7 +830,6 @@ There are two modes available: - **Trainable:** In the [trainable mode](https://github.com/HumanSignal/label-studio-ml-backend/blob/master/label_studio_ml/examples/yolo/README_TIMELINE_LABELS.md), the model can be trained on custom labels and annotations submitted in Label Studio using few-shot learning as training is performed on a small number of annotations. -
### Labeling config @@ -965,4 +990,4 @@ LOG_LEVEL=DEBUG python cli.py --ls-url http://localhost:8080 --ls-api-key YOUR_A ## For developers -The architecture of the project and development guidelines are described in the [README_DEVELOP.md](https://github.com/HumanSignal/label-studio-ml-backend/blob/master/label_studio_ml/examples/yolo/README_DEVELOP.md) file. \ No newline at end of file +The architecture of the project and development guidelines are described in the [README_DEVELOP.md](https://github.com/HumanSignal/label-studio-ml-backend/blob/master/label_studio_ml/examples/yolo/README_DEVELOP.md) file.