주요 콘텐츠

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

객체 검출

컨벌루션 신경망(CNN 또는 ConvNet)을 사용하여 분류, 객체 검출, 전이 학습 수행, 커스터마이즈된 검출기 만들기

객체 검출은 영상 또는 비디오에서 객체 인스턴스를 찾기 위한 컴퓨터 비전 기법입니다. 객체 검출 알고리즘은 의미 있는 결과를 생성하기 위해 일반적으로 머신러닝 또는 딥러닝을 활용합니다. 사람은 영상이나 비디오를 보고 바로 관심 객체를 인식하고 찾을 수 있습니다. 객체 검출의 목표는 컴퓨터를 사용하여 이러한 사람의 지능을 재현하는 것입니다. 어떤 객체 검출 방법이 가장 적합한지는 사용자가 해결하려는 문제와 해당 응용 분야에 따라 다릅니다.

딥러닝 기법은 레이블이 지정된 훈련 영상이 아주 많이 필요하며, 따라서 모델 훈련에 걸리는 시간을 줄이기 위해 GPU를 사용할 것을 권장합니다. 딥러닝 기반의 객체 검출은 YOLO 같은 컨벌루션 신경망(CNN 또는 ConvNet)을 사용하거나 SSD(single-shot detection)를 사용합니다. 커스텀 객체 검출기를 훈련시킬 수도 있고, 사전 훈련된 신경망으로 시작해서 응용 사례에 맞게 미세 조정하는 전이 학습을 활용하는 방식으로 사전 훈련된 객체 검출기를 사용할 수도 있습니다. 컨벌루션 신경망을 사용하려면 Deep Learning Toolbox™가 필요합니다. 훈련과 예측은 CUDA®가 사용 가능한 GPU에서 지원됩니다. GPU를 사용하는 것이 권장되며, 이를 위해서는 Parallel Computing Toolbox™가 필요합니다. 자세한 내용은 Computer Vision Toolbox 기본 설정Parallel Computing Support in MathWorks Products (Parallel Computing Toolbox) 항목을 참조하십시오.

객체 검출을 위한 머신러닝 기법으로는 ACF(Aggregate Channel Features), HOG(Histograms of Oriented Gradient) 특징을 사용하는 SVM(서포트 벡터 머신) 분류, 사람의 얼굴이나 상반신 검출을 위한 Viola-Jones 알고리즘 등이 있습니다. 사전 훈련된 객체 검출기로 시작하거나 응용 사례에 적합한 커스텀 객체 검출기를 만들 수 있습니다.

Labeled boats, neural network, and person detector

영상 레이블 지정기컴퓨터 비전 응용 분야에서 영상에 레이블 지정
비디오 레이블 지정기Label video for computer vision applications

함수

모두 확장

딥러닝 검출기

rtmdetObjectDetectorDetect objects using RTMDet object detector (R2024b 이후)
ssdObjectDetectorDetect objects using SSD deep learning detector
yolov2ObjectDetectorDetect objects using YOLO v2 object detector
yolov3ObjectDetectorDetect objects using YOLO v3 object detector (R2021a 이후)
yolov4ObjectDetectorDetect objects using YOLO v4 object detector (R2022a 이후)
yoloxObjectDetectorDetect objects using YOLOX object detector (R2023b 이후)
peopleDetectorDetect people using pretrained deep learning object detector (R2024b 이후)
faceDetectorDetect faces using pretrained RetinaFace face detector (R2025a 이후)

특징 기반 검출기

readAprilTagDetect and estimate pose for AprilTag in image
readArucoMarkerDetect and estimate pose for ArUco marker in image (R2024a 이후)
generateArucoMarkerGenerate ArUco marker images (R2024a 이후)
readBarcodeDetect and decode 1-D or 2-D barcode in image
acfObjectDetectorDetect objects using aggregate channel features
peopleDetectorACFDetect people using aggregate channel features
vision.CascadeObjectDetectorDetect objects using the Viola-Jones algorithm
vision.ForegroundDetectorForeground detection using Gaussian mixture models
vision.BlobAnalysisProperties of connected regions

특징점을 사용한 객체 검출

detectBRISKFeaturesBRISK 특징 검출
detectFASTFeaturesFAST 알고리즘을 사용하여 코너 검출
detectHarrisFeaturesHarris–Stephens 알고리즘을 사용하여 코너 검출
detectKAZEFeaturesDetect KAZE features
detectMinEigenFeatures최소 고유값 알고리즘을 사용하여 코너 검출
detectMSERFeaturesDetect MSER features
detectORBFeaturesDetect ORB keypoints
detectSIFTFeaturesSIFT(Scale-Invariant Feature Transform) 특징 검출 (R2021b 이후)
detectSURFFeaturesSURF 특징 검출
extractFeaturesExtract interest point descriptors
matchFeatures매칭되는 특징 찾기

