Interactive Convolutional Neural Network
How to customize your algorithm with Python Streamlit
Image recognition is one of the main topics Deep Learning is focusing on. Indeed, the family of algorithms entitled to deal with image recognition belongs to the class of Neural Networks, typical multi-layers algorithms employed in deep learning tasks.
More specifically, image recognition employs Convolutional Neural Networks (CNNs), which I’ve been explaining in my previous article on Computer Vision.
In this article, I want to build a web app using Streamlit (if you are new to Streamlit, you can check an introduction here) which allows the user to customize a CNN built with Tensorflow and Keras. I will basically reproduce the example of my previous article, but now there will be the possibility to interact with the CNN at every step, so that the whole procedure will be ‘controlled’ by the user.
First thing first, let’s import our necessary packages and download our data. For this purpose, I’ll be using the Cifar10 dataset, containing 3-channels images (that means, with colors) of 10 different objects, provided with labels. Hence, we will be dealing with a supervised ML task.
import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
import numpy as np
import…