https://github.com/gimnathperera/pneumonia-detection-cnn
Deep learning-based pneumonia classification project using TensorFlow and Flask. Accurately identifies pneumonia stages in X-ray images, enabling seamless integration into healthcare systems and custom applications.
https://github.com/gimnathperera/pneumonia-detection-cnn
cnn deep-learning flask nuralnetwork python tensorflow
Last synced: 5 months ago
JSON representation
Deep learning-based pneumonia classification project using TensorFlow and Flask. Accurately identifies pneumonia stages in X-ray images, enabling seamless integration into healthcare systems and custom applications.
- Host: GitHub
- URL: https://github.com/gimnathperera/pneumonia-detection-cnn
- Owner: gimnathperera
- Created: 2022-12-27T07:21:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-09T04:42:38.000Z (over 2 years ago)
- Last Synced: 2023-09-17T18:32:19.861Z (about 2 years ago)
- Topics: cnn, deep-learning, flask, nuralnetwork, python, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 2 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pneumonia Classification using Deep Learning
[](https://opensource.org/licenses/MIT)Welcome to the Pneumonia Classification repository! This project aims to provide an accurate and efficient deep learning model for identifying various stages of pneumonia in X-ray images of the lungs. By leveraging the power of Convolutional Neural Networks (CNNs) and the TensorFlow library, we have developed a robust solution that can predict pneumonia stages with high accuracy.
## Table of Contents
- [Introduction](#introduction)
- [Model Architecture](#model-architecture)
- [API Usage](#api-usage)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)## Introduction
Pneumonia is a severe respiratory infection that affects millions of people worldwide. Timely and accurate diagnosis plays a vital role in ensuring proper treatment and care for patients. This project addresses the challenge of automating the pneumonia classification process, allowing medical professionals to make informed decisions quickly.## Model Architecture
Our deep learning model utilizes a Convolutional Neural Network (CNN) architecture, a powerful technique in image recognition tasks. The model has been trained on a large dataset of labeled X-ray images, encompassing various pneumonia stages: Fusion beat (F), Unknown beat (Q), Normal beat (N), Supraventricular ectopic beat (S), and Ventricular ectopic beat (V).## API Usage
We have created a convenient API using the Flask framework to facilitate easy integration of our model into web and mobile applications. The API enables users to upload an X-ray image and receive a prediction of the corresponding pneumonia stage. This allows for seamless integration into existing healthcare systems or custom applications.## Installation
To get started with the Pneumonia Classification project, follow these steps:1. Clone the repository: `git clone https://github.com/your-username/pneumonia-classification.git`
2. Install the required dependencies: `pip install -r requirements.txt`
3. Download the pre-trained weights for the CNN model (link: [weights.zip](weights.zip)) and place them in the `models` directory.
4. Set up the Flask environment variables (e.g., `FLASK_APP=app.py`) or configure your preferred deployment method.## Usage
Once you have completed the installation, you can run the project and start making predictions. Here's a simple guide to getting started:1. Start the Flask API server: `flask run`
2. Make a POST request to the `/predict` endpoint with the X-ray image data. You can use various methods like cURL, Postman, or integrate it into your application using your preferred programming language.```python
import requestsimage_path = '/path/to/xray_image.jpg'
url = 'http://localhost:5000/predict'# Read the image file
with open(image_path, 'rb') as image_file:
image_data = image_file.read()# Send the image data to the API
response = requests.post(url, files={'image': image_data})# Retrieve the prediction
prediction = response.json()['prediction']
print(f"The predicted pneumonia stage is: {prediction}")
```
## Contributing
We welcome contributions from the community to improve and enhance this pneumonia classification project. If you have any ideas, bug fixes, or feature suggestions, please feel free to submit a pull request. Together, we can make a positive impact in the field of medical diagnostics.## License
This project is licensed under the [MIT License](LICENSE).
---
We hope you find the Food Delivery Application useful and look forward to your contributions. If you have any questions or need assistance, please reach out to us. Happy coding!
_Made with ❤️ by [Gimnath Perera](https://github.com/Gimnath-Perera)_