How to convert a .csv file into a MATLAB groundtruth format for different classes of vehicles in a dataset?

2 visualizaciones (últimos 30 días)
Hi. Below is the attached csv file for different classes of vehicles corresponding to their respective images.
When I open this csv file in MATLAB, after running the following code, I get the following view of the table :
T=readtable('C:\Users\Muhammad Sanwal\Desktop\COMSATS\The 9th Semester (FA20)\FYP pt 1\MIO-TCD-Localization\gt_train.csv');
% ^^^^^^^^^------ your csv filename
p=T{:,1};
q=T{:,2};
save('C:\Users\Muhammad Sanwal\Desktop\COMSATS\The 9th Semester (FA20)\FYP pt 1\MIO-TCD-Localization\gt_train.mat','p','q')
% ^^^^^^^^^----- your resulting .mat filename
Figure 1:Table in .csv format:
Figure 2: Table in .mat format
However, I want the table to be in the following format:
Figure 3: Desired format (with bounding boxes to be shown in square brackets)
Since my vehicle dataset contains more than 100000 images, is there a code that can convert the csv file that i have attached into a table of the desired format? Because doing it manually using image labeler takes a lot of time.
For more details, my friend has posted a similar query in the following link:
Kindly help me solve this problem
  7 comentarios
Ashaikh Saad
Ashaikh Saad el 26 de Abr. de 2022
Editada: Ashaikh Saad el 26 de Abr. de 2022
Hi @dpb @Muhammad Sanwal @tara saber I am currently working on this dataset and facing the same issue, I would like to convert the above csv file to a YOLO txt or XML format, any help would be highly appreciated. Thanks!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by