How to create training data for object detection

5 views (last 30 days)
渓太 小野
渓太 小野 on 12 Jun 2020
Answered: T.Nikhil kumar on 9 Jul 2022 at 11:24
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).

Answers (2)

Kanika Gupta
Kanika Gupta on 24 Jun 2020

T.Nikhil kumar
T.Nikhil kumar on 9 Jul 2022 at 11:24
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!