Computer Vision (CS 6384.002) Project 2: Program Description
Computer Vision (CS 6384.002) Project 2: Program Description
002)
Project 2
Name: Rutuja Narendra Kaushike
Net Id: rnk170000
Program Description:
1. Here, the same code provided by professor has been used as the base code to solve a
problem of creating a classifier for the MNIST data.
2. The training data in our case has only 6,000 images, and each image is shrunk to size
7x7.
3. The goal is to train a CNN to recognize images of digits from the MNIST dataset. This
dataset consists of gray level images of size 28x28.
4. To test the program on different test csv files other than files provided by professor, I
used given fraction_xy.py file with parameters 0.1 and one of seeds : 3,7,8 and 15. I
have got different results on these different parameters (Test accuracies are: 87.86,
88.79, 88.86 and 89.49 respectively).
5. Network Description:
a. The first layer in the network must be a 4 × 4 max pooling layer. This effectively
shrinks the images from 28x28 to 7x7.
b. Then, I have added two Conv2D layers with 64 filters with the frame size of (3 X
3) and with activation function ReLu.
c. Then, I have added a 2 x 2 max pooling layer.
d. Then, I have added two Conv2D layers with 128 filters with the frame size of (3 X
3) and with activation function ReLu.
e. Then, I have added a 2 x 2 max pooling layer.
f. Then I flattened the layers using Flatten().
g. Then I have added a fully connected dense layers to this model. I have added
some parameters to this, for example kernel_regularizer and bias_regularizer.
h. After starting training and tweaking the values for above parameters, I got the
maximum accuracy at kernel_regularizer : 0.002 and bias_ regularizer: 0.003
with activation function ReLu.
i. After all, I just kept dense layer with activation function softmax at the end as it
was given in the code by professor.
6. Epochs: I started off with the default value given = 5. I observer that if I add some more,
I was getting more accurate results. I tried for 5, 8 and 10 and found the best accuracy
at epochs = 8. I did not increase further as there is a time limit of 6 minutes.
1. Keep your training data under small/ with the names: x_train.csv and y_train.csv
2. Keep your testing data under big/ with the names: x_test.csv and y_test.csv
3. Go to the folder containing these two folders and start terminal from there. My
python file should go in the same folder where big/ and small/ are stored.
4. To run the program, just type à python3 file.py