Object Detection and Counting
R2026bSince R2026b
Detect, localize, and count objects in images for visual inspection applications. Visual Inspection Toolbox™ provides capabilities for these tasks:
Object detection — Train a You Only Look Once X (YOLOX) network to detect and localize objects with bounding boxes. Detect small objects in large images in a single pass by using tiled training and full-resolution inference, without external tiling or stitching. Generate annotated data sets and create synthetic training data to build robust detectors. Export trained models to the Open Neural Network Exchange (ONNX) format for deployment.
Object counting — Use exemplar-based deep learning models to count objects and generate density maps in complex scenes. Interactive tools enable you to select regions of interest and create exemplar patches as model input.
These capabilities support industrial applications such as defect detection in manufacturing and component counting in automated inspection systems.
Functions
Topics
- Detect Objects Using YOLOX Deep Learning Network
Detect objects for visual inspection and computer vision tasks using YOLOX object detector.
- Evaluate Object Detector Performance
Evaluate object detector performance using metrics such as average precision, precision recall, and confusion matrix.
- Select Detection Approach for Visual Inspection
Choose among anomaly detection, shape matching, object detection, and object counting for your visual inspection application.







