How can I insert my yolo dataset as a table

조회 수: 3 (최근 30일)
Mohamed Zewail
Mohamed Zewail 2022년 1월 12일
댓글: yanqi liu 2022년 1월 14일
I got a dataset for human tracking, since the pretrained models I found on MATLAB website were for detecting vehicles, but I am struggling to find the way to input my data as ground truth for my model. The dataset I got is ready and cropped. I need to input it as a table. I am using this code and getting the error 'The RowNames property must contain one name for each row in the table.'. I want the table to have 2 columns, one with image path and the other with its data matrix.
myFolder = 'C:\Users\Zewail\Downloads\rois\jpg_Extracted_PIDS';
dinfo = dir(fullfile(myFolder, '**/*.jpg'));
n = numel(dinfo);
T = table(cell(1, n), 'VariableNames', {'image'}, 'RowNames', {dinfo.name});
for K = 1 : n
filename = dinfo(K).name;
filecontent = imread(filename);
T{filename,1} = filecontent;
end

답변 (1개)

yanqi liu
yanqi liu 2022년 1월 13일
yes,sir,please check the demo:
make the dataset as table,and modify model parameter to train
  댓글 수: 4
Mohamed Zewail
Mohamed Zewail 2022년 1월 13일
The dataset I have is already cropped to the ROI, does not need labelling I believe. I am trying to create a table with the same format as vehicleDatasetGroundTruth.mat that is what I need help on. So basically I need a 2 column table, the first column containing the image's path and the second column containg the image as a matrix. This is the code I am using but I am getting the error "The RowNames property must contain one name for each row in the table."
myFolder = 'C:\Users\Zewail\Downloads\rois\jpg_Extracted_PIDS';
dinfo = dir(fullfile(myFolder, '**/*.jpg'));
n = numel(dinfo);
T = table(cell(1, n), 'VariableNames', {'image'}, 'RowNames', {dinfo.name});
for K = 1 : n
filename = dinfo(K).name;
filecontent = imread(filename);
T{filename,1} = filecontent;
end
yanqi liu
yanqi liu 2022년 1월 14일
yes,sir,if possible, can you upload your mat file,may check
make data transfer

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by