Ultralytics Solutions: Harness YOLO26 to Solve Real-World Problems#
Ultralytics Solutions are ready-to-use applications of Ultralytics YOLO models for common computer vision problems such as object counting, heatmaps, speed estimation, queue management, and object blurring. Most solutions wrap detection, tracking, or pose estimation in a configurable class that you can run from Python or the yolo solutions CLI.

Watch: How to Run Ultralytics Solutions from the Command Line (CLI) | Ultralytics YOLO26 🚀
Solutions#
Each solution below has a dedicated guide:
- Analytics: Generate line, bar, pie, and area charts from YOLO26 detections to analyze trends over time.
- Distance Calculation: Calculate distances between objects using bounding box centroids in YOLO26 for spatial analysis.
- Heatmaps: Accumulate YOLO26 detections into a heatmap overlay that shows where objects appear or move most often.
- Instance Segmentation with Object Tracking: Combine instance segmentation and object tracking with YOLO26 to follow object outlines across video frames.
- Live Inference with Streamlit: Run real-time object detection with YOLO26 in your web browser through a Streamlit interface.
- Object Blurring: Apply object blurring using YOLO26 to protect privacy in image and video processing.
- Object Counting: Count objects that cross a line or enter a region in videos and live streams with YOLO26.
- Object Counting in Regions: Count objects inside multiple user-defined regions with YOLO26.
- Object Cropping: Crop detected objects from images and videos with YOLO26 and save each one as a separate image.
- Parking Management: Monitor occupied and available parking spaces with YOLO26.
- Queue Management: Count people waiting in a queue region with YOLO26 to monitor queue lengths.
- Security Alarm System: Build a security alarm system with YOLO26 that sends an email alert when the number of detected objects reaches a threshold.
- Similarity Search: Retrieve images with natural language queries such as "person holding a bag" or "vehicles in motion" by combining OpenAI CLIP embeddings with cosine-similarity search.
- Speed Estimation: Estimate object speed with YOLO26 and object tracking for applications such as traffic monitoring.
- Track Objects in Zone: Track objects only inside a defined zone of the video frame with YOLO26.
- VisionEye View Objects Mapping: Connect detected objects to a fixed observer point, mimicking how the human eye focuses on specific objects.
- Workouts Monitoring: Count exercise repetitions and track workout stages in real time with YOLO26 pose estimation.
Solutions Arguments#
| Argument | Type | Default | Description |
|---|---|---|---|
model | str | None | Path to an Ultralytics YOLO model file. |
region | list or dict | None | Points defining the region of interest, either a list of (x, y) tuples or a dictionary mapping region names to point lists for multiple regions (RegionCounter only). When None, solutions that require a region fall back to a predefined default. |
show_in | bool | True | Flag to control whether to display the in counts on the video stream. |
show_out | bool | True | Flag to control whether to display the out counts on the video stream. |
analytics_type | str | 'line' | Type of graph, i.e., line, bar, area, or pie. |
colormap | int | cv2.COLORMAP_DEEPGREEN | Colormap to use for the heatmap. |
line_width | int | 2 | Line thickness for the boxes, keypoints and counts the solution draws. |
verbose | bool | True | Enables the solution's per-frame log of input shape, class counts and processing speed. The tracking call itself is always silent. |
json_file | str | None | Path to the JSON file that contains all parking coordinates data. |
up_angle | float | 145.0 | Angle threshold for the 'up' pose. |
kpts | list[int] | [6, 8, 10] | List of three keypoint indices used for monitoring workouts. These keypoints correspond to body joints or parts, such as shoulders, elbows, and wrists, for exercises like push-ups, pull-ups, squats, and ab-workouts. |
down_angle | float | 90.0 | Angle threshold for the 'down' pose. |
blur_ratio | float | 0.5 | Adjusts percentage of blur intensity, with values in range 0.1 - 1.0. |
crop_dir | str | 'cropped-detections' | Directory name for storing cropped detections. |
records | int | 5 | Total detections count to trigger an email with security alarm system. |
vision_point | tuple[int, int] | (20, 20) | The point where vision will track objects and draw paths using VisionEye Solution. |
source | str | None | Path to the input source (video, RTSP, etc.). Only usable with Solutions command line interface (CLI). |
figsize | tuple[float, float] | (12.8, 7.2) | Figure size in inches for Analytics charts; (12.8, 7.2) renders a 1280×720 frame. |
fps | float | 30.0 | Frames per second used for speed calculations. |
max_hist | int | 5 | Maximum historical points to track per object for speed/direction calculations. |
meter_per_pixel | float | 0.05 | Scaling factor used for converting pixel distance to real-world units. |
max_speed | int | 120 | Maximum speed in km/h; higher estimated speeds are capped at this value. |
data | str | 'images' | Path to image directory used for similarity search. |
imgsz | int | 640 | Input image size for model inference. |
Solutions forward the inference and tracking arguments below to model.track().
| Argument | Type | Default | Description |
|---|---|---|---|
tracker | str | 'tracktrack.yaml' | Specifies the tracking algorithm to use. Built-in options: botsort.yaml, bytetrack.yaml, ocsort.yaml, deepocsort.yaml, fasttrack.yaml, tracktrack.yaml. |
conf | float | 0.25 | Sets the confidence threshold for detections; lower values allow more objects to be tracked but may include false positives. |
iou | float | 0.7 | Sets the Intersection over Union (IoU) threshold for filtering overlapping detections. |
classes | list | None | Filters results by class index. For example, classes=[0, 2, 3] only tracks the specified classes. |
device | str | None | Specifies the device for inference (e.g., cpu, cuda:0 or 0). Allows users to select between CPU, a specific GPU, or other compute devices for model execution. |
imgsz | int or tuple | 640 | Target inference image size: an integer for a square or a (height, width) pair. Shapes are adjusted to the model stride. |
max_det | int | 300 | Maximum number of detections kept per frame before tracking, limiting the objects a solution processes in dense scenes. |
quantize | int or str | None | Inference precision: 16 (FP16) or 32/unset (FP32) for PyTorch and TorchScript models off CPU; other formats use the precision their artifact and runtime select. Replaces the deprecated half arg. |
You can use show_conf, show_labels, and other mentioned arguments to customize the visualization.
| Argument | Type | Default | Description |
|---|---|---|---|
show | bool | False | If True, displays the annotated images or videos in a window. Useful for immediate visual feedback during development or testing. |
show_conf | bool | True | Displays the confidence score for each detection alongside the label. Gives insight into the model's certainty for each detection. |
show_labels | bool | True | Displays labels for each detection in the visual output. Provides immediate understanding of detected objects. |
Usage of SolutionAnnotator#
All Ultralytics Solutions use the SolutionAnnotator class, which extends the main Annotator class and provides the following methods:
| Method | Return Type | Description |
|---|---|---|
draw_region() | None | Draws a region using specified points, colors, and thickness. |
queue_counts_display() | None | Displays queue counts in the specified region. |
display_analytics() | None | Displays overall statistics for parking lot management. |
estimate_pose_angle() | float | Calculates the angle between three points in an object pose. |
draw_specific_kpts() | np.ndarray | Draws specific keypoints on the image. |
plot_workout_information() | int | Draws a labeled text box on the image. |
plot_angle_and_count_and_stage() | None | Visualizes angle, step count, and stage for workout monitoring. |
plot_distance_and_line() | None | Displays the distance between centroids and connects them with a line. |
display_objects_labels() | None | Annotates bounding boxes with object class labels. |
sweep_annotator() | None | Visualizes a vertical sweep line and optional label. |
visioneye() | None | Maps and connects object centroids to a visual "eye" point. |
adaptive_label() | None | Draws a circular or rectangular background label in the center of a bounding box. |
Working with SolutionResults#
Every solution except Similarity Search returns a SolutionResults object when called.
- For object counting, the results include
in_count,out_count, andclasswise_count.
import cv2
from ultralytics import solutions
im0 = cv2.imread("path/to/img")
region_points = [(20, 400), (1080, 400), (1080, 360), (20, 360)]
counter = solutions.ObjectCounter(
show=True, # display the output
region=region_points, # pass region points
model="yolo26n.pt", # model="yolo26n-obb.pt" for object counting with OBB model.
# classes=[0, 2], # count specific classes i.e. person and car with COCO pretrained model.
# tracker="botsort.yaml" # Choose trackers i.e "bytetrack.yaml"
)
results = counter(im0)
print(results.in_count) # display in_counts
print(results.out_count) # display out_counts
print(results.classwise_count) # display classwise_countSolutionResults objects have the following attributes:
| Attribute | Type | Description |
|---|---|---|
plot_im | np.ndarray | Image with visual overlays such as counts, blur effects, or solution-specific enhancements. |
in_count | int | Total number of objects detected entering the defined zone in the video stream. |
out_count | int | Total number of objects detected exiting the defined zone in the video stream. |
classwise_count | dict[str, dict[str, int] | int] | Per-class counts: {"IN": int, "OUT": int} for ObjectCounter and Heatmap, or an int for Analytics. |
queue_count | int | Number of objects currently within a predefined queue or waiting area (suitable for queue management). |
workout_count | list[int] | Per-track workout repetition counts from AI Gym (one entry per currently tracked individual). |
workout_angle | list[float] | Per-track exercise angles from AI Gym (one entry per currently tracked individual). |
workout_stage | list[str] | Per-track current workout stage from AI Gym (one entry per currently tracked individual). |
pixels_distance | float | Pixel-based distance between two objects or points, such as bounding boxes (suitable for distance calculation). |
available_slots | int | Number of unoccupied slots in a monitored area (suitable for parking management). |
filled_slots | int | Number of occupied slots in a monitored area (suitable for parking management). |
email_sent | bool | Indicates whether a notification or alert email has been successfully sent (suitable for security alarm). |
total_tracks | int | Total number of unique object tracks observed during video analysis. |
region_counts | dict[str, int] | Object counts within user-defined regions or zones. |
speed_dict | dict[int, int] | Track-wise dictionary of estimated object speeds in km/h from SpeedEstimator, useful for velocity analysis. |
total_crop_objects | int | Total number of cropped object images generated by the ObjectCropper solution. |
speed | dict[str, float] | Dictionary containing performance metrics for tracking and solution processing. |
For more details, refer to the SolutionResults class documentation.
Solutions Usage via CLI#
Most solutions can be run directly from the command-line interface.
Syntax
yolo SOLUTIONS SOLUTION_NAME ARGS
- SOLUTIONS is a required keyword.
- SOLUTION_NAME is one of:
['count', 'crop', 'blur', 'workout', 'heatmap', 'isegment', 'queue', 'speed', 'analytics', 'trackzone', 'inference', 'visioneye', 'region', 'security', 'parking']. - ARGS (optional) are custom
arg=valuepairs, such asshow_in=True, to override default settings.
yolo solutions count show=True # for object counting
yolo solutions count source="path/to/video.mp4" # specify video file pathContribute to Our Solutions#
Community contributions are welcome. If you have built a solution with Ultralytics YOLO that is not covered here, consider sharing it as a guide so other users can benefit.
FAQ#
Ultralytics YOLO26 counts objects in real time by combining detection with tracking, so each object is counted once as it crosses a line or enters a region. To set up YOLO26 for live video stream analysis, install
ultralytics, load a model, and pass video frames tosolutions.ObjectCounter.Ultralytics YOLO26 adds real-time object detection and alerting to camera-based security systems. With the Security Alarm System solution, YOLO26 sends an email alert when the number of detected objects in the surveillance area reaches a threshold.
Ultralytics YOLO26 counts and tracks people inside a queue region, giving you live queue lengths that help reduce wait times and plan staffing.
Yes. Ultralytics YOLO26 pose models track body keypoints in real time, so the workout monitoring solution can measure joint angles, count repetitions, and report the current exercise stage.
Ultralytics YOLO26 can generate heatmaps that show where objects appear or move most often in a scene, highlighting regions of high activity. These data visualizations help you understand traffic patterns and trends over time.