ml-pipes-ultralytics¶
ml-pipes-ultralytics provides Ultralytics YOLO
prediction, embedding, tracking, and result operations as composable
ml-pipes operators. Native
Ultralytics models and Results stay intact, while inference configuration and
pipeline data flow are explicit.
Installation¶
Install from PyPI in a Python 3.10+ environment:
The package installs ml-pipes-core, ml-pipes-vision, and Ultralytics.
For environment setup and GPU configuration, see the
full installation guide.
Quick Start¶
Start with the runnable examples:
from ml_pipes.core import Pipeline
from ml_pipes.standard import Select
from ml_pipes.ultralytics import results, yolo
pipeline = Pipeline(
[
yolo.Predict("yolo26n-seg.pt", conf=0.25),
Select(0),
results.Plot(color_mode="instance"),
]
)
Licensing¶
ml-pipes-ultralytics is licensed under the
Apache License 2.0.
It requires Ultralytics, which is licensed separately under AGPL-3.0 or an
Ultralytics Enterprise License.
Installing or using this package does not grant rights to Ultralytics software
or model weights. Community Ultralytics users must comply with AGPL-3.0;
Enterprise users must ensure their Ultralytics agreement covers their intended
use.
Built with Ultralytics x ml-pipes¶
| Example | Upstream source | Note |
|---|---|---|
run_detect_and_crop.py |
Object Cropping | Detects objects, saves native result crops, and renders the annotated image. |
run_detect_and_classify.py |
Image Classification | Detects objects, classifies each crop with a second model, and pairs predictions with the original boxes. |
run_segment_and_annotate.py |
Instance Segmentation and Tracking | Runs segmentation and renders instance-coloured masks. |
run_isolate_segmented_objects.py |
Isolating Segmentation Objects | Exports per-object PNGs with transparent or black backgrounds and optional box cropping. |
run_object_blurrer.py |
Object Blurring | Tracks and blurs COCO person detections. |
run_detection_video.py |
Ultralytics predict mode | Uses an explicit OpenCV capture loop and one non-streaming prediction pipeline call per frame. |
run_track_objects.py |
Ultralytics track mode | Preserves native tracker state and draws native tracking IDs plus explicit motion traces. |
run_batch_predict.py |
Ultralytics predict mode | Processes a local image archive with single-image prediction, batching, or batched inference with concurrent image decoding. |
run_image_similarity.py |
YOLO image embeddings | Compares two bus photos or an image and its horizontal flip, returning cosine similarity. |