Update YOLO11 Actions and Docs (#16596)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
51e93d6111
commit
97f38409fb
124 changed files with 1948 additions and 1948 deletions
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
comments: true
|
||||
description: Learn to accurately identify and count objects in real-time using Ultralytics YOLOv8 for applications like crowd analysis and surveillance.
|
||||
keywords: object counting, YOLOv8, Ultralytics, real-time object detection, AI, deep learning, object tracking, crowd analysis, surveillance, resource optimization
|
||||
description: Learn to accurately identify and count objects in real-time using Ultralytics YOLO11 for applications like crowd analysis and surveillance.
|
||||
keywords: object counting, YOLO11, Ultralytics, real-time object detection, AI, deep learning, object tracking, crowd analysis, surveillance, resource optimization
|
||||
---
|
||||
|
||||
# Object Counting using Ultralytics YOLOv8
|
||||
# Object Counting using Ultralytics YOLO11
|
||||
|
||||
## What is Object Counting?
|
||||
|
||||
Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics/) involves accurate identification and counting of specific objects in videos and camera streams. YOLOv8 excels in real-time applications, providing efficient and precise object counting for various scenarios like crowd analysis and surveillance, thanks to its state-of-the-art algorithms and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) capabilities.
|
||||
Object counting with [Ultralytics YOLO11](https://github.com/ultralytics/ultralytics/) involves accurate identification and counting of specific objects in videos and camera streams. YOLO11 excels in real-time applications, providing efficient and precise object counting for various scenarios like crowd analysis and surveillance, thanks to its state-of-the-art algorithms and [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) capabilities.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
|
@ -19,7 +19,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
allowfullscreen>
|
||||
</iframe>
|
||||
<br>
|
||||
<strong>Watch:</strong> Object Counting using Ultralytics YOLOv8
|
||||
<strong>Watch:</strong> Object Counting using Ultralytics YOLO11
|
||||
</td>
|
||||
<td align="center">
|
||||
<iframe loading="lazy" width="720" height="405" src="https://www.youtube.com/embed/Fj9TStNBVoY"
|
||||
|
|
@ -28,7 +28,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
allowfullscreen>
|
||||
</iframe>
|
||||
<br>
|
||||
<strong>Watch:</strong> Class-wise Object Counting using Ultralytics YOLOv8
|
||||
<strong>Watch:</strong> Class-wise Object Counting using Ultralytics YOLO11
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -43,10 +43,10 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
| Logistics | Aquaculture |
|
||||
| :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
|  |  |
|
||||
| Conveyor Belt Packets Counting Using Ultralytics YOLOv8 | Fish Counting in Sea using Ultralytics YOLOv8 |
|
||||
|  |  |
|
||||
| Conveyor Belt Packets Counting Using Ultralytics YOLO11 | Fish Counting in Sea using Ultralytics YOLO11 |
|
||||
|
||||
!!! example "Object Counting using YOLOv8 Example"
|
||||
!!! example "Object Counting using YOLO11 Example"
|
||||
|
||||
=== "Count in Region"
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
from ultralytics import YOLO, solutions
|
||||
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
cap = cv2.VideoCapture("path/to/video/file.mp4")
|
||||
assert cap.isOpened(), "Error reading video file"
|
||||
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
|
||||
|
|
@ -97,7 +97,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
from ultralytics import YOLO, solutions
|
||||
|
||||
model = YOLO("yolov8n-obb.pt")
|
||||
model = YOLO("yolo11n-obb.pt")
|
||||
cap = cv2.VideoCapture("path/to/video/file.mp4")
|
||||
assert cap.isOpened(), "Error reading video file"
|
||||
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
|
||||
|
|
@ -137,7 +137,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
from ultralytics import YOLO, solutions
|
||||
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
cap = cv2.VideoCapture("path/to/video/file.mp4")
|
||||
assert cap.isOpened(), "Error reading video file"
|
||||
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
|
||||
|
|
@ -178,7 +178,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
from ultralytics import YOLO, solutions
|
||||
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
cap = cv2.VideoCapture("path/to/video/file.mp4")
|
||||
assert cap.isOpened(), "Error reading video file"
|
||||
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
|
||||
|
|
@ -219,7 +219,7 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
from ultralytics import YOLO, solutions
|
||||
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
cap = cv2.VideoCapture("path/to/video/file.mp4")
|
||||
assert cap.isOpened(), "Error reading video file"
|
||||
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
|
||||
|
|
@ -277,12 +277,12 @@ Here's a table with the `ObjectCounter` arguments:
|
|||
|
||||
## FAQ
|
||||
|
||||
### How do I count objects in a video using Ultralytics YOLOv8?
|
||||
### How do I count objects in a video using Ultralytics YOLO11?
|
||||
|
||||
To count objects in a video using Ultralytics YOLOv8, you can follow these steps:
|
||||
To count objects in a video using Ultralytics YOLO11, you can follow these steps:
|
||||
|
||||
1. Import the necessary libraries (`cv2`, `ultralytics`).
|
||||
2. Load a pretrained YOLOv8 model.
|
||||
2. Load a pretrained YOLO11 model.
|
||||
3. Define the counting region (e.g., a polygon, line, etc.).
|
||||
4. Set up the video capture and initialize the object counter.
|
||||
5. Process each frame to track objects and count them within the defined region.
|
||||
|
|
@ -321,14 +321,14 @@ def count_objects_in_region(video_path, output_video_path, model_path):
|
|||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
count_objects_in_region("path/to/video.mp4", "output_video.avi", "yolov8n.pt")
|
||||
count_objects_in_region("path/to/video.mp4", "output_video.avi", "yolo11n.pt")
|
||||
```
|
||||
|
||||
Explore more configurations and options in the [Object Counting](#object-counting-using-ultralytics-yolov8) section.
|
||||
Explore more configurations and options in the [Object Counting](#object-counting-using-ultralytics-yolo11) section.
|
||||
|
||||
### What are the advantages of using Ultralytics YOLOv8 for object counting?
|
||||
### What are the advantages of using Ultralytics YOLO11 for object counting?
|
||||
|
||||
Using Ultralytics YOLOv8 for object counting offers several advantages:
|
||||
Using Ultralytics YOLO11 for object counting offers several advantages:
|
||||
|
||||
1. **Resource Optimization:** It facilitates efficient resource management by providing accurate counts, helping optimize resource allocation in industries like inventory management.
|
||||
2. **Enhanced Security:** It enhances security and surveillance by accurately tracking and counting entities, aiding in proactive threat detection.
|
||||
|
|
@ -336,9 +336,9 @@ Using Ultralytics YOLOv8 for object counting offers several advantages:
|
|||
|
||||
For real-world applications and code examples, visit the [Advantages of Object Counting](#advantages-of-object-counting) section.
|
||||
|
||||
### How can I count specific classes of objects using Ultralytics YOLOv8?
|
||||
### How can I count specific classes of objects using Ultralytics YOLO11?
|
||||
|
||||
To count specific classes of objects using Ultralytics YOLOv8, you need to specify the classes you are interested in during the tracking phase. Below is a Python example:
|
||||
To count specific classes of objects using Ultralytics YOLO11, you need to specify the classes you are interested in during the tracking phase. Below is a Python example:
|
||||
|
||||
```python
|
||||
import cv2
|
||||
|
|
@ -372,27 +372,27 @@ def count_specific_classes(video_path, output_video_path, model_path, classes_to
|
|||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
count_specific_classes("path/to/video.mp4", "output_specific_classes.avi", "yolov8n.pt", [0, 2])
|
||||
count_specific_classes("path/to/video.mp4", "output_specific_classes.avi", "yolo11n.pt", [0, 2])
|
||||
```
|
||||
|
||||
In this example, `classes_to_count=[0, 2]`, which means it counts objects of class `0` and `2` (e.g., person and car).
|
||||
|
||||
### Why should I use YOLOv8 over other [object detection](https://www.ultralytics.com/glossary/object-detection) models for real-time applications?
|
||||
### Why should I use YOLO11 over other [object detection](https://www.ultralytics.com/glossary/object-detection) models for real-time applications?
|
||||
|
||||
Ultralytics YOLOv8 provides several advantages over other object detection models like Faster R-CNN, SSD, and previous YOLO versions:
|
||||
Ultralytics YOLO11 provides several advantages over other object detection models like Faster R-CNN, SSD, and previous YOLO versions:
|
||||
|
||||
1. **Speed and Efficiency:** YOLOv8 offers real-time processing capabilities, making it ideal for applications requiring high-speed inference, such as surveillance and autonomous driving.
|
||||
1. **Speed and Efficiency:** YOLO11 offers real-time processing capabilities, making it ideal for applications requiring high-speed inference, such as surveillance and autonomous driving.
|
||||
2. **[Accuracy](https://www.ultralytics.com/glossary/accuracy):** It provides state-of-the-art accuracy for object detection and tracking tasks, reducing the number of false positives and improving overall system reliability.
|
||||
3. **Ease of Integration:** YOLOv8 offers seamless integration with various platforms and devices, including mobile and edge devices, which is crucial for modern AI applications.
|
||||
3. **Ease of Integration:** YOLO11 offers seamless integration with various platforms and devices, including mobile and edge devices, which is crucial for modern AI applications.
|
||||
4. **Flexibility:** Supports various tasks like object detection, segmentation, and tracking with configurable models to meet specific use-case requirements.
|
||||
|
||||
Check out Ultralytics [YOLOv8 Documentation](https://docs.ultralytics.com/models/yolov8/) for a deeper dive into its features and performance comparisons.
|
||||
Check out Ultralytics [YOLO11 Documentation](https://docs.ultralytics.com/models/yolo11/) for a deeper dive into its features and performance comparisons.
|
||||
|
||||
### Can I use YOLOv8 for advanced applications like crowd analysis and traffic management?
|
||||
### Can I use YOLO11 for advanced applications like crowd analysis and traffic management?
|
||||
|
||||
Yes, Ultralytics YOLOv8 is perfectly suited for advanced applications like crowd analysis and traffic management due to its real-time detection capabilities, scalability, and integration flexibility. Its advanced features allow for high-accuracy object tracking, counting, and classification in dynamic environments. Example use cases include:
|
||||
Yes, Ultralytics YOLO11 is perfectly suited for advanced applications like crowd analysis and traffic management due to its real-time detection capabilities, scalability, and integration flexibility. Its advanced features allow for high-accuracy object tracking, counting, and classification in dynamic environments. Example use cases include:
|
||||
|
||||
- **Crowd Analysis:** Monitor and manage large gatherings, ensuring safety and optimizing crowd flow.
|
||||
- **Traffic Management:** Track and count vehicles, analyze traffic patterns, and manage congestion in real-time.
|
||||
|
||||
For more information and implementation details, refer to the guide on [Real World Applications](#real-world-applications) of object counting with YOLOv8.
|
||||
For more information and implementation details, refer to the guide on [Real World Applications](#real-world-applications) of object counting with YOLO11.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue