Object detection is a computer vision technique for locating instances of objects in images or videos. Object detection algorithms typically leverage machine learning or deep learning to produce meaningful results. When looking at images or video, humans can recognize and locate objects of interest in a matter of moments. The goal of object detection is to replicate this intelligence using a computer. The best approach for object detection depends on your application and the problem you are trying to solve.
Deep learning techniques require a large number of labeled training images, so the use of a GPU is recommended to decrease the time needed to train a model. Deep learning-based approaches to object detection use convolutional neural networks (CNNs or ConvNets), such as R-CNN and YOLO, or use single-shot detection (SSD). You can train a custom object detector, or use a pretrained object detector by leveraging transfer learning, an approach that enables you to start with a pretrained network and then fine-tune it for your application. Convolutional neural networks require Deep Learning Toolbox™. Training and prediction are supported on a CUDA®-capable GPU. Use of a GPU is recommended and requires Parallel Computing Toolbox™. For more information, see Preferenze Computer Vision Toolbox and Parallel Computing Support in MathWorks Products (Parallel Computing Toolbox).
Machine learning techniques for object detection include aggregate channel features (ACF), support vector machines (SVM) classification using histograms of oriented gradient (HOG) features, and the Viola-Jones algorithm for human face or upper-body detection. You can choose to start with a pretrained object detector or create a custom object detector to suit your application.
Deep Learning Detectors
|Detect objects using R-CNN deep learning detector|
|Detect objects using Fast R-CNN deep learning detector|
|Detect objects using Faster R-CNN deep learning detector|
|Detect objects using SSD deep learning detector (Da R2020a)|
|Detect objects using YOLO v2 object detector (Da R2019a)|
|Detect objects using YOLO v3 object detector (Da R2021a)|
|Detect objects using YOLO v4 object detector (Da R2022a)|
|Segment objects using SOLOv2 instance segmentation network (Da R2023b)|
|Detect objects using Mask R-CNN instance segmentation (Da R2021b)|
|Recognize text using optical character recognition|
|Detect and estimate pose for AprilTag in image (Da R2020b)|
|Detect and decode 1-D or 2-D barcode in image (Da R2020a)|
|Detect objects using aggregate channel features|
|Detect people using aggregate channel features|
|Detect objects using the Viola-Jones algorithm|
|Foreground detection using Gaussian mixture models|
|Detect upright people using HOG features|
|Properties of connected regions|
Detect Objects Using Point Features
|Detect BRISK features|
|Detect corners using FAST algorithm|
|Detect corners using Harris–Stephens algorithm|
|Detect KAZE features|
|Detect corners using minimum eigenvalue algorithm|
|Detect MSER features|
|Detect ORB keypoints (Da R2019a)|
|Detect scale invariant feature transform (SIFT) features (Da R2021b)|
|Detect SURF features|
|Extract interest point descriptors|
|Find matching features|
Select Detected Objects
Train Custom Object Detectors
Load Training Data
|Datastore for bounding box label data (Da R2019b)|
|Ground truth label data|
|Datastore for image data|
|Create training data for an object detector|
|Options for training OCR model (Da R2023a)|
|Combine data from multiple datastores (Da R2019a)|
Train Feature-Based Object Detectors
|Train ACF object detector|
|Train cascade object detector model|
|Train an image category classifier|
Train Deep Learning Based Object Detectors
|Train an R-CNN deep learning object detector|
|Train a Fast R-CNN deep learning object detector|
|Train a Faster R-CNN deep learning object detector|
|Train an SSD deep learning object detector (Da R2020a)|
|Train YOLO v2 object detector (Da R2019a)|
|Train YOLO v4 object detector (Da R2022a)|
|Train SOLOv2 network to perform instance segmentation (Da R2023b)|
|Train Mask R-CNN network to perform instance segmentation (Da R2022a)|
|Options for training OCR model (Da R2023a)|
|Train OCR model to recognize text in image (Da R2023a)|
|Quantize OCR model (Da R2023a)|
Augment and Preprocess Training Data for Deep Learning
|Balance bounding box labels for object detection (Da R2020a)|
|Crop bounding boxes (Da R2019b)|
|Remove bounding boxes (Da R2021a)|
|Resize bounding boxes (Da R2019b)|
|Apply geometric transformation to bounding boxes (Da R2019b)|
|Convert rectangle to corner points list|
|Apply geometric transformation to image|
|Create randomized 2-D affine transformation (Da R2019b)|
|Create rectangular center cropping window (Da R2019b)|
|Randomly select rectangular region in image (Da R2021a)|
|Calculate 2-D integral image|
Design Object Detection Deep Neural Networks
R-CNN (Regions With Convolutional Neural Networks)
|Box regression layer for Fast and Faster R-CNN|
|Create a faster R-CNN object detection network (Da R2019b)|
|Softmax layer for region proposal network (RPN)|
|Classification layer for region proposal networks (RPNs)|
|Region proposal layer for Faster R-CNN|
|Non-quantized ROI pooling layer for Mask-CNN (Da R2020b)|
|ROI input layer for Fast R-CNN|
|Neural network layer used to output fixed-size feature maps for rectangular ROIs|
|Non-quantized ROI pooling of |
YOLO v2 (You Only Look Once version 2)
|Create YOLO v2 object detection network (Da R2019a)|
|Create transform layer for YOLO v2 object detection network (Da R2019a)|
|Create output layer for YOLO v2 object detection network (Da R2019a)|
|Space to depth layer (Da R2020b)|
Focal Loss Layers
|Create focal loss layer using focal loss function (Da R2020a)|
|Compute focal cross-entropy loss (Da R2020b)|
SSD (Single Shot Detector)
|Create SSD merge layer for object detection (Da R2020a)|
|Estimate anchor boxes for deep learning object detectors (Da R2019b)|
Visualize Detection Results
|Project cuboids from 3-D world coordinates to 2-D image coordinates (Da R2022b)|
|Annotate truecolor or grayscale image or video|
|Insert masks in image or video stream (Da R2020b)|
|Insert shapes in image or video|
|Display shapes on image, video, or point cloud (Da R2020b)|
Evaluate Predicted Results
|Evaluate object detection data set against ground truth (Da R2023b)|
|Object detection quality metrics (Da R2023b)|
|Evaluate instance segmentation data set against ground truth (Da R2022b)|
|Instance segmentation quality metrics (Da R2022b)|
|Compute bounding box overlap ratio|
|Compute bounding box precision and recall against ground truth|
|Evaluate OCR results against ground truth (Da R2023a)|
|(To be removed) Evaluate miss rate metric for object detection|
|(To be removed) Evaluate precision metric for object detection|
|(To be removed) Evaluate average orientation similarity metric for object detection (Da R2020a)|
|Deep Learning Object Detector||Detect objects using trained deep learning object detector (Da R2021b)|
- Getting Started with Object Detection Using Deep Learning
Perform object detection and instance segmentation using deep learning neural networks.
- Choose an Object Detector
Compare object detection and instance segmentation models.
- Local Feature Detection and Extraction
Learn the benefits and applications of local feature detection and extraction.
- Get Started with Cascade Object Detector
Train a custom classifier
- Point Feature Types
Choose functions that return and accept points objects for several types of features.
- Getting Started with OCR
Detect and recognize text in multiple languages, train OCR models to recognize custom text.
- Image Classification with Bag of Visual Words
Use the Computer Vision Toolbox™ functions for image category classification by creating a bag of visual words.
- Sistemi di coordinate
Specificare gli indici dei pixel, le coordinate spaziali e i sistemi di coordinate in 3D
Training Data for Object Detection and Instance Segmentation
- Get Started with the Image Labeler
Interactively label rectangular ROIs for object detection, pixels for semantic segmentation, polygons for instance segmentation, and scenes for image classification.
- Get Started with the Video Labeler
Interactively label rectangular ROIs for object detection, pixels for semantic segmentation, polygons for instance segmentation, and scenes for image classification in a video or image sequence.
- Datastores for Deep Learning (Deep Learning Toolbox)
Learn how to use datastores in deep learning applications.
- Get Started with SOLOv2 for Instance Segmentation
Perform multiclass instance segmentation using SOLOv2 and deep learning.
- Getting Started with Mask R-CNN for Instance Segmentation
Perform multiclass instance segmentation using Mask R-CNN and deep learning.
- Training Data for Object Detection and Semantic Segmentation
Create training data for object detection or semantic segmentation using the Image Labeler or Video Labeler.
- Get Started with Image Preprocessing and Augmentation for Deep Learning
Preprocess data for deep learning applications with deterministic operations such as resizing, or augment training data with randomized operations such as random cropping.
Get Started With Deep Learning
- Deep Network Designer (Deep Learning Toolbox)
- List of Deep Learning Layers (Deep Learning Toolbox)
Discover all the deep learning layers in MATLAB®.
- Deep Learning in MATLAB (Deep Learning Toolbox)
Scoprire le capacità del Deep Learning in MATLAB utilizzando le reti neurali convoluzionali per la classificazione e la regressione, incluse le reti preaddestrate e il transfer learning, nonché l’addestramento su GPU, CPU, cluster e cloud.
- Reti neurali profonde preaddestrate (Deep Learning Toolbox)
Apprendere come scaricare e utilizzare le reti neurali convoluzionali preaddestrate per la classificazione, il transfer learning e l’estrazione di feature.