필터 지우기
필터 지우기

imagedatastore, Add Folder location

조회 수: 2 (최근 30일)
Rayan Matlob
Rayan Matlob 2022년 7월 13일
편집: Kojiro Saito 2022년 7월 14일
Hi
for the Folder in imagedatastore, afterrandomizeing the images order and labels, the folder value changed from
"C:\Users\R_9_1_GSM_5_original"
to
val=
any way to manually add location again?
the problem accured as follow: as i have 4 imagedatastore and i need to randonly resort the images for all the datastore in the same manner.
for a dataset with two classes (good and bad), when i split data as :
[imdsTrain,imdsValidation] = splitEachLabel(data,0.75)
i will get the images in Files as Good Good Good Good Good Good Good ....948 time then i will get 250 bad bad bad bad bad ...
so i used to change the order and changed the labels manually.
order_train = randperm(numel(imdsTrain.Files))
imdsTrain.Files = imdsTrain_1.Files(order_train);
after these two steps the folder location changed to Val=.
Regards

채택된 답변

Kojiro Saito
Kojiro Saito 2022년 7월 13일
편집: Kojiro Saito 2022년 7월 14일
I think shuffle would work fine.
[imdsTrain,imdsValidation] = splitEachLabel(data,0.75);
imdsTrain = shuffle(imdsTrain);
UPDATED
Based on your futher qualification, I think subset would be better.
imdsTrain = subset(imdsTrain_1, order_train);
  댓글 수: 1
Rayan Matlob
Rayan Matlob 2022년 7월 13일
편집: Rayan Matlob 2022년 7월 13일
@Kojiro Saito, that is correct but i need something else that when i use on different datastore like (imdsTrain, imdsTrain_1,imdsTrain_2,imdsTrain_3) give the same ordering.
next image, the labeling doesn't has the same ordering.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by