Skip to content

stanley-666/Matlab-Objects-Recognitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Model

Matlab Classify Image Using GoogLeNet see here

Test

Use Alexnet accuracy 97.52%, Googlenet accurarcy 99.44, resnet50 accuracy 89.64% classify 1000 different categories.

Type

We only need six different types of transportation image to be validated

Modify and Training process

1.Delete matlab provided model with last 3 layers.

prevent overfitting

2.connect fully-connected layer, softmax layer, classification layer.

reduce model size and prevent overfitting image

3.set imageAugmenter = imageDataAugmenter(...) mirroring, translation for imageDatastore to create dataset for augumented Train, validation.

image

4.use Inputdata as 80% for train datastore, 20% for validation datastore.

image

5.setting trainingOptions : Initial learning rate, max epochs, mini batchsize.

image image

6.start use net_Train = trainNetwork(augumented training datastore, layers, trainingoptions) to get train model(or net).

image

7.use 20% validation datastore and the net just trained, with classify(net, validationdatastore) to get prediciton scores.

8.use mean(Ypred == imdsValidation.Labels) to get accuracy.

image

9.show the result below.

image

Target: This code is for objects recognition , you can use kaggle dataset. Enviroment: Matlab Training model: googlenet_matlab.mat

detail: validation_cnn.m is validation program. Do: Just change imagedatastore 's parameter to your test image folder(input image) path.

other things you can do: You can create another objects for training like cat, dog ... ex. ../validation/cat/.. or ../validation/dog/..

image image image image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages