An open API service indexing awesome lists of open source software.

https://github.com/jerryblessed/breathsafe2


https://github.com/jerryblessed/breathsafe2

Last synced: about 1 year ago
JSON representation

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

![BreathSafe Architecture Diagram](https://github.com/Jerryblessed/breathsafe/blob/main/static/AI%20Lung%20Cancer%20Diagnosis%20Flowchart.png?raw=true)

# ⭐️ Web screen

![Breath Safe Landing Page](https://github.com/Jerryblessed/breathsafe/blob/main/static/landingpage.png?raw=true)

**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