How to train ACF detector with groundTruthMultisignal object

4 Ansichten (letzte 30 Tage)
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);

Akzeptierte Antwort

Malay Agarwal
Malay Agarwal am 24 Jun. 2024
Bearbeitet: Malay Agarwal am 27 Jun. 2024
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 Kommentar
Liam Viney
Liam Viney am 25 Jun. 2024
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by