How to train ACF detector with groundTruthMultisignal object

4 次查看(过去 30 天)
I have labeled a data set of sonar images using the ground truth labler, and I want to use the lables in the trainACFObjectDetector function, to create a detector for further labeling. I used the ground truth labeler app because I can play a rgb video alongside the sonar feed, aiding with identifying objects in the sonar images. However the ground truth app producess a groundTruthMultisignal object, and I am unsure how to use this to train an ACF detector.
%% train acf detector
imds = sonar_files; % conatins path to each image
load("rec0gt.mat")
T = table(gTruth.ROILabelData.processed_sonar);
blds = boxLabelDatastore(T);
ds = combine(imds,blds);
acfDetector = trainACFObjectDetector(ds,NegativeSamplesFactor=2);

采纳的回答

Malay Agarwal
Malay Agarwal 2024-6-24
编辑:Malay Agarwal 2024-6-27
I understand that you want to train an ACF detector using labeled data you've created using the Ground Truth Labeler App.
This is possible using the "gatherLabelData" function, which takes in a "groundTruthMultisignal" object and extracts the label data from it.
Please refer to the following link for an example on how to use the "gatherLabelData" function to create a training dataset for an object detector model: https://www.mathworks.com/help/driving/ref/groundtruthmultisignal.gatherlabeldata.html#mw_740aa793-a8dc-497a-b997-becab36ace46.
In the example, after this code:
imds = imageDatastore(fileNames{1});
blds = boxLabelDatastore(labelData{1});
You can combine the two datastores using the "combine" function and then use the combined datastore with "trainACFObjectDetector" to train an ACF detector.
Please refer to the following links for more information:
Hope this helps!
  1 个评论
Liam Viney
Liam Viney 2024-6-25
Thank you, I got it working.
Another issue I had was that I was using rotated rectangles for my labeling, which I dont think is supported by trainACFObjectDetector. I switched to axis orientated rectangles and everything seems to be working.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by