검출된 객체 선택

selectStrongestBboxSelect strongest bounding boxes from overlapping clusters using nonmaximal suppression (NMS)
selectStrongestBboxMulticlassSelect strongest multiclass bounding boxes from overlapping clusters using nonmaximal suppression (NMS)

훈련 데이터 불러오기

boxLabelDatastoreDatastore for bounding box label data
groundTruthGround truth label data
imageDatastore이미지 데이터의 데이터저장소
objectDetectorTrainingDataCreate training data for an object detector
combine여러 데이터저장소의 데이터 결합

특징 기반 객체 검출기 훈련

trainACFObjectDetectorTrain ACF object detector
trainCascadeObjectDetectorTrain cascade object detector model
trainImageCategoryClassifierTrain an image category classifier

딥러닝 기반 객체 검출기 훈련

trainSSDObjectDetectorTrain SSD deep learning object detector
trainYOLOv2ObjectDetectorTrain YOLO v2 object detector
trainYOLOv3ObjectDetectorTrain YOLO v3 object detector (R2024a 이후)
trainYOLOv4ObjectDetectorTrain YOLO v4 object detector (R2022a 이후)
trainYOLOXObjectDetectorTrain YOLOX object detector (R2023b 이후)

딥러닝을 위한 훈련 데이터 증강 및 전처리

balanceBoxLabelsBalance bounding box labels for object detection
bboxcropCrop bounding boxes
bboxeraseRemove bounding boxes (R2021a 이후)
bboxresizeResize bounding boxes
bboxwarpApply geometric transformation to bounding boxes
bbox2pointsConvert rectangle to corner points list
blockLocationsWithROISelect image block locations that contain bounding box ROIs (R2025a 이후)
imwarp영상에 기하 변환 적용
imcrop영상 자르기
imresize이미지 크기 조정
randomAffine2dCreate randomized 2-D affine transformation
centerCropWindow2d사각 형태의 가운데 자르기 창 만들기
randomWindow2dRandomly select rectangular region in image (R2021a 이후)
integralImageCalculate 2-D integral image

R-CNN(Regions With Convolutional Neural Networks)

roiAlignLayerNon-quantized ROI pooling layer for Mask-CNN
roiMaxPooling2dLayerNeural network layer used to output fixed-size feature maps for rectangular ROIs
roialignNon-quantized ROI pooling of dlarray data (R2021b 이후)

YOLO v2(You Only Look Once 버전 2)

yolov2TransformLayerCreate transform layer for YOLO v2 object detection network
spaceToDepthLayerSpace to depth layer

중점 손실

focalCrossEntropyCompute focal cross-entropy loss

SSD(Single Shot Detector)

ssdMergeLayerCreate SSD merge layer for object detection

앵커 상자

estimateAnchorBoxesEstimate anchor boxes for deep learning object detectors
cuboid2imgProject cuboids from 3-D world coordinates to 2-D image coordinates (R2022b 이후)
insertObjectAnnotation트루컬러 또는 회색조 영상 또는 비디오에 주석 추가
insertObjectMask Insert masks in image or video stream
insertShape영상 또는 비디오에 형태 삽입
showShapeDisplay shapes on image, video, or point cloud
evaluateObjectDetectionEvaluate object detection data set against ground truth (R2023b 이후)
objectDetectionMetricsObject detection quality metrics (R2023b 이후)
mAPObjectDetectionMetricMean average precision (mAP) metric for object detection (R2024a 이후)
bboxOverlapRatioCompute bounding box overlap ratio
bboxPrecisionRecallCompute bounding box precision and recall against ground truth

블록

Deep Learning Object Detector훈련된 딥러닝 객체 검출기를 사용하여 객체 검출 (R2021b 이후)

도움말 항목

시작하기

객체 검출 및 인스턴스 분할을 위해 데이터 훈련시키기

딥러닝 시작하기

  • MATLAB의 딥러닝 (Deep Learning Toolbox)
    사전 훈련된 신경망 및 전이 학습, 그리고 GPU, CPU, 클러스터 및 클라우드에서의 훈련 등 분류 및 회귀에 컨벌루션 신경망을 사용하여 MATLAB®의 딥러닝 기능을 알아봅니다.
  • 사전 훈련된 심층 신경망 (Deep Learning Toolbox)
    분류, 전이 학습 및 특징 추출을 위해 사전 훈련된 컨벌루션 신경망을 다운로드하고 사용하는 방법을 알아봅니다.

추천 예제