Skip to content

This is a complete service of blood cell image classification using a Convolutional Neural Network, with an FastAPI backend and ReactJS web app

Notifications You must be signed in to change notification settings

mouradap/blood_cell_classification_keras_fastapi_react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Blood Cell Classification App

Convolutional Neural Network model to classify microscope images of blood cells, using Paul Mooney's Blood Cell Images on Kaggle. A backend API was created using FastAPI
And a client-side web app was created in ReactJS.

Screenshot

Usage:

The server is configured at localhost:8000 and the web app at localhost:3000.
Once both services are up and running, head over to localhost:3000, upload an image and the API will respond with the classification.
Current classes: Eosinophil, Monocyte, Lymphocyte, and Neutrophil.

Running the entire app with Docker-compose:

To start the entire application with docker-compose, run:
docker-compose up

Docker images

To run the server and web app separately with Docker images:
To start the server, run
docker build API --tag <servername>
docker run -it --rm -p 8000:80 <servername>
This will run the server on localhost:8000. You can check the docs at localhost:8000/docs and localhost:8000/redocs

To start the web app, run
docker build frontend --tag <imagename>
docker run -it --rm -p 3000:3000 <imagename>
This will run the web app on localhost:3000.

Dependencies:

Python 3+
tensorflow
keras
pillow
numpy
fastapi
python-multipart


NodeJS
React
axios

Local installation without Docker images:

To install the API and web app locally:
change to /API directory and run
pip install -r requirements.txt
Then change to /frontend and run
npm install

To get the API running, Change to '/API' directory and run:
uvicorn main:app --reload

To start the web app, change to '/frontend' directory and run:
npm start

Creating the model in Google Colab:

To recreate or modify the CNN model, upload the blood_cell_type_cnn.ipynb to Google Colab.
Add username and API key to
api_token = {"username":"","key":""}

About

This is a complete service of blood cell image classification using a Convolutional Neural Network, with an FastAPI backend and ReactJS web app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published