IMAGE CLASSIFICATION
Artificial Neural Networks:
1. (ANNs) and simulated neural networks (SNNs) are at the core of deep learning techniques and
form a subfield of machine learning. Their design is based on that of the human brain, and their
function is meant to resemble that of biological neurons communicating with one another, hence
the name and the structure.
2. Input, hidden, and output layers make up the node layers that make up an artificial neural network
(ANN). Each artificial neuron, or node, in the network has a weight and a threshold with which it
interacts. Node activation occurs at the next network layer if and only if its output is greater than
the set threshold. Unless this condition is met, no information is forwarded to the subsequent
network layer.
Advantages:
• A linear program cannot accomplish the same things that a neural network can.
• The parallel architecture of the neural network allows it to continue functioning normally even if a
single component fails.
• Since a neural network is self-learning, it rarely requires updating.
• It can be used in any kind of program.
• There will be no issues in carrying it out.
Disadvantages:
• In order for the neural network to function, training is required.
• A neural network's architecture is distinct from that of a computer's CPU. Thus, it is obligatory to
emulate.
• Intense computational resources needed for big neural networks.
Support Vector Machine:
1. It is the most widely used Supervised Learning technique, Support Vector Machine (SVM) is also
effective when applied to Regression situations. On the other hand, its main application is in
Machine Learning for Classification issues.
2. To classify fresh data points efficiently in the future, the SVM algorithm seeks to find the optimal
line or decision boundary that divides the space into n distinct classes. A hyperplane describes this
optimal decision boundary.
3. If you want to make a hyperplane, SVM can pick the most extreme points or vectors for you. The
name "Support Vector Machine" refers to the fact that this technique is designed to help in the most
severe instances.
K-Nearest Neighbors:
1. In Machine Learning algorithms based on the Supervised Learning technique K-NN algorithm is
the simplest one.
2. The K-Nearest Neighbors algorithm classifies new cases or data by assuming their similarities to
existing cases and then assigning them to the most similar class.
3. K-Nearest Neighbors (K-NN) is an algorithm that uses all the available data to determine how to
label a new data point. This means that as fresh data becomes available, the K- NN algorithm can
quickly and simply categorize it into a well-suited category.
4. K-NN is a versatile approach that may be used regression and classification, but it is typically
employed for the latter.
5. The K-Nearest Neighbors (K-NN) algorithm is non-parametric, which implies it does not
presuppose anything about the data being analyzed.
6. Mainly because it doesn't immediately apply what it learns from the training set, this method is
sometimes referred to as a "lazy learner algorithm."
Advantages of KNN:
• It's easy to put into action.
• It can withstand the ambiguity of the training data.
• If there is a lot of data available for training, it may be more efficient.
Disadvantages of KNN:
• Always requires figuring out what K is supposed to be, which can get tricky sometimes.
• The distance between all the data points in the training samples needs to be calculated, which
increases the computational cost.
Challenge:
Predicting the type of wild animals from the given picture.
Data:
Here we are using the wild animals’ dataset. It has 6 classes: ‘Cheetah’, ‘Elephant’, ‘Jaguar’, ‘Leopard’,
‘Lion’, ‘Tiger’. And resizing the images to 255.
Importing the required methods:
Numbers of classes (Nothing but the folders)
Converting the images into numbers as a arrays
Splitting the data into train and test sets
Train Test Split:
Artificial Neural Network:
Fitting the model for 40 epochs & generating a report on the test data:
ANN – DenseNet201
Using pre-trained model as transfer learning
Training vs Validation accuracy:
Output:
Support Vector Classifier:
SVM Accuracy:
KNN:
Contributions:
1. Encoded values to all six different Animal data.
2. Initiated the preprocessing and then split the data into test and train.
3. Implemented different classifier methods with reference and that I can say Neural network model
performance is the best.
Challenges:
1. Choosing the appropriate parameters to improve the model's accuracy has been challenging.
2. More run time is required to evaluate the model's performance.
3. Tuning the different models to get accurate results.
Conclusion:
Out of all the Neural Network Model performs better than other traditional ML models in terms of
accuracy and other classification metrics such as precision, recall and f1 score.
References:
https://www.javatpoint.com/machine-learning-support-vector-machine-algorithm
https://www.javatpoint.com/k-nearest-neighbor-algorithm-for-machine-learning
https://www.ibm.com/cloud/learn/neural-networks