This project has been done in the field of image processing, which is one of the pursuits of artificial intelligence. In the project ,well known CIFAR10 dataset and CNN architecture, which has proven itself successfully in image processing from deep learning is used.
The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images. It was collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton.
First we normalized the data and then made it categorical. Afterwards for data augmentation we used ImageDataGenerator. CNN architecture is shown belown. There are some changes in the model. These are:
- This model has been strengthened by increasing its complexity.
- Optimizer is chosen as Adam and default parameters set.
- ReduceLROnPlateau and EarlyStopping callbacks added to prevent overfitting and overtraining.
After the model training is finished, the accuracy and loss graphs of the training are shown in the following two figures. The accuracy of the model is %91.74.
Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.
- You can load a local image or a url.
- The top 3 predictions of the image that loaded and their percentage will be shown in redirected page. The following two figure are outputs of the web programming, FLASK.
- Fork this repository.
$ git clone https://github.com/MelihGulum/CIFAR-10-CNN-FLASK-Deployment.git
- Load the dependencies of the project
NOTE: This dependencies not including the Deep Learning part. Colab meet all dependencies (such as tensorflow).
pip install -r requirements.txt
- Now you can run app.py. But if you want you can run .ipynb and you can build your own model. It is up to you.