اكتشف قوة تجزئة الصور مع Ultralytics YOLO. استكشف الدقة على مستوى البكسل وأنواعها وتطبيقاتها وحالات استخدام الذكاء الاصطناعي في العالم الحقيقي.
Image segmentation is a sophisticated technique in computer vision (CV) that involves partitioning a digital image into multiple subgroups of pixels, often referred to as image segments or regions. Unlike standard image classification, which assigns a single label to an entire image, segmentation analyzes visual data at a much more granular level by assigning a specific class label to every individual pixel. This process creates a precise pixel-level map, allowing artificial intelligence (AI) models to understand not just what objects are present, but exactly where they are located and what their specific boundaries are.
To achieve this high-fidelity understanding, segmentation models typically leverage deep learning (DL) architectures, particularly Convolutional Neural Networks (CNNs). These networks act as powerful feature extractors, identifying patterns such as edges, textures, and complex shapes. Traditional segmentation architectures, like the classic U-Net, often employ an encoder-decoder structure. The encoder compresses the input image to capture semantic context, while the decoder reconstructs spatial details to output a final segmentation mask.
Modern advancements have led to real-time architectures like YOLO26, released in January 2026. These models integrate segmentation capabilities directly into an end-to-end pipeline, allowing for high-speed processing on various hardware, from cloud GPUs to edge devices.
Depending on the specific goal of a project, developers generally choose between three main segmentation techniques:
It is crucial to differentiate segmentation from object detection. While detection algorithms localize items using a rectangular bounding box, they inevitably include background pixels within that box. Segmentation provides a tighter, more accurate representation by tracing the exact contour or polygon of the object. This difference is vital for applications like robotic grasping, where a robot arm must know the precise geometry of an item to manipulate it without collision.
The precision offered by image segmentation drives innovation across diverse industries:
يمكن للمطورين تنفيذ تجزئة المثيلات بكفاءة باستخدام ultralytics Python .
يستخدم المثال التالي أحدث نموذج YOLO26,
which is optimized for both speed and accuracy.
from ultralytics import YOLO
# Load a pre-trained YOLO26 segmentation model
# 'n' denotes the nano version, optimized for speed
model = YOLO("yolo26n-seg.pt")
# Run inference on an image to generate masks
# The model identifies objects and outlines their shape
results = model("https://ultralytics.com/images/bus.jpg")
# Display the image with segmentation overlays
results[0].show()
To achieve high performance on custom tasks, teams often need to curate high-quality training data. The Ultralytics Platform simplifies this process by providing tools to annotate images with polygon masks, manage datasets, and train models in the cloud, streamlining the entire machine learning operations (MLOps) lifecycle. Libraries like OpenCV are also frequently used alongside these models for pre-processing images and post-processing the resulting masks.