This project is an implementation of an image classification web app using Flask, which is capable of classifying various elements. It utilizes a pre-trained ResNet50 model available in the Keras library for image classification.
FlaskApp.mp4
- Upload an input image to the web app.
- The app will classify the image using the pre-trained ResNet50 model.
- The predicted class label and the probability of the prediction will be displayed.
- Docker Desktop
- Flask (installed within the Docker container)
-
Clone this repository using Git or GitHub Desktop.
-
Open a terminal and navigate to the project directory.
-
Build the Docker image:
docker build -t img_class .
-
Run the Docker container and map the host port
5000
to the container port 5000:docker run -d -p 5000:5000 img_class
-
Open your web browser and visit
http://127.0.0.1:5000
to access the web app.
Note: Be patient during the first run, as the ResNet50 model needs to be downloaded. This process may take some time.
To import the pre-trained ResNet50 model in your Python code, use the following syntax:
from keras.applications.resnet50 import ResNet50
You Can Find the Flutter version of this app in this link : Flutter To Flask