Object Detection - MATLAB & Simulink (original) (raw)
Perform classification, object detection, transfer learning using convolutional neural networks (CNNs, or ConvNets), create customized detectors
Object detection is a computer vision technique for locating instances of objects in images or videos. Object detection algorithms typically leveragemachine 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 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 Computer Vision Toolbox Preferences 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.
Apps
Functions
Deep Learning Detectors
Feature-based Detectors
Detect Objects Using Point Features
Select Detected Objects
selectStrongestBbox | Select strongest bounding boxes from overlapping clusters using nonmaximal suppression (NMS) |
---|---|
selectStrongestBboxMulticlass | Select strongest multiclass bounding boxes from overlapping clusters using nonmaximal suppression (NMS) |
Load Training Data
Train Feature-Based Object Detectors
Train Deep Learning Based Object Detectors
Augment and Preprocess Training Data for Deep Learning
R-CNN (Regions With Convolutional Neural Networks)
roiAlignLayer | Non-quantized ROI pooling layer for Mask-CNN (Since R2020b) |
---|---|
roiMaxPooling2dLayer | Neural network layer used to output fixed-size feature maps for rectangular ROIs |
roialign | Non-quantized ROI pooling of dlarray data (Since R2021b) |
YOLO v2 (You Only Look Once version 2)
Focal Loss
SSD (Single Shot Detector)
Anchor Boxes
cuboid2img | Project cuboids from 3-D world coordinates to 2-D image coordinates (Since R2022b) |
---|---|
insertObjectAnnotation | Annotate truecolor or grayscale image or video |
insertObjectMask | Insert masks in image or video stream (Since R2020b) |
insertShape | Insert shapes in image or video |
showShape | Display shapes on image, video, or point cloud (Since R2020b) |
Blocks
Topics
Get Started
- Get Started with Object Detection Using Deep Learning
Perform object detection using deep learning neural networks such as YOLOX, YOLO v4, and SSD. - Choose an Object Detector
Compare object detection deep learning models, such as YOLOX, YOLO v4, RTMDet, and SSD. - 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.
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. - Training Data for Object Detection and Semantic Segmentation
Create training data for object detection or semantic segmentation using theImage 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 Learning in MATLAB (Deep Learning Toolbox)
Discover deep learning capabilities in MATLAB® using convolutional neural networks for classification and regression, including pretrained networks and transfer learning, and training on GPUs, CPUs, clusters, and clouds. - Pretrained Deep Neural Networks (Deep Learning Toolbox)
Learn how to download and use pretrained convolutional neural networks for classification, transfer learning and feature extraction.