ultralytics 8.3.28 new Solutions CLI commands (#17233)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
d049e22769
commit
3c976807b8
17 changed files with 310 additions and 48 deletions
|
|
@ -33,9 +33,21 @@ This guide provides a comprehensive overview of three fundamental types of [data
|
|||
- Bar plots, on the other hand, are suitable for comparing quantities across different categories and showing relationships between a category and its numerical value.
|
||||
- Lastly, pie charts are effective for illustrating proportions among categories and showing parts of a whole.
|
||||
|
||||
!!! analytics "Analytics Examples"
|
||||
!!! example "Analytics Examples"
|
||||
|
||||
=== "Line Graph"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo solutions analytics show=True
|
||||
|
||||
# pass the source
|
||||
yolo solutions analytics source="path/to/video/file.mp4"
|
||||
|
||||
# generate the pie chart
|
||||
yolo solutions analytics analytics_type="pie" show=True
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -36,7 +36,20 @@ A heatmap generated with [Ultralytics YOLO11](https://github.com/ultralytics/ult
|
|||
|
||||
!!! example "Heatmaps using Ultralytics YOLO11 Example"
|
||||
|
||||
=== "Heatmap"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Run a heatmap example
|
||||
yolo solutions heatmap show=True
|
||||
|
||||
# Pass a source video
|
||||
yolo solutions heatmap source="path/to/video/file.mp4"
|
||||
|
||||
# Pass a custom colormap
|
||||
yolo solutions heatmap colormap=cv2.COLORMAP_INFERNO
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -48,7 +48,20 @@ Object counting with [Ultralytics YOLO11](https://github.com/ultralytics/ultraly
|
|||
|
||||
!!! example "Object Counting using YOLO11 Example"
|
||||
|
||||
=== "Count in Region"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Run a counting example
|
||||
yolo solutions count show=True
|
||||
|
||||
# Pass a source video
|
||||
yolo solutions count source="path/to/video/file.mp4"
|
||||
|
||||
# Pass region coordinates
|
||||
yolo solutions count region=[(20, 400), (1080, 404), (1080, 360), (20, 360)]
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -35,7 +35,20 @@ Queue management using [Ultralytics YOLO11](https://github.com/ultralytics/ultra
|
|||
|
||||
!!! example "Queue Management using YOLO11 Example"
|
||||
|
||||
=== "Queue Manager"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Run a queue example
|
||||
yolo solutions queue show=True
|
||||
|
||||
# Pass a source video
|
||||
yolo solutions queue source="path/to/video/file.mp4"
|
||||
|
||||
# Pass queue coordinates
|
||||
yolo solutions queue region=[(20, 400), (1080, 404), (1080, 360), (20, 360)]
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -40,7 +40,20 @@ keywords: Ultralytics YOLO11, speed estimation, object tracking, computer vision
|
|||
|
||||
!!! example "Speed Estimation using YOLO11 Example"
|
||||
|
||||
=== "Speed Estimation"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Run a speed example
|
||||
yolo solutions speed show=True
|
||||
|
||||
# Pass a source video
|
||||
yolo solutions speed source="path/to/video/file.mp4"
|
||||
|
||||
# Pass region coordinates
|
||||
yolo solutions speed region=[(20, 400), (1080, 404), (1080, 360), (20, 360)]
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -36,7 +36,20 @@ Monitoring workouts through pose estimation with [Ultralytics YOLO11](https://gi
|
|||
|
||||
!!! example "Workouts Monitoring Example"
|
||||
|
||||
=== "Workouts Monitoring"
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Run a workout example
|
||||
yolo solutions workout show=True
|
||||
|
||||
# Pass a source video
|
||||
yolo solutions workout source="path/to/video/file.mp4"
|
||||
|
||||
# Use keypoints for pushups
|
||||
yolo solutions queue kpts=[6, 8, 10]
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ keywords: Albumentations, YOLO11, data augmentation, Ultralytics, computer visio
|
|||
|
||||
When you are building [computer vision models](../models/index.md), the quality and variety of your [training data](../datasets/index.md) can play a big role in how well your model performs. Albumentations offers a fast, flexible, and efficient way to apply a wide range of image transformations that can improve your model's ability to adapt to real-world scenarios. It easily integrates with [Ultralytics YOLO11](https://github.com/ultralytics/ultralytics) and can help you create robust datasets for [object detection](../tasks/detect.md), [segmentation](../tasks/segment.md), and [classification](../tasks/classify.md) tasks.
|
||||
|
||||
By using Albumentations, you can boost your YOLO11 training data with techniques like geometric transformations and color adjustments. In this article, we’ll see how Albumentations can improve your [data augmentation](../guides/preprocessing_annotated_data.md) process and make your [YOLO11 projects](../solutions/index.md) even more impactful. Let’s get started!
|
||||
By using Albumentations, you can boost your YOLO11 training data with techniques like geometric transformations and color adjustments. In this article, we'll see how Albumentations can improve your [data augmentation](../guides/preprocessing_annotated_data.md) process and make your [YOLO11 projects](../solutions/index.md) even more impactful. Let's get started!
|
||||
|
||||
## Albumentations for Image Augmentation
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ Albumentations offers many useful features that simplify complex image augmentat
|
|||
|
||||
With respect to image augmentation, Albumentations stands out as a reliable tool for computer vision tasks. Here are a few key reasons why you should consider using it for your Vision AI projects:
|
||||
|
||||
- **Easy-to-Use API**: Albumentations provides a single, straightforward API for applying a wide range of augmentations to images, masks, bounding boxes, and keypoints. It’s designed to adapt easily to different datasets, making [data preparation](../guides/data-collection-and-annotation.md) simpler and more efficient.
|
||||
- **Easy-to-Use API**: Albumentations provides a single, straightforward API for applying a wide range of augmentations to images, masks, bounding boxes, and keypoints. It's designed to adapt easily to different datasets, making [data preparation](../guides/data-collection-and-annotation.md) simpler and more efficient.
|
||||
|
||||
- **Rigorous Bug Testing**: Bugs in the augmentation pipeline can silently corrupt input data, often going unnoticed but ultimately degrading model performance. Albumentations addresses this with a thorough test suite that helps catch bugs early in development.
|
||||
|
||||
|
|
@ -48,11 +48,11 @@ With respect to image augmentation, Albumentations stands out as a reliable tool
|
|||
|
||||
## How to Use Albumentations to Augment Data for YOLO11 Training
|
||||
|
||||
Now that we’ve covered what Albumentations is and what it can do, let’s look at how to use it to augment your data for YOLO11 model training. It’s easy to set up because it integrates directly into [Ultralytics’ training mode](../modes/train.md) and applies automatically if you have the Albumentations package installed.
|
||||
Now that we've covered what Albumentations is and what it can do, let's look at how to use it to augment your data for YOLO11 model training. It's easy to set up because it integrates directly into [Ultralytics' training mode](../modes/train.md) and applies automatically if you have the Albumentations package installed.
|
||||
|
||||
### Installation
|
||||
|
||||
To use Albumentations with YOLOv11, start by making sure you have the necessary packages installed. If Albumentations isn’t installed, the augmentations won’t be applied during training. Once set up, you’ll be ready to create an augmented dataset for training, with Albumentations integrated to enhance your model automatically.
|
||||
To use Albumentations with YOLOv11, start by making sure you have the necessary packages installed. If Albumentations isn't installed, the augmentations won't be applied during training. Once set up, you'll be ready to create an augmented dataset for training, with Albumentations integrated to enhance your model automatically.
|
||||
|
||||
!!! tip "Installation"
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ For detailed instructions and best practices related to the installation process
|
|||
|
||||
### Usage
|
||||
|
||||
After installing the necessary packages, you’re ready to start using Albumentations with YOLO11. When you train YOLOv11, a set of augmentations is automatically applied through its integration with Albumentations, making it easy to enhance your model’s performance.
|
||||
After installing the necessary packages, you're ready to start using Albumentations with YOLO11. When you train YOLOv11, a set of augmentations is automatically applied through its integration with Albumentations, making it easy to enhance your model's performance.
|
||||
|
||||
!!! example "Usage"
|
||||
|
||||
|
|
@ -83,17 +83,17 @@ After installing the necessary packages, you’re ready to start using Albumenta
|
|||
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
|
||||
```
|
||||
|
||||
Next, let’s take look a closer look at the specific augmentations that are applied during training.
|
||||
Next, let's take look a closer look at the specific augmentations that are applied during training.
|
||||
|
||||
### Blur
|
||||
|
||||
The Blur transformation in Albumentations applies a simple blur effect to the image by averaging pixel values within a small square area, or kernel. This is done using OpenCV’s `cv2.blur` function, which helps reduce noise in the image, though it also slightly reduces image details.
|
||||
The Blur transformation in Albumentations applies a simple blur effect to the image by averaging pixel values within a small square area, or kernel. This is done using OpenCV's `cv2.blur` function, which helps reduce noise in the image, though it also slightly reduces image details.
|
||||
|
||||
Here are the parameters and values used in this integration:
|
||||
|
||||
- **blur_limit**: This controls the size range of the blur effect. The default range is (3, 7), meaning the kernel size for the blur can vary between 3 and 7 pixels, with only odd numbers allowed to keep the blur centered.
|
||||
|
||||
- **p**: The probability of applying the blur. In the integration, p=0.01, so there’s a 1% chance that this blur will be applied to each image. The low probability allows for occasional blur effects, introducing a bit of variation to help the model generalize without over-blurring the images.
|
||||
- **p**: The probability of applying the blur. In the integration, p=0.01, so there's a 1% chance that this blur will be applied to each image. The low probability allows for occasional blur effects, introducing a bit of variation to help the model generalize without over-blurring the images.
|
||||
|
||||
<img width="776" alt="An Example of the Blur Augmentation" src="https://github.com/ultralytics/docs/releases/download/0/albumentations-blur.avif">
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ The ToGray transformation in Albumentations converts an image to grayscale, redu
|
|||
|
||||
Here are the parameters and values used in this integration:
|
||||
|
||||
- **num_output_channels**: Sets the number of channels in the output image. If this value is more than 1, the single grayscale channel will be replicated to create a multi-channel grayscale image. By default, it’s set to 3, giving a grayscale image with three identical channels.
|
||||
- **num_output_channels**: Sets the number of channels in the output image. If this value is more than 1, the single grayscale channel will be replicated to create a multi-channel grayscale image. By default, it's set to 3, giving a grayscale image with three identical channels.
|
||||
|
||||
- **method**: Defines the grayscale conversion method. The default method, "weighted_average", applies a formula (0.299R + 0.587G + 0.114B) that closely aligns with human perception, providing a natural-looking grayscale effect. Other options, like "from_lab", "desaturation", "average", "max", and "pca", offer alternative ways to create grayscale images based on various needs for speed, brightness emphasis, or detail preservation.
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@ keywords: Ultralytics, YOLO, configuration, cfg2dict, get_cfg, check_cfg, save_d
|
|||
|
||||
<br><br><hr><br>
|
||||
|
||||
## ::: ultralytics.cfg.handle_yolo_solutions
|
||||
|
||||
<br><br><hr><br>
|
||||
|
||||
## ::: ultralytics.cfg.handle_streamlit_inference
|
||||
|
||||
<br><br><hr><br>
|
||||
|
|
|
|||
|
|
@ -14,21 +14,39 @@ Ultralytics Solutions provide cutting-edge applications of YOLO models, offering
|
|||
|
||||
Here's our curated list of Ultralytics solutions that can be used to create awesome [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) projects.
|
||||
|
||||
- [Object Counting](../guides/object-counting.md) 🚀 NEW: Learn to perform real-time object counting with YOLO11. Gain the expertise to accurately count objects in live video streams.
|
||||
- [Object Cropping](../guides/object-cropping.md) 🚀 NEW: Master object cropping with YOLO11 for precise extraction of objects from images and videos.
|
||||
- [Object Blurring](../guides/object-blurring.md) 🚀 NEW: Apply object blurring using YOLO11 to protect privacy in image and video processing.
|
||||
- [Workouts Monitoring](../guides/workouts-monitoring.md) 🚀 NEW: Discover how to monitor workouts using YOLO11. Learn to track and analyze various fitness routines in real time.
|
||||
- [Objects Counting in Regions](../guides/region-counting.md) 🚀 NEW: Count objects in specific regions using YOLO11 for accurate detection in varied areas.
|
||||
- [Security Alarm System](../guides/security-alarm-system.md) 🚀 NEW: Create a security alarm system with YOLO11 that triggers alerts upon detecting new objects. Customize the system to fit your specific needs.
|
||||
- [Heatmaps](../guides/heatmaps.md) 🚀 NEW: Utilize detection heatmaps to visualize data intensity across a matrix, providing clear insights in computer vision tasks.
|
||||
- [Object Counting](../guides/object-counting.md) 🚀: Learn to perform real-time object counting with YOLO11. Gain the expertise to accurately count objects in live video streams.
|
||||
- [Object Cropping](../guides/object-cropping.md) 🚀: Master object cropping with YOLO11 for precise extraction of objects from images and videos.
|
||||
- [Object Blurring](../guides/object-blurring.md) 🚀: Apply object blurring using YOLO11 to protect privacy in image and video processing.
|
||||
- [Workouts Monitoring](../guides/workouts-monitoring.md) 🚀: Discover how to monitor workouts using YOLO11. Learn to track and analyze various fitness routines in real time.
|
||||
- [Objects Counting in Regions](../guides/region-counting.md) 🚀: Count objects in specific regions using YOLO11 for accurate detection in varied areas.
|
||||
- [Security Alarm System](../guides/security-alarm-system.md) 🚀: Create a security alarm system with YOLO11 that triggers alerts upon detecting new objects. Customize the system to fit your specific needs.
|
||||
- [Heatmaps](../guides/heatmaps.md) 🚀: Utilize detection heatmaps to visualize data intensity across a matrix, providing clear insights in computer vision tasks.
|
||||
- [Instance Segmentation with Object Tracking](../guides/instance-segmentation-and-tracking.md) 🚀 NEW: Implement [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation) and object tracking with YOLO11 to achieve precise object boundaries and continuous monitoring.
|
||||
- [VisionEye View Objects Mapping](../guides/vision-eye.md) 🚀 NEW: Develop systems that mimic human eye focus on specific objects, enhancing the computer's ability to discern and prioritize details.
|
||||
- [Speed Estimation](../guides/speed-estimation.md) 🚀 NEW: Estimate object speed using YOLO11 and object tracking techniques, crucial for applications like autonomous vehicles and traffic monitoring.
|
||||
- [Distance Calculation](../guides/distance-calculation.md) 🚀 NEW: Calculate distances between objects using [bounding box](https://www.ultralytics.com/glossary/bounding-box) centroids in YOLO11, essential for spatial analysis.
|
||||
- [Queue Management](../guides/queue-management.md) 🚀 NEW: Implement efficient queue management systems to minimize wait times and improve productivity using YOLO11.
|
||||
- [Parking Management](../guides/parking-management.md) 🚀 NEW: Organize and direct vehicle flow in parking areas with YOLO11, optimizing space utilization and user experience.
|
||||
- [VisionEye View Objects Mapping](../guides/vision-eye.md) 🚀: Develop systems that mimic human eye focus on specific objects, enhancing the computer's ability to discern and prioritize details.
|
||||
- [Speed Estimation](../guides/speed-estimation.md) 🚀: Estimate object speed using YOLO11 and object tracking techniques, crucial for applications like autonomous vehicles and traffic monitoring.
|
||||
- [Distance Calculation](../guides/distance-calculation.md) 🚀: Calculate distances between objects using [bounding box](https://www.ultralytics.com/glossary/bounding-box) centroids in YOLO11, essential for spatial analysis.
|
||||
- [Queue Management](../guides/queue-management.md) 🚀: Implement efficient queue management systems to minimize wait times and improve productivity using YOLO11.
|
||||
- [Parking Management](../guides/parking-management.md) 🚀: Organize and direct vehicle flow in parking areas with YOLO11, optimizing space utilization and user experience.
|
||||
- [Analytics](../guides/analytics.md) 📊 NEW: Conduct comprehensive data analysis to discover patterns and make informed decisions, leveraging YOLO11 for descriptive, predictive, and prescriptive analytics.
|
||||
- [Live Inference with Streamlit](../guides/streamlit-live-inference.md) 🚀 NEW: Leverage the power of YOLO11 for real-time [object detection](https://www.ultralytics.com/glossary/object-detection) directly through your web browser with a user-friendly Streamlit interface.
|
||||
- [Live Inference with Streamlit](../guides/streamlit-live-inference.md) 🚀: Leverage the power of YOLO11 for real-time [object detection](https://www.ultralytics.com/glossary/object-detection) directly through your web browser with a user-friendly Streamlit interface.
|
||||
|
||||
## Solutions Usage
|
||||
|
||||
!!! tip "Command Info"
|
||||
|
||||
`yolo SOLUTIONS SOLUTION_NAME ARGS`
|
||||
|
||||
- **SOLUTIONS** is a required keyword.
|
||||
- **SOLUTION_NAME** (optional) is one of: `['count', 'heatmap', 'queue', 'speed', 'workout', 'analytics']`.
|
||||
- **ARGS** (optional) are custom `arg=value` pairs, such as `show_in=True`, to override default settings.
|
||||
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo solutions count show=True # for object counting
|
||||
|
||||
yolo solutions source="path/to/video/file.mp4" # specify video file path
|
||||
```
|
||||
|
||||
## Contribute to Our Solutions
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@
|
|||
17316848+maianumerosky@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/17316848?v=4
|
||||
username: maianumerosky
|
||||
25704330+JairajJangle@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/25704330?v=4
|
||||
username: JairajJangle
|
||||
32206511+Y-T-G@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/32206511?v=4
|
||||
username: Y-T-G
|
||||
|
|
@ -40,6 +43,9 @@
|
|||
40165666+berry-ding@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/40165666?v=4
|
||||
username: berry-ding
|
||||
44016758+M-Amrollahi@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/44016758?v=4
|
||||
username: M-Amrollahi
|
||||
46103969+inisis@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/46103969?v=4
|
||||
username: inisis
|
||||
|
|
@ -76,6 +82,9 @@
|
|||
79740115+0xSynapse@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/79740115?v=4
|
||||
username: 0xSynapse
|
||||
8401806+wangzhaode@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/8401806?v=4
|
||||
username: wangzhaode
|
||||
91465467+lalayants@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/91465467?v=4
|
||||
username: lalayants
|
||||
|
|
@ -97,6 +106,9 @@ ayush.chaurarsia@gmail.com:
|
|||
chr043416@gmail.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/62513924?v=4
|
||||
username: RizwanMunawar
|
||||
davis.justin@mssm.org:
|
||||
avatar: https://avatars.githubusercontent.com/u/23462437?v=4
|
||||
username: justincdavis
|
||||
glenn.jocher@ultralytics.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/26833433?v=4
|
||||
username: glenn-jocher
|
||||
|
|
@ -157,9 +169,3 @@ xinwang614@gmail.com:
|
|||
zhaode.wzd@alibaba-inc.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/8401806?v=4
|
||||
username: wangzhaode
|
||||
8401806+wangzhaode@users.noreply.github.com:
|
||||
avatar: https://avatars.githubusercontent.com/u/8401806?v=4
|
||||
username: wangzhaode
|
||||
davis.justin@mssm.org:
|
||||
avatar: https://avatars.githubusercontent.com/u/23462437?v=4
|
||||
username: justincdavis
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue