Skip to content

krishnadevz/image-classification-and-manipulation-in-python-machine-learning

Repository files navigation

image-classification-and-manipulation-in-python-machine-learning

image-classifiaction on the fashion-mnist inbuilt dataset in keras library all image classifiaction operations are performed on Fashion-MNIST dataset and the new thing in this project is image manipulation not done yet on this dataset i done by taking snap of the images and i done image manipulation you cannot find image manipulation on fashion-mnist dataset on Google :) here you can get

Prerequisites

What things you need to install the packages and how to install them

install anaconda and jupyter notebook
tensorflow ,pandas,numpy,python(pip)Preferred Installer Program (Python),amtplotlib,keras etc.
if you don't install this then you get error after
that you to install that ok
conda create -n myenv pip python=3.7
then 
activate myenv 
then you can run this project in your jupyter notebook


used functions ReLU (Rectified Linear Unit) Activation Function The ReLU is the most used activation function in the world right now.Since, it is used in almost all the convolutional neural networks or deep learning.
Adam is an optimization algorithm that can used instead of the classical stochastic gradient descent procedure to update network weights iterative based in training data. ... The algorithm is called Adam.
numpy.argmax. Returns the indices of the maximum values along an axis. ... By default, the index is into the flattened array, otherwise along the specified axis.

image classifiaction program workflow


Steps for image classification in python on fashion MNIST dataset
Step 1 First we need to import all libraries that are listed in below images then we have to access that dataset in keras library and then we have to give class labels to images then after that we have to train and test load the images how to that is given in below image

one

Step 2 here we need to get images from the data for we are taking images samples in test_images or in train_images and we are taking samples of that images and we need to preprocess the data sample Preview image is below

two

Step 3 Here we need to acess test_images and train_images and from that we are printing some of the images from the inbuilt dataset

three

Step 4 Here we need to setup the layers for images four The number of epochs is a hyperparameter that defines the number times that the learning algorithm will work through the entire training dataset. One epoch means that each sample in the training dataset has had an opportunity to update the internal model parameters. An epoch is comprised of one or more batches
Step 5 Here in this code we have to check accuracy of the model and making predictions on them

five

six

Step 6

Now we are going to plot with prediction several image from our prediction and in which prediction we got our result with images and this model is 80% correct and predictions result prediction_result = np.argmax(predictions_single[0]) output=9 six six

for getting code you can grow through the .ipynb main code file

image manipulation in python

After accessing the image from fashinmnist dataset i got below image i snipped that image and after that saved in my jupyter directory and further details see below 4
After that i imported pillow library for manipulation of image in python See below 44 code snippet 77
After that this two results you can get 45 56
Gray cycle image is below 98 I hope you understand and i hope you appreciate my documentation+code snippes i worked more this project thank you to all universe.

Contributing

Please read CONTRIBUTING.md for contributing click this link.

Author