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.

Labeled boats, neural network, and person detector

Apps

Functions

expand all

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

Training Data for Object Detection and Instance Segmentation

Get Started With Deep Learning