This is a web-based application that detects various lung diseases from audio recordings of respiratory sounds using deep learning and audio signal processing.
- 🎤 Upload respiratory audio files (e.g., breath or lung sounds)
- 🎼 Convert audio to spectrograms using
librosa - 🧠 Predict diseases using a Convolutional Neural Network (CNN)
- 💡 Detects conditions like:
- Asthma
- COPD
- Pneumonia
- Lung Fibrosis
- Pleural Effusion
- Heart Failure-related conditions
- 🌐 Built with Flask and rendered with interactive HTML/CSS/JS
- 📊 Displays diagnosis result along with the spectrogram visualization
- Frontend: HTML, CSS, JavaScript
- Backend: Python, Flask
- Deep Learning: TensorFlow/Keras
- Audio Processing: Librosa, Matplotlib
- Visualization: Spectrogram generation and display
- User uploads an audio file through the web interface.
- The system extracts a spectrogram from the audio input.
- The spectrogram is passed to a CNN model trained to classify lung diseases.
- The prediction result and spectrogram image are displayed.
lung-disease-detection/
├── app.py
├── templates/
│ ├── index.html
│ └── result.html
├── static/
│ └── [spectrogram images]
├── uploads/
│ └── [uploaded audio files]
├── requirements.txt
└── README.md
git clone https://github.com/yourusername/lung-disease-detection.git
cd lung-disease-detectionpip install -r requirements.txtpython app.pyVisit http://127.0.0.1:5000/ in your browser to use the application.
This project is for educational and research purposes only.