Real World Use Cases & Solutions
2026-03-13
Beyond bounding boxes: actionable insights.
You now know how to run tasks like detection and segmentation using pre-trained models.
But what happens AFTER the model outputs its predictions?
Ultralytics provides a suite of high-level Solutions that act as wrappers around your AI model.
They allow you to deploy world-class computer vision systems with just a few lines of code.
Counting, Zones, and Queues
These solutions rely on defining geospatial boundaries (lines or polygons) in the frame and cross-referencing tracked object coordinates.
Count objects passing through an area or crossing a line. View Official Documentation
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("videos/traffic.mp4")
line_points = [(100, 500), (900, 500)]
counter = solutions.ObjectCounter(
show=True, region=line_points, model="yolov8n.pt"
)
while cap.isOpened():
success, im0 = cap.read()
if not success: break
results = counter(im0)Organize and direct vehicle flow in parking areas. View Official Documentation
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("videos/traffic.mp4")
parking_spots = [
[(10, 10), (10, 50), (100, 50), (100, 10)],
[(110, 10), (110, 50), (200, 50), (200, 10)]
]
manager = solutions.ParkingManagement(
model="yolov8n.pt", region=parking_spots, show=True
)
while cap.isOpened():
success, im0 = cap.read()
if not success: break
results = manager(im0)Speed, Distance, and Proximity
Calculate physical, real-world metrics based on relative 2D box positions.
Estimate object speed using tracking techniques and perspective transformations. View Official Documentation
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("videos/traffic.mp4")
# ... extract fps
speedestimator = solutions.SpeedEstimator(
show=True, model="yolov8n.pt",
fps=30, meter_per_pixel=0.05,
)
while cap.isOpened():
success, im0 = cap.read()
if not success: break
results = speedestimator(im0)Analytics and Heatmaps
Aggregate detection and tracking data over time to produce high-level visual summaries and distributions.
Discover patterns and make informed decisions (Line, Bar, Area, Pie). View Official Documentation
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("videos/people.mp4")
analytics = solutions.Analytics(
show=True,
analytics_type="line", # "pie", "bar", "area"
model="yolov8n.pt",
)
frame_count = 0
while cap.isOpened():
success, im0 = cap.read()
if not success: break
frame_count += 1
results = analytics(im0, frame_count) Cropping and Blurring
Act purely as downstream image processing steps utilizing box/mask coordinates.
Automatically blur bounding boxes or segmentation masks to protect privacy. View Official Documentation
Segmentation and Pose
Utilize specific YOLO architectures (YOLO-seg, YOLO-pose) to extract granular, non-rectangular spatial data.
Track and evaluate exercise form (like pushups) using YOLO Pose keypoints. View Official Documentation
Alarms, Web Apps, Embeddings
Trigger email alerts upon detecting specific objects. View Official Documentation
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("videos/people.mp4")
securityalarm = solutions.SecurityAlarm(
show=True, model="yolov8n.pt",
records=1, # send email after 1 detection
)
# Remember to use an App Password here if using Gmail!
securityalarm.authenticate("sen@email", "PASS", "rec@email")
while cap.isOpened():
success, im0 = cap.read()
if not success: break
results = securityalarm(im0)Module Wrap-up
Next up: Custom Data & Training
Thank You!
Any questions?