how to read labels of image dataset from mat files

조회 수: 10 (최근 30일)
Suheer Ali
Suheer Ali 2018년 10월 28일
댓글: Suheer Ali 2018년 10월 29일
I have a dataset which contains two folders one for images and another one is the truth_ground which has mat files that has the information about images (number of heads per image) I want to read this dataset so I can get the images with their labels.

채택된 답변

Image Analyst
Image Analyst 2018년 10월 28일
Try this
folder = 'c:\whatever\truth_ground';
fullFileName = fullfile(folder, 'someName.mat')
s = load(fullFileName);
  댓글 수: 3
Image Analyst
Image Analyst 2018년 10월 28일
Never, ever, EVER overwrite the built in path variable with a variable of your own with the same name. Notice I did not do that. I used folder instead.
You can also use sprintf() - it's simpler than that strcat stuff.
Attach your .mat file if you want more help.
Suheer Ali
Suheer Ali 2018년 10월 29일
hi thanks for your replay I used a dataset in this lisnk
https://github.com/desenzhou/ShanghaiTechDataset
my problem is now with imageDatasore function.
thanks

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by