Object Blurring using Ultralytics YOLO26
What is Object Blurring?#
Object blurring with Ultralytics YOLO26 involves applying a blurring effect to specific detected objects in an image or video. YOLO26 locates the objects in each frame, and the blur is applied only to the detected regions.
Watch: How to Train Face Detection Model using Ultralytics Platform & Blur Faces | Ultralytics YOLO26 🚀
Advantages of Object Blurring#
- Privacy Protection: Object blurring is an effective tool for safeguarding privacy by concealing sensitive or personally identifiable information in images or videos.
- Selective Focus: YOLO26 allows for selective blurring, enabling users to target specific objects, ensuring a balance between privacy and retaining relevant visual information.
- Real-time Processing: YOLO26's efficiency enables object blurring in real time, making it suitable for applications requiring on-the-fly privacy enhancements in dynamic environments.
- Regulatory Compliance: Helps organizations comply with data protection regulations like GDPR by anonymizing identifiable information in visual content.
- Content Moderation: Useful for blurring inappropriate or sensitive content in media platforms while preserving the overall context.
Blur Objects with YOLO26#
Pass your video to the ObjectBlurrer solution and it detects objects each frame and applies an averaging (box) blur to every detection. Control the strength with blur_ratio (0.1–1.0) and restrict blurring to specific classes — for example, only people and cars.
# Blur the objects
yolo solutions blur show=True
# Pass a source video
yolo solutions blur source="path/to/video.mp4"
# Blur the specific classes
yolo solutions blur classes="[0, 5]"ObjectBlurrer Arguments#
Here's a table with the ObjectBlurrer arguments:
| Argument | Type | Default | Description |
|---|---|---|---|
model | str | None | Path to an Ultralytics YOLO model file. |
blur_ratio | float | 0.5 | Adjusts percentage of blur intensity, with values in range 0.1 - 1.0. |
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. |
The ObjectBlurrer solution also supports a range of track arguments:
| 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.5 | 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. |
Moreover, the following visualization arguments can be used:
| 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. |
Real-World Applications#
Privacy Protection in Surveillance#
Security cameras and surveillance systems can use YOLO26 to automatically blur faces, license plates, or other identifying information while still capturing important activity. This helps maintain security while respecting privacy rights in public spaces.
Healthcare Data Anonymization#
In medical imaging, patient information often appears in scans or photos. YOLO26 can detect and blur this information to comply with regulations like HIPAA when sharing medical data for research or educational purposes.
Document Redaction#
When sharing documents that contain sensitive information, YOLO26 can automatically detect and blur specific elements like signatures, account numbers, or personal details, streamlining the redaction process while maintaining document integrity.
Media and Content Creation#
Content creators can use YOLO26 to blur brand logos, copyrighted material, or inappropriate content in videos and images, helping avoid legal issues while preserving the overall content quality.
FAQ#
Object blurring with Ultralytics YOLO26 involves automatically detecting and applying a blurring effect to specific objects in images or videos. This technique enhances privacy by concealing sensitive information while retaining relevant visual data. YOLO26's real-time processing capabilities make it suitable for applications requiring immediate privacy protection and selective focus adjustments.
Use the Python example above, which runs YOLO26 object detection and blurs each detection every frame. Set
blur_ratio(for example0.5for 50% blur intensity) to control the effect, and passclassesto blur only specific object types.Ultralytics YOLO26 offers several advantages for object blurring:
- Privacy Protection: Effectively obscure sensitive or identifiable information.
- Selective Focus: Target specific objects for blurring, maintaining essential visual content.
- Real-time Processing: Execute object blurring efficiently in dynamic environments, suitable for instant privacy enhancements.
- Customizable Intensity: Adjust the blur ratio to balance privacy needs with visual context.
- Class-Specific Blurring: Selectively blur only certain types of objects while leaving others visible.
For more detailed applications, check the advantages of object blurring section.
Yes. Train or fine-tune a YOLO26 detection model for faces, for example on the WIDER FACE dataset, then pass the trained weights to
ObjectBlurrerwith themodelargument. Every detected face is then blurred with OpenCV. To blur faces across a whole dataset without writing code, use Blur Faces on Ultralytics Platform.Ultralytics YOLO26 is typically faster than two-stage detectors like Faster R-CNN, making it more suitable for real-time applications. While both models offer accurate detection, YOLO26's architecture is optimized for rapid inference, which is critical for tasks like real-time object blurring.
Comments
Ask a question, share your results, or help someone else.