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

2 次查看(过去 30 天)
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 个评论
Ashaikh Saad
Ashaikh Saad 2022-4-26
编辑:Ashaikh Saad 2022-4-26
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!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by