Here i have 193 folders, where in each folder contains a set of images. In each folder, total number of images are not the same. It is like 15, 28, 64, 96, 125, 265, 456, 564, and so on. Now i need to take only those folders where my images count is more than 100.(out of these 193 folders). Then splitting it into training and testing. How i can do it? I tried this code. but its not working properly. Please help.
SetDir = fullfile('D:\MATLAB\Proj_Work\seperated');Imds = imageDatastore(SetDir,'IncludeSubfolders',true,'LabelSource','foldernames');T = countEachLabel(Imds);minSetCount = 100;%min([T.Count]);Imds_New = splitEachLabel(Imds,minSetCount,'randomize');[trainingSet,testSet]=splitEachLabel(Imds_New,0.7,'randomize');