Deliverable 1: Implement playing card detection using CNN
The purpose of the project was to get familiar with neural networks.
IMPLEMENTATION DETAILS
Implemented using CNN architecture to detect the suits of Ace cards. The project was implemented using keras using tensorflow as backend on google colab as editor.
DATASET
Gathered the dataset by downloading the images from google. Also, clicked photographs on my own and transformed the images using openCV.
Size of dataset:
Training set : 116 images
Test Set : 20 images
dataset for reference : 1. training data set 2. test data set
LAYERS USED
INPUT SIZE : 28x28x3
Convolutional Layer 1 :
Activation Function : Relu
Number Of Filters : 32
Size Of Filter : 3X3
Convolutional Layer 2:
Activation Function : Relu
Number Of Filters : 32
Size Of Filter : 3X3
Convolutional Layer 3:
Activation Function : Relu
Number Of Filters : 64
Size Of Filter : 3X3
Convolutional Layer 4:
Activation Function : Relu
Number Of Filters : 64
Size Of Filter : 3X3
Convolutional Layer 5:
Activation Function : Relu
Number Of Filters : 64
Size Of Filter : 3X3
Convolutional Layer 6:
Activation Function : Relu
Number Of Filters : 64
Size Of Filter : 3X3
MaxPooling2D Layer 7:
pool_size=(2, 2)
Dropout Layer 8:
0.5
Dense Layer 9:
Activation Function : Relu
Units : 1000
Dropout Layer 10:
0.5
Dense Layer 9:
Activation Function : softmax
Units : 4
loss function used ='categorical_crossentropy'
optimizer='adam'
metrics=['accuracy'])
I used 20 epochs with the batch size of 16. CNN gives satisfactory results with 11 layers. Hence, in my opinion additional layers were not required.
GITHUB
SuitDetection.ipynb
|