https://github.com/jerryblessed/breathsafe2
https://github.com/jerryblessed/breathsafe2
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jerryblessed/breathsafe2
- Owner: Jerryblessed
- Created: 2025-06-27T17:28:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-27T17:57:46.000Z (about 1 year ago)
- Last Synced: 2025-06-27T18:35:25.833Z (about 1 year ago)
- Language: TypeScript
- Size: 91.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π« Breath Safe ungraded
[Presentation](https://docs.google.com/presentation/d/1r_a98Et5a3CCOZtHDk0O5rNGh_tOkeDCvzrJvdH8OQA/edit?usp=sharing)
π **View the project pitch deck**
[Use webapp](https://gibbon-clever-bream.ngrok-free.app/breathsafe)
π **View web site**
# π Architectural diagram

# βοΈ Web screen

**Breath Safe** is a lightweight Flask application that democratizes AI-powered lung cancer diagnosis using both deep learning and no-code tools. Built for low-resource settings, the platform enables non-technical health workers to upload CT or histopathology images via a simple web UI for instant predictions and guidance.
---
## π Features
* πΌοΈ **Dual Image Upload**
* Supports both CT and histopathology images.
* Upload via drag-and-drop interface on the web app.
* π§ **High-Fidelity Deep Learning**
* Backend runs a DenseNet121 model trained on **16,000+ images** for accurate, offline-ready inference.
* π‘ **No-Code Azure Option**
* For clinics with limited technical capacity, 800 pre-labeled lung images were trained on **Azure Custom Vision** for an easy plug-and-play interface.
* π€ **AI Chatbot Assistant**
* Integrated with Azure OpenAI to explain results, answer lung-health questions, and guide users through uploads.
* π **Secure Viewer Access**
* Azure Custom Vision access managed via viewer listsβno exposed secrets.
---
## π― Uniqueness
1. **Dual Training Paths**
* A powerful deep learning model (DenseNet121) trained locally on 16K lung images.
* A parallel no-code model trained on 800 curated samples using Azure Custom Vision for accessible cloud-based use.
2. **Two Modalities, One Platform**
* Handles both CT scans and histopathology slides with equal ease.
3. **Offline-Ready Architecture**
* Local model designed for containerized inference in remote clinics.
4. **Embedded AI Agent**
* Helps interpret model outputs and provides clinical context in plain English.
---
## π Social Good
* **Bridging diagnostic gaps** in rural clinics (currently <15% imaging coverage).
* **Advancing SDG 3.4**: Early detection could help save over 600,000 lives annually.
* **Empowering non-specialists**: AI helps community health workers participate in diagnosis and triage.
* **Fostering collaboration**: Viewer access and open-source codebase encourage transparency and feedback.
---
## π οΈ Getting Started
### Step 1: Download and install files
```bash
# Clone the repo
git clone https://github.com/Jerryblessed/breathsafe.git
cd breathsafe
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
```
### Step 2: Download models from Google Drive
[Download models here](https://drive.google.com/drive/folders/17am-HyZ2R7SoCi9Rpfu5uK71XAWWI1ff?usp=drive_link)
π **Download both CT Scan and Histopathology Models**
```bash
# Place both models in the root directory of the Flask app (same level as app.py)
```
### Step 3: Run the Flask app
```bash
# Run the app
python app.py
```
---
## π Project Structure
Make sure your folder looks like this:
```
π breathsafe/
β
βββ app.py # Flask main application
βββ ctscan_densenet121.keras # Trained CT scan model
βββ histo_densenet121_model.keras # Trained histopathology model
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
βββ static/ # Static files (e.g., images, CSS)
βββ templates/ # HTML templates for Flask
βββ train/ # Model training scripts
```
Visit `http://localhost:5000` in your browser to explore.
---
## β
Training Models for Breath Safe
[π§ Model Training Guide](https://github.com/Jerryblessed/breathsafe/tree/main/train)
π§© **Learn how to train your own model for this project**
---
Β© 2025 Breath Safe Initiative