How to create training data for object detection

2 次查看(过去 30 天)
In order to create ground truth data
https://jp.mathworks.com/help/vision/ref/ groundtruth.html
I'm referring to the section of 'Creating a Ground Truth for Signs and Vehicles'(https://jp.mathworks.com/help/vision/ref/groundtruth.html),
but I don't understand how to make a mat format file like 'stopSignsAndCars.mat'.
As in the example, I want to create a table array that contains the file name (imageFilename) and the coordinates of the label (e.g. stopSign).

回答(2 个)

Kanika Gupta
Kanika Gupta 2020-6-24

T.Nikhil kumar
T.Nikhil kumar 2022-7-9
Hey!
I understand that you want the groundTruth in the form of a table two columns out of which one has the file paths and the other has bounding box coordinates.
I assume you are creating your own groundTruth from certain images using Image Labeler app in MATLAB.For more knowledge on this app visit (Link: https://www.mathworks.com/help/vision/ug/get-started-with-the-image-labeler.html)
Now if you follow the above way and label your images, then click on export button in the label tab of Image Labeler app. Now, export the labels to the workspace in the export format of table instead of groundTruth. This will give you the final required table. Follow as per the below image:
After this use the following command to update the file paths according to the present working directory.
gTruth.imageFilename=fullfile(pwd, gTruth.imageFilename);

Community Treasure Hunt

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

Start Hunting!

Translated by