Image Classification
using deep learning
Done By :
Asma Hawari - Qamar AL-Zaman Hafez - Amena Samra - Nader Pervis
CIFR10
It’s mini-images dataset
Consists of 60000 images
Split into 50000 training and
10000 testing
2
CIFR 10 Dataset
3
“ There are thousands of solutions
for this problem and we tried many
to increase the test accuracy .”
4
Preprocessing Data &
Normalization
1. Convert from uint8 to float32
2. Scale the images values to range 0-1
3. Apply OneHotEncoding to the Labels
Train Neural Network from scratch
First we try AlexNet Neural Network
7
AlexNet Architecture
 11*11 kernel size
 5 convolutional layers
 3 fully connected layers
CNN
Convolutional Neural Network
But why CNN Not MLP ?
8
9
CNN Architecture
10
Convolution Operation with kernel size 3*3
11
CNNs learn Hierarchical features
As we go deeper into the network , the neurons get
information from larger parts of the image and from various
other neurons
The neurons at the later layers can learn more complicated
features like eyes / legs
12
Max Pooling :
Pooling layers is mostly used immediately after the
convolutional layer to reduce the spatial size (only width and
height , not depth ) .
This reduces the number of parameters to avoid Overfitting
13
Dropout Layer :
avoid Overfitting by putting Dropout Layer after each Max-
Pooling Layer
14
ReLu ( Rectified Linear Unit ) as Activation Function :
ReLu function is zero when z is less than zero and f(z) is
equal to z when z is above or equal to zero
15
Visualize The Model
What is the CNN result ?
▫ This solution return 78% accuracy which is not bad but
there was Overfitting
16
What is Data Augmentation ?
▫ Rotation of the image , shifting left/right/top/bottom
by some amount , flip the image horizontally or
vertically , zoom ..etc.
17
What is the CNN result ?
▫ To solve the Overfitting Problem we did
DATA AUGMENTATION and it solved the problem !!!
Accuracy is 79.57%
18
Transfer
Learning
What is transfer learning ?
19
To use already trained models on very large amounts of data for
difficult tasks with thousands of classes that research group share in
the competitions like ILSVRC and ImageNet
Transfer Learning
20
Pre-trained Models on :
ImageNet
It contains more than 14 million
images belong to more than
20,000 classes
ILSVRC
ImageNet Large Scale Visual
Recognition Challenge to
evaluate their computer vision
algorithms
The training data subset of
ImageNet 1.2 million images
belong to 1000 class
21
Why Use Pre-trained
Models ?
22
Why Use Pre-trained Models ?
23
20XX
We need powerful GPUs
20XX
It takes a large amount of time
to train the network
20XX
To finding all the unknown
parameters we need a lot of data
20XX
Deep networks have large
number of unknown parameters.
This network is characterized by its simplicity , using only 3*3
convolutional layers stacked on top of each other in increasing depth
VGG16 -VGG19
24
GoogleNet Or InceptionV3
25
The goal of the inception module is to act as a “multi-level feature
extractor “ by computing 1*1 , 3*3 and 5*5 convolutions within the
same module of the network .
The output of these filters are then stacked along the channel
dimensions and before being fed into the next layer in the network
GoogleNet Or InceptionV3
26
What is Vanishing Gradient Problem ?
27
This problem makes it really hard to learn and tune the parameters
of the earlier layers in the network , and it’s becomes worse as the
number of layers in the architectures increase .
ResNet
28
This architecture solved Vanishing gradient problem by identity
mapping
OUR PROCESS IS
29
STEP 3
compare the results
STEP 1
Extract features from The
pre-trained models (VGG16 &
VGG19 & InceptionV3 &
ResNet)
STEP 2
Fine-tuning the parameters
By trying to build LinearSVC
classifier with many possible C
Extract Features
30
Visualze our Features by PCA
31
Fine Tuning The SVM Parameters
32
The Result is
33
91,58
Whoa! That’s a big number, aren’t you proud?
34
83,45
KNN
100%
Total success!
90,37
Logistic Regression
35
36
THANKS!
Any questions?

Image Classification using deep learning