Main Content

Object Detection and Counting

R2026b
Detect and count objects in images for visual inspection applications using deep learning
Since 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

expand all

insertObjectInImageInsert object from source image into image
objectInsertionDatastoreCreate synthetic labeled datastore for training an instance segmentation or object detection network
yoloxObjectDetectorDetect objects using YOLOX object detector
detectDetect objects using YOLOX object detector
trainYOLOXObjectDetectorTrain YOLOX object detector
counTRObjectCounterCount objects using CounTR deep learning model
densityMapDensity map of object count generated using CounTR deep learning model
countObjectsCount objects using CounTR deep learning model
uiselectboxesSelect bounding box ROIs from image
extractpatchesExtract patches from image at specified ROIs

Topics

Featured Examples