This Flask-based API uses a pre-trained (created by our team) deep learning model to classify images into categories such as 'bicycle', 'van', 'car', or 'motorcycle'. The model is based on Convolutional Neural Network and is loaded from the 'final_model.h5' file.
These instructions will guide you through setting up and running the application.
- GET '/' -> this endpoint is a hello world for testing
- POST '/predict' -> this endpoint receives a vehicle image encoded in base64 and classifies it into 'bicycle', 'van', 'car', or 'motorcycle'.
Make sure you have Docker and Docker Compose installed on your machine.
-
Clone the repository:
git clone https://github.com/chrisarevalo11/img-classification-keras.git cd your-repository
-
Create a .env file with the following content:
FLASK_APP=main.py FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000
-
Build and run the Docker containers:
docker-compose up --build
-
Test the API:
Now you should be able to use the app and test the previous mentioned endpoints with image data.
- Flask - Web framework for Python
- TensorFlow - Open-source machine learning framework