This project aims to predict pneumonia from chest X-ray images using a deep learning model. The application consists of a React front-end for user interaction and a Flask back-end to handle predictions.
The convolutional neural network (CNN) for predict pneumonia uses the Keras library. It includes convolutional layers with batch normalization and max-pooling, followed by dense layers. The model uses regularization, dropout, and is compiled with the Adam optimizer. Training includes early stopping, learning rate reduction, and TensorBoard logging. The accuracy is 83.166 %.
react/
: React application for the user interface.server/
: Flask application for serving the machine learning model and handling predictions.
- Navigate to the
react/
directory. - Install dependencies:
npm install
- Navigate to the
v2d/
directory. - Start the react app
npm start
- The React app will run on http://localhost:3000.
-
Navigate to the backend/ directory.
-
Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
.\venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the Flask application:
python app.py
The Flask app will run on http://localhost:5000.
- Open your web browser and go to http://localhost:3000.
- Upload a chest X-ray image through the interface.
- The deep learning model will predict whether pneumonia is present or not.
- View the prediction result on the web page.
If you'd like to contribute to this project, please follow the standard GitHub flow:
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m 'Add new feature'
- Push to the branch:
git push origin feature/new-feature
- Create a pull request.