目标检测
Computer Vision Toolbox™ 提供了一套全面的工具和函数,用于使用深度学习和传统计算机视觉技术来构建、训练、评估和部署目标检测模型。您可以首先使用图像标注器和视频标注器创建标注真实值,它们支持对图像和视频帧中的目标进行交互式和 AI 辅助的边界框注解。
获得标注数据后,您可以从多种预训练深度学习目标检测器中进行选择,包括 YOLO v2、YOLO v3、YOLO v4、YOLOX、RTMDet、SSD 和 Grounding DINO。工具箱还包含 peopleDetector 和 faceDetector 等专用检测器,用于人体和人脸识别任务。您可以直接使用这些模型进行推断,也可以将其作为迁移学习的起点,从而能够针对特定领域的数据集自定义检测器。有关详细信息,请参阅使用深度学习入门目标检测。对于经典目标检测方法,工具箱支持聚合通道特征 (ACF) 和级联 (Viola-Jones) 目标检测器。
工具箱提供了使用迁移学习训练目标检测器的函数。工具箱还提供了用于管理和预处理训练数据的功能以及数据增强工具。通过模拟真实世界中的各种变化,这些工具有助于确保模型得到稳健训练。有关详细信息,请参阅Get Started with Image Preprocessing and Augmentation for Deep Learning。
使用预训练或自定义模型生成检测结果后,您可以使用目标检测器分析器将检测结果与真实值数据进行对比。该 App 支持支持在一系列交并比 (IOU) 阈值下评估关键性能度量,如混淆矩阵、精确率、召回率、F1 分数和平均精度均值 (mAP)。或者,您也可以使用 evaluateObjectDetection 函数以编程方式计算检测性能度量。有关详细信息,请参阅Evaluate Object Detector Performance和Get Started with Object Detector Analyzer App。

App
函数
模块
| Deep Learning Object Detector | 使用经过训练的深度学习目标检测器检测目标 (自 R2021b 起) |
主题
为目标检测创建真实值和训练数据
- 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. - 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.
使用预训练检测器检测目标
- 使用深度学习入门目标检测
使用 YOLOX、YOLO v4、RTMDet 和 SSD 等深度学习神经网络进行目标检测。 - Choose an Object Detector
Compare object detection deep learning models, such as YOLOX, YOLO v4, RTMDet, and SSD. - Get Started with Cascade Object Detector
Train a custom classifier. - 在 MATLAB 中进行深度学习 (Deep Learning Toolbox)
通过使用卷积神经网络进行分类和回归来探索 MATLAB® 的深度学习能力,包括预训练网络和迁移学习,以及在 GPU、CPU、集群和云上进行训练。 - 预训练的深度神经网络 (Deep Learning Toolbox)
了解如何下载和使用预训练的卷积神经网络进行分类、迁移学习和特征提取。
评估目标检测结果
- Evaluate Object Detector Performance
Evaluate object detector performance using metrics such as average precision, precision recall, and confusion matrix. - Get Started with Object Detector Analyzer App
Use Object Detector Analyzer app to evaluate pretrained object detectors or precomputed detection results against the ground truth data, and evaluate performance metrics. - Calibrate Object Detection Confidence Scores
This example shows how to calibrate the confidence scores of an object using Platt scaling.













