Object Detection is a Metro Analytics use case that detects and classifies objects across the full 80-class COCO taxonomy (person, vehicle, animal, everyday objects, etc.).
It is built on YOLO26, a state-of-the-art real-time object detector, quantized to INT8 for efficient inference on Intel hardware.
Unlike the specialized person or vehicle detectors, this model keeps all 80 classes active, making it suitable for general-purpose scene understanding.
Typical Metro deployments include:
Scene Understanding -- identify and classify all objects visible in a camera feed.
Inventory Monitoring -- detect specific items (bags, suitcases, bottles) on platforms.
Anomaly Detection -- flag unexpected objects in restricted areas.
Multi-Class Analytics -- gather statistics across people, vehicles, and other categories.
Available variants: yolo26n, yolo26s, yolo26m, yolo26l, yolo26x.
Smaller variants (yolo26n, yolo26s) are recommended for high-FPS edge deployment; larger variants improve recall for small objects.
Replace yolo26n with any variant (yolo26s, yolo26m, yolo26l, yolo26x).
The second argument selects the precision (FP32, FP16, INT8); the default is FP16.
The script performs the following steps:
Installs dependencies (openvino, ultralytics; adds nncf for INT8).
Downloads a sample test image (test.jpg) and a sample test video (test_video.mp4).
Downloads the PyTorch weights and exports to OpenVINO IR.
(INT8 only) Quantizes the model using NNCF post-training quantization.
Output files:
yolo26n_openvino_model/ -- FP32 or FP16 OpenVINO IR model directory.
yolo26n_objdet_int8.xml / yolo26n_objdet_int8.bin -- INT8 quantized model (only when INT8 is selected).
Precision / Device Compatibility
Precision
CPU
GPU
NPU
FP32
Yes
Yes
No
FP16
Yes
Yes
Yes
INT8
Yes
Yes
Yes
Note: The INT8 calibration uses the bundled sample image.
For production accuracy, replace it with a representative set of frames from
the target deployment site.
OpenVINO Sample
The sample below runs YOLO26 inference on all 80 COCO classes and prints every detected object with its class name and confidence.
YOLO26 is end-to-end (NMS-free), so no manual non-maximum suppression is needed.
Change the device string to run on CPU, GPU, or NPU.
python
1import cv2
2import numpy as np
3import openvino as ov
45CONF_THRESHOLD =0.46INPUT_SIZE =64078core = ov.Core()9model = core.read_model("yolo26n_openvino_model/yolo26n.xml")1011# YOLO26 embeds the 80 COCO class names in rt_info -- read them instead of12# hardcoding the list. Ultralytics separates multi-word names with13# underscores (e.g. "traffic_light"), so restore spaces for display.14COCO_NAMES =[15 name.replace("_"," ")16for name in model.get_rt_info()["model_info"]["labels"].value.split()17]1819# Change device to "GPU" or "NPU" to run on integrated GPU or NPU.20compiled = core.compile_model(model,"CPU")2122image = cv2.imread("test.jpg")23h0, w0 = image.shape[:2]2425blob = cv2.resize(image,(INPUT_SIZE, INPUT_SIZE))26blob = cv2.cvtColor(blob, cv2.COLOR_BGR2RGB).astype(np.float32)/255.027blob = blob.transpose(2,0,1)[np.newaxis,...]# NCHW2829# YOLO26 end-to-end output: [1, 300, 6] = [x1, y1, x2, y2, confidence, class_id]30output = compiled([blob])[compiled.output(0)][0]31mask = output[:,4]>= CONF_THRESHOLD
32dets = output[mask]3334sx, sy = w0 / INPUT_SIZE, h0 / INPUT_SIZE
35print(f"Total detections: {len(dets)}")3637colors = np.random.RandomState(42).randint(0,255,(80,3)).tolist()38for det in dets:39 x1 =int(det[0]* sx)40 y1 =int(det[1]* sy)41 x2 =int(det[2]* sx)42 y2 =int(det[3]* sy)43 cid =int(det[5])44 conf =float(det[4])45 label =f"{COCO_NAMES[cid]}{conf:.2f}"46 color = colors[cid]47 cv2.rectangle(image,(x1, y1),(x2, y2), color,2)48 cv2.putText(image, label,(x1, y1 -5),49 cv2.FONT_HERSHEY_SIMPLEX,0.6, color,2)50print(f" {label} at ({x1},{y1})-({x2},{y2})")5152cv2.imwrite("output_openvino.jpg", image)
Device targets:
"CPU" -- default, works on all Intel platforms.
"GPU" -- Intel integrated or discrete GPU.
"NPU" -- Intel NPU (validate with benchmark_app -d NPU).
Try It on a Sample Image
The export_and_quantize.sh script downloads test.jpg automatically.
Re-run the OpenVINO sample above.
The script reads test.jpg, prints each detected object to the console, and writes the annotated frame to output_openvino.jpg.
Expected console output (representative):
text
1Total detections: 5
2 person 0.92 at (49,396)-(236,904)
3 bus 0.92 at (0,229)-(804,744)
4 person 0.91 at (670,393)-(809,880)
5 person 0.90 at (223,403)-(345,862)
6 person 0.50 at (0,553)-(68,869)
Expected Output
OpenVINO expected output
DLStreamer Sample
The pipeline below runs the FP16 YOLO26 detector on the sample video via
gvadetect, overlays bounding boxes, saves the annotated result to
output_dlstreamer.mp4, and prints all detections per frame.
Notes on running this sample:
Use the FP16 IR (yolo26n_openvino_model/yolo26n.xml). Class names are
read automatically from the model's embedded metadata.yaml by
DLStreamer 2026.0+ -- no external labels-file is required.
Export PYTHONPATH so the DLStreamer Python module is importable: