Unified offline AI diagnostic device for low-resource settings. Combines lung and heart sound screening into a single Raspberry Pi deployment package.
# π₯ Unified AI Medical Sound Screener: Sahel Sound Triage Platform
A unified, offline, AI-powered diagnostic device for low-resource settings. This single application integrates two independent screening modes:
- **π« Lungs (Respiratory)**: Detects pneumonia, COPD, URTI, and other respiratory abnormalities.
- **π« Heart (Cardiac)**: Detects heart murmurs for rheumatic heart disease screening.
Built by **Maimouna Tougoutcho Coulibaly** in Bamako, Mali.
---
## π¦ What's Inside
```
MEDICAL_AI_DEPLOY/
βββ app.py # Master application (Lung + Heart selection)
βββ lung_model.pkl # Trained SVM for lung sounds
βββ lung_scaler.pkl # Feature normalizer for lungs
βββ lung_label_map.pkl # Label encoder (0=Normal, 1=Abnormal)
βββ heart_model.pkl # Trained RandomForest for heart sounds (with SMOTE)
βββ heart_scaler.pkl # Feature normalizer for heart
βββ heart_label_map.pkl # Label encoder (0=Normal, 1=Abnormal)
βββ requirements.txt # Python dependencies
βββ start_medical_ai.sh # Auto-start script for Raspberry Pi
βββ README.md # This file
```
---
## π Quick Start (Laptop/Desktop)
### 1. Clone or Copy the Folder
```bash
cd Desktop/MEDICAL_AI_DEPLOY
```
### 2. Install Dependencies
```bash
pip install -r requirements.txt
```
### 3. Run the App
```bash
streamlit run app.py
```
Your browser will open at `
localhost`.
### 4. Select Mode
- Click **"π« Lungs (Respiratory)"** for lung sound screening.
- Click **"π« Heart (Cardiac)"** for heart sound screening.
---
## π οΈ Hardware Deployment (Raspberry Pi)
This app is designed to run offline on a Raspberry Pi 4 (or 3B+) with a USB sound card and lapel microphone.
### Hardware Required
- Raspberry Pi 4 (2GB+)
- USB Sound Card (CM108 chipset)
- Lapel Microphone (3.5mm)
- Power Bank (5V, 3A)
- MicroSD Card (16GB+)
### Copy to Pi
Copy the entire `MEDICAL_AI_DEPLOY` folder to `/home/pi/` on your Raspberry Pi:
```bash
# Using a USB β¦