-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot_detector_train.m
19 lines (13 loc) · 6.25 KB
/
bot_detector_train.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
load('Turtle_bot_acf_detector2.mat','gTruth')
gTruth.LabelDefinitions
turtlebotGroundTruth = selectLabels(gTruth,'Turtlebot');
trainingData = objectDetectorTrainingData(turtlebotGroundTruth);
summary(trainingData);
acfDetector = trainACFObjectDetector(trainingData,'NegativeSamplesFactor',2);
save('use_for_turtlebot_detection.mat','acfDetector')
I = imread('test6.jpg');
bboxes = detect(acfDetector, I); (acfDetector,I);
annotation = acfDetector.ModelName;
I = insertObjectAnnotation(I,'rectangle',bboxes,annotation);
figure
imshow(I)