From a132920476b2d38bdd58c7a232888f425f476977 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 16 Nov 2024 20:08:34 +0100 Subject: [PATCH 1/4] Update links.yml to 900s delay (#17576) --- .github/workflows/links.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 1a0b3ca15c..b66a7d507b 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -32,7 +32,7 @@ jobs: uses: ultralytics/actions/retry@main with: timeout_minutes: 60 - retry_delay_seconds: 300 + retry_delay_seconds: 900 retries: 2 run: | lychee \ @@ -62,7 +62,7 @@ jobs: uses: ultralytics/actions/retry@main with: timeout_minutes: 60 - retry_delay_seconds: 300 + retry_delay_seconds: 900 retries: 2 run: | lychee \ From 1790ca0f88cc26b85bc249bf3cf6659e6abbe271 Mon Sep 17 00:00:00 2001 From: Jamil Dhanani Date: Sat, 16 Nov 2024 11:09:37 -0800 Subject: [PATCH 2/4] Fix: wandb reporting error if no positive examples (#17544) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- ultralytics/utils/callbacks/wb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/utils/callbacks/wb.py b/ultralytics/utils/callbacks/wb.py index b82b8d85ec..22bbc34756 100644 --- a/ultralytics/utils/callbacks/wb.py +++ b/ultralytics/utils/callbacks/wb.py @@ -138,7 +138,7 @@ def on_train_end(trainer): art.add_file(trainer.best) wb.run.log_artifact(art, aliases=["best"]) # Check if we actually have plots to save - if trainer.args.plots: + if trainer.args.plots and hasattr(trainer.validator.metrics, "curves_results"): for curve_name, curve_values in zip(trainer.validator.metrics.curves, trainer.validator.metrics.curves_results): x, y, x_title, y_title = curve_values _plot_curve( From e48a42ec5dbbed3b3a8a95e6ab10ab0eeea4e518 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Sun, 17 Nov 2024 00:12:10 +0500 Subject: [PATCH 3/4] `ultralytics 8.3.32` New Dog-Pose dataset (#17556) Co-authored-by: Glenn Jocher --- docs/en/datasets/index.md | 1 + docs/en/datasets/pose/dog-pose.md | 141 +++++++++++++++++++++++++ docs/en/datasets/pose/index.md | 9 ++ mkdocs.yml | 1 + ultralytics/__init__.py | 2 +- ultralytics/cfg/datasets/dog-pose.yaml | 23 ++++ 6 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 docs/en/datasets/pose/dog-pose.md create mode 100644 ultralytics/cfg/datasets/dog-pose.yaml diff --git a/docs/en/datasets/index.md b/docs/en/datasets/index.md index 5f165b2477..38f219242c 100644 --- a/docs/en/datasets/index.md +++ b/docs/en/datasets/index.md @@ -74,6 +74,7 @@ Pose estimation is a technique used to determine the pose of the object relative - [COCO8-pose](pose/coco8-pose.md): A smaller dataset for pose estimation tasks, containing a subset of 8 COCO images with human pose annotations. - [Tiger-pose](pose/tiger-pose.md): A compact dataset consisting of 263 images focused on tigers, annotated with 12 keypoints per tiger for pose estimation tasks. - [Hand-Keypoints](pose/hand-keypoints.md): A concise dataset featuring over 26,000 images centered on human hands, annotated with 21 keypoints per hand, designed for pose estimation tasks. +- [Dog-pose](pose/dog-pose.md): A comprehensive dataset featuring approximately 6,000 images focused on dogs, annotated with 24 keypoints per dog, tailored for pose estimation tasks. ## [Classification](classify/index.md) diff --git a/docs/en/datasets/pose/dog-pose.md b/docs/en/datasets/pose/dog-pose.md new file mode 100644 index 0000000000..fa6acb0755 --- /dev/null +++ b/docs/en/datasets/pose/dog-pose.md @@ -0,0 +1,141 @@ +--- +comments: true +description: Discover the Dog-Pose dataset for pose detection. Featuring 6,773 training and 1,703 test images, it's a robust dataset for training YOLO11 models. +keywords: Dog-Pose, Ultralytics, pose detection dataset, YOLO11, machine learning, computer vision, training data +--- + +# Dog-Pose Dataset + +## Introduction + +The [Ultralytics](https://www.ultralytics.com/) Dog-pose dataset is a high-quality and extensive dataset specifically curated for dog keypoint estimation. With 6,773 training images and 1,703 test images, this dataset provides a solid foundation for training robust pose estimation models. Each annotated image includes 24 keypoints with 3 dimensions per keypoint (x, y, visibility), making it a valuable resource for advanced research and development in computer vision. + +Ultralytics Dog-pose display image + +This dataset is intended for use with Ultralytics [HUB](https://hub.ultralytics.com/) and [YOLO11](https://github.com/ultralytics/ultralytics). + +## Dataset YAML + +A YAML (Yet Another Markup Language) file is used to define the dataset configuration. It includes paths, keypoint details, and other relevant information. In the case of the Dog-pose dataset, The `dog-pose.yaml` is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dog-pose.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dog-pose.yaml). + +!!! example "ultralytics/cfg/datasets/dog-pose.yaml" + + ```yaml + --8<-- "ultralytics/cfg/datasets/dog-pose.yaml" + ``` + +## Usage + +To train a YOLO11n-pose model on the Dog-pose dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. + +!!! example "Train Example" + + === "Python" + + ```python + from ultralytics import YOLO + + # Load a model + model = YOLO("yolo11n-pose.pt") # load a pretrained model (recommended for training) + + # Train the model + results = model.train(data="dog-pose.yaml", epochs=100, imgsz=640) + ``` + + === "CLI" + + ```bash + # Start training from a pretrained *.pt model + yolo pose train data=dog-pose.yaml model=yolo11n-pose.pt epochs=100 imgsz=640 + ``` + +## Sample Images and Annotations + +Here are some examples of images from the Dog-pose dataset, along with their corresponding annotations: + +Dataset sample image + +- **Mosaiced Image**: This image demonstrates a training batch composed of mosaiced dataset images. Mosaicing is a technique used during training that combines multiple images into a single image to increase the variety of objects and scenes within each training batch. This helps improve the model's ability to generalize to different object sizes, aspect ratios, and contexts. + +The example showcases the variety and complexity of the images in the Dog-pose dataset and the benefits of using mosaicing during the training process. + +## Citations and Acknowledgments + +If you use the Dog-pose dataset in your research or development work, please cite the following paper: + +!!! quote "" + + === "BibTeX" + + ```bibtex + @inproceedings{khosla2011fgvc, + title={Novel dataset for Fine-Grained Image Categorization}, + author={Aditya Khosla and Nityananda Jayadevaprakash and Bangpeng Yao and Li Fei-Fei}, + booktitle={First Workshop on Fine-Grained Visual Categorization (FGVC), IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, + year={2011} + } + @inproceedings{deng2009imagenet, + title={ImageNet: A Large-Scale Hierarchical Image Database}, + author={Jia Deng and Wei Dong and Richard Socher and Li-Jia Li and Kai Li and Li Fei-Fei}, + booktitle={IEEE Computer Vision and Pattern Recognition (CVPR)}, + year={2009} + } + ``` + +We would like to acknowledge the Stanford team for creating and maintaining this valuable resource for the [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) community. For more information about the Dog-pose dataset and its creators, visit the [Stanford Dogs Dataset website](http://vision.stanford.edu/aditya86/ImageNetDogs/). + +## FAQ + +### What is the Dog-pose dataset, and how is it used with Ultralytics YOLO11? + +The Dog-Pose dataset features 6,000 images annotated with 17 keypoints for dog pose estimation. Ideal for training and validating models with [Ultralytics YOLO11](https://docs.ultralytics.com/models/yolo11/), it supports applications like animal behavior analysis and veterinary studies. + +### How do I train a YOLO11 model using the Dog-pose dataset in Ultralytics? + +To train a YOLO11n-pose model on the Dog-pose dataset for 100 epochs with an image size of 640, follow these examples: + +!!! example "Train Example" + + === "Python" + + ```python + from ultralytics import YOLO + + # Load a model + model = YOLO("yolo11n-pose.pt") + + # Train the model + results = model.train(data="dog-pose.yaml", epochs=100, imgsz=640) + ``` + + === "CLI" + + ```bash + yolo pose train data=dog-pose.yaml model=yolo11n-pose.pt epochs=100 imgsz=640 + ``` + +For a comprehensive list of training arguments, refer to the model [Training](../../modes/train.md) page. + +### What are the benefits of using the Dog-pose dataset? + +The Dog-pose dataset offers several benefits: + +**Large and Diverse Dataset**: With 6,000 images, it provides a substantial amount of data covering a wide range of dog poses, breeds, and contexts, enabling robust model training and evaluation. + +**Pose-specific Annotations**: Offers detailed annotations for pose estimation, ensuring high-quality data for training pose detection models. + +**Real-World Scenarios**: Includes images from varied environments, enhancing the model's ability to generalize to real-world applications. + +**Model Performance Improvement**: The diversity and scale of the dataset help improve model accuracy and robustness, particularly for tasks involving fine-grained pose estimation. + +For more about its features and usage, see the [Dataset Introduction](#introduction) section. + +### How does mosaicing benefit the YOLO11 training process using the Dog-pose dataset? + +Mosaicing, as illustrated in the sample images from the Dog-pose dataset, merges multiple images into a single composite, enriching the diversity of objects and scenes in each training batch. This approach enhances the model's capacity to generalize across different object sizes, aspect ratios, and contexts, leading to improved performance. For example images, refer to the [Sample Images and Annotations](#sample-images-and-annotations) section. + +### Where can I find the Dog-pose dataset YAML file and how do I use it? + +The Dog-pose dataset YAML file can be found [here](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dog-pose.yaml). This file defines the dataset configuration, including paths, classes, and other relevant information. Use this file with the YOLO11 training scripts as mentioned in the [Train Example](#how-do-i-train-a-yolo11-model-using-the-dog-pose-dataset-in-ultralytics) section. + +For more FAQs and detailed documentation, visit the [Ultralytics Documentation](https://docs.ultralytics.com/). diff --git a/docs/en/datasets/pose/index.md b/docs/en/datasets/pose/index.md index 296b74f831..321bb9c128 100644 --- a/docs/en/datasets/pose/index.md +++ b/docs/en/datasets/pose/index.md @@ -127,6 +127,15 @@ This section outlines the datasets that are compatible with Ultralytics YOLO for - **Usage**: Great for human hand pose estimation. - [Read more about Hand Keypoints](hand-keypoints.md) +### Dog-Pose + +- **Description**: The Dog Pose dataset contains approximately 6,000 images, providing a diverse and extensive resource for training and validation of dog pose estimation models. +- **Label Format**: Follows the Ultralytics YOLO format, with annotations for multiple keypoints specific to dog anatomy. +- **Number of Classes**: 1 (Dog). +- **Keypoints**: Includes 24 keypoints tailored to dog poses, such as limbs, joints, and head positions. +- **Usage**: Ideal for training models to estimate dog poses in various scenarios, from research to real-world applications. +- [Read more about Dog-Pose](dog-pose.md) + ### Adding your own dataset If you have your own dataset and would like to use it for training pose estimation models with Ultralytics YOLO format, ensure that it follows the format specified above under "Ultralytics YOLO format". Convert your annotations to the required format and specify the paths, number of classes, and class names in the YAML configuration file. diff --git a/mkdocs.yml b/mkdocs.yml index 33bbbc3036..a92743fab1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -291,6 +291,7 @@ nav: - COCO8-pose: datasets/pose/coco8-pose.md - Tiger-pose: datasets/pose/tiger-pose.md - Hand-keypoints: datasets/pose/hand-keypoints.md + - Dog-pose: datasets/pose/dog-pose.md - Classification: - datasets/classify/index.md - Caltech 101: datasets/classify/caltech101.md diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index ac2c604fd7..160ace687f 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.31" +__version__ = "8.3.32" import os diff --git a/ultralytics/cfg/datasets/dog-pose.yaml b/ultralytics/cfg/datasets/dog-pose.yaml new file mode 100644 index 0000000000..4dab70a59d --- /dev/null +++ b/ultralytics/cfg/datasets/dog-pose.yaml @@ -0,0 +1,23 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# Dogs dataset http://vision.stanford.edu/aditya86/ImageNetDogs/ by Stanford +# Documentation: https://docs.ultralytics.com/datasets/pose/dog-pose/ +# Example usage: yolo train data=dog-pose.yaml +# parent +# ├── ultralytics +# └── datasets +# └── dog-pose ← downloads here (337 MB) + +# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] +path: ../datasets/dog-pose # dataset root dir +train: train # train images (relative to 'path') 6773 images +val: val # val images (relative to 'path') 1703 images + +# Keypoints +kpt_shape: [24, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible) + +# Classes +names: + 0: dog + +# Download script/URL (optional) +download: https://github.com/ultralytics/assets/releases/download/v0.0.0/dog-pose.zip From 2ccec61b5856614b3a230d16cf80c0af894b9ce1 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Mon, 18 Nov 2024 05:32:39 +0800 Subject: [PATCH 4/4] Update `retina_masks` description (#17587) Co-authored-by: UltralyticsAssistant --- docs/en/macros/predict-args.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/macros/predict-args.md b/docs/en/macros/predict-args.md index 091e692a69..b40650d49a 100644 --- a/docs/en/macros/predict-args.md +++ b/docs/en/macros/predict-args.md @@ -13,7 +13,7 @@ | `augment` | `bool` | `False` | Enables test-time augmentation (TTA) for predictions, potentially improving detection robustness at the cost of inference speed. | | `agnostic_nms` | `bool` | `False` | Enables class-agnostic Non-Maximum Suppression (NMS), which merges overlapping boxes of different classes. Useful in multi-class detection scenarios where class overlap is common. | | `classes` | `list[int]` | `None` | Filters predictions to a set of class IDs. Only detections belonging to the specified classes will be returned. Useful for focusing on relevant objects in multi-class detection tasks. | -| `retina_masks` | `bool` | `False` | Uses high-resolution segmentation masks if available in the model. This can enhance mask quality for segmentation tasks, providing finer detail. | +| `retina_masks` | `bool` | `False` | Returns high-resolution segmentation masks. The returned masks (`masks.data`) will match the original image size if enabled. If disabled, they have the image size used during inference. | | `embed` | `list[int]` | `None` | Specifies the layers from which to extract feature vectors or [embeddings](https://www.ultralytics.com/glossary/embeddings). Useful for downstream tasks like clustering or similarity search. | | `project` | `str` | `None` | Name of the project directory where prediction outputs are saved if `save` is enabled. | | `name` | `str` | `None` | Name of the prediction run. Used for creating a subdirectory within the project folder, where prediction outputs are stored if `save` is enabled. |