ICABIR - Identification of Clothes and Accessories Based on Image Recognition
- Install the ICABIR.m
- Install the Fashion-MNIST dataset zipped .jpeg images from Dropbox link
- Unzip the dataset
In ICABIR.m file one should modify the lines to set the full path to the unzipped datasets:
%% Getting the data
% Full path of train images data set folder (subject to change)
trainImgFolder = fullfile();
% Full path of test images data set folder (subject to change)
testImgFolder = fullfile();
Reference on how to use "fullfile()": MathWorks fullfile() documentation
- trainImgFolder variable should point to ".../Datasets/Train"
- testImgFolder variable should point to ".../Datasets/Test"
- Datasets folder is optional
- User calls the ICABIR(x) function, while passing a singular integer value x, between 0 and 9 inclusively, which represents the object, NN should classify
Index | Object |
---|---|
0 | T-shirt/top |
1 | Trouser |
2 | Pullover |
3 | Dress |
4 | Coat |
5 | Sandal |
6 | Shirt |
7 | Sneaker |
8 | Bag |
9 | Ankle boot |
- Importing layers of a convolutional neural network from digitsDAGnet.h5 modelfile. Layer structure is shown on the following picture
-
Creating an ImageDatastore object, which automatically labels the images based on names of the folders, they are in. An image datastore allows to store large image data, including data that does not fit in memory, and efficiently read batches of images during training of a convolutional neural network
-
Choosing a random image of a label x in the folder, denoted by testImgFolder, which NN has not βseenβ before
-
Initializing the NN training options as:
- sgdm β Stochastic Gradient Descent with Momentum algorithm
- MaxEpochs β maximum amount of elapsing epochs, while network will be training itself; limited in order to prevent overfitting
- InitialLearnRate β initial learning rate of the NN
-
Training the NN with the train data set, and saving its data to the NN object
-
Classifying the random image of the user-entered label, and saving result into classificationResult variable
-
Preparing the output figure data
-
Showing the output figure
If NN has properly classified the image, output figure title labels should be the same | If NN has not properly classified the image, output figure title labels should be different |
---|---|
- img ( 3 )
- correct_classification_result_ex.jpg
- wrong_classification_result_ex.jpg
- layer_structure.png
- ICABIR.m
- README.md
- LICENCE
This project is licensed under the MIT Licence. See the LICENSE file for details
There is no Deep Learning Toolbox installed on one's machine
Install Deep Learning Toolbox
The following lines were not changed upon configuration
%% Getting the data
% Full path of train images data set folder (subject to change)
trainImgFolder = fullfile();
% Full path of test images data set folder (subject to change)
testImgFolder = fullfile();
Follow Configuration instructions
- Roman Bezusiak - Initial work - github.com
- Wikimedia Foundation Inc., Wikipedia - Encyclopedia materials - wikipedia.org
- Mathworks Inc., Mathworks - MATLAB Documentation - mathworks.com
- Fashion-MNIST - Fashion-MNIST dataset - github.com
- Deep Learning Toolbox - Base of the project - mathworks.com
- Importing TensorFlow-Keras models - Self-explanatory -mathworks.com
- mnist-csv-png - Fashion-MNIST dataset convertion script - github.com