Effacer les filtres
Effacer les filtres

classification network with images, around 400 classes, each class minimum 5 images, around 4000 images

6 vues (au cours des 30 derniers jours)
Hi, i'm doing a project for the university and i have to build a network for classify vectors. My idea now is convert the vector in an image with "imagesc" function. I 'm thinking also at another way to do using pca and then using the pre-existent network in the "classification learner app" without passing throug the images, but increasing the images the accuracy becomes lower.
This in how i build the network for image classification (i've taken it from an example in matworks). Do you think that increasing the images the accuracy of the image network can increase? there are problems with the chosen layer? there are problems with the number of layers?
Thank you, Gianluca
"layers=[
imageInputLayer([263 350 3],'Name','Input')
convolution2dLayer(5,8,'Padding','same','Name','Conv_1')
batchNormalizationLayer('Name','BN_1')
reluLayer('Name','Relu_1')
maxPooling2dLayer(3,'Stride',3,'Name','MaxPool_1')
convolution2dLayer(5,16,'Padding','same','Name','Conv_2')
batchNormalizationLayer('Name','BN_2')
reluLayer('Name','Relu_2')
maxPooling2dLayer(2,'Stride',2,'Name','MaxPool_2')
convolution2dLayer(3,32,'Padding','same','Name','Conv_3')
batchNormalizationLayer('Name','BN_3')
reluLayer('Name','Relu_3')
maxPooling2dLayer(2,'Stride',2,'Name','MaxPool_3')
convolution2dLayer(3,64,'Padding','same','Name','Conv_4')
batchNormalizationLayer('Name','BN_4')
reluLayer('Name','Relu_4')
convolution2dLayer(3,128,'Padding','same','Name','Conv_5')
batchNormalizationLayer('Name','BN_5')
reluLayer('Name','Relu_5')
% fullyConnectedLayer(2000,'Name','FC1')
% reluLayer('Name','Relu_6')
% fullyConnectedLayer(1000,'Name','FC2')
% reluLayer('Name','Relu_7')
fullyConnectedLayer(241,'Name','FC')
softmaxLayer('Name','SoftMax');
classificationLayer('Name','Output Classification');
];
options=trainingOptions('sgdm','InitialLearnRate',1e-4,'MiniBatchSize',5,'MaxEpochs',10,'Shuffle',['every-' ...
'epoch'],'ValidationData',TestImages,'ValidationFrequency',30,'Verbose',false,'Plots','training-progress');
net=trainNetwork(TrainImages,layers,options); %Network Training
YPred = classify(net,TestImages); %Recognize
YValidation = TestImages.Labels; %Getting Labels
accuracy = sum(YPred == YValidation)/numel(YValidation);"

Réponse acceptée

Image Analyst
Image Analyst le 19 Mar 2024
Yes you can convert vectors into images and then use deep learning to classify the vectors. However I'm not seeing the part where you convert the vectors into 263 350 3 true color RGB images.
Of course more training images would be better. Having on average 10 images per class to train on is very very low and will probably not provide very good predictions unless all the classes are vastly different from each other.
  2 commentaires
Gianluca Ceci
Gianluca Ceci le 19 Mar 2024
Hi, i've posted only the code of the neural network, i've incresed my dataset reaching at least 20 for each class. The accuracy increase of 16% from 20 to 36 so i think that i'm proceding well. I wish

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by