(Day 22) Created a Card image classifier model using Neural networks

Ivan Ivanov · January 23, 2024

Hello :) Today is Day 22!

A quick summary of today:

  • Card image classifier using neural networks on Kaggle

I learned about CNN during Course 1, 2 of the TensorFlow developer certificate preparation course and wanted to apply it to new data today. I searched Kaggle and found the following card image dataset.

image

Following the course, first I used ImageDataGenerator

image image

Then made the model

image

Wrote the below to compare train and valid results

image

And finally, evaluated the model on unseen data

image

The results… not that good haha but it was very good practice overall.

Various models were constructed to obtain good performance, by changing layers, learning rates, data augmentation variables, filters of layers… Still, more than 65% accuracy was not obtained with the valid dataset. The loss of some models increased significantly after 5-10 epochs, but the loss of any model did not reach 50% or more accuracy after 100 epochs.

Below are pics of some of the models that I ran.

  • model 1

image image image

  • model 2

image image image

  • model 3 image image image

  • model 4

image image image

  • model 5

image image

  • model 6

image image

stopped the training

  • model 7

image image

stopped the training

  • model 8

image image image

  • model 9

image image

  • model 10

image image

  • model 11

image image

  • model 12

image image

I don’t include all the information in the model picture, it’s Model 1 - base model, and then I just changed the variables. It took quite a while to train. It took about an hour per 20 epochs.

Tomorrow I will try to make some kind of NLP model.


That is all for today!

See you tomorrow :)

Original post in Korean