Skip to content

DMBabich/Georgy_recognition

Repository files navigation

Georgy_recognition


This project is classification St. George on image.
In this project, a convolutional neural network was built, capable of recognizing the presence or absence of St. George in the image with an accuracy of ~ 78%.


What do you need for repeat this project?

You need install:

  • python = "^3.7"
  • jupyter = "^1.0.0"
  • matplotlib = "3.3.2"
  • numpy = "1.19.2"
  • tensorflow = "2.1.0"
  • requests = "2.25.1"
  • pandas = "1.1.2"
    OR
    Use Poetry

Repeat: Step by step

Step 1: Download images from csv file

  • Run Download images notebook
  • When you do this, the notebook will create 2 folders:
    yes (all 2681 images with George) and no (all 3366 images without George).

Step 2: Clear dataset

  • In the yes folder, you need to delete bad images (real people, castle, etc.)
  • After cleaning I have 2259 images in yes folder

Step 3: Split images

  • Run Split images notebook
  • When you start this notebook, all data will be split at 70% / 30%. This is required to create a training and test dataset.
  • Will created 2 folder: train (for train dataset) and test (for test dataset)

Step 4: Learn CNN model

  • Run Softmax model copy
  • On this step, we create and train convolutional neural network. We use datagen because have small data.
    After train model, we plot accuracy and loss.
    smooth accuracy
    smooth loss

Step 5: Check model

  • Run Example notebook
  • In this notebook, we test our model with our data. We are using images from the example folder.
    Notebook uses class predictions. The forecast value will be printed in the last cell

Finally, after all the steps, you will have the following structure:
after all steps


Links