How to convert a .csv file into a MATLAB groundtruth format for different classes of vehicles in a dataset?
조회 수: 3 (최근 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
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 Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!