Spaces:
Paused
Paused
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,3 +10,48 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
## One-Step Respiratory Disease Classifier using Digital Stethoscope Sound - Readme
|
| 15 |
+
|
| 16 |
+
This project provides a user-friendly Streamlit application to classify respiratory diseases using audio data from a digital stethoscope.
|
| 17 |
+
|
| 18 |
+
**Features:**
|
| 19 |
+
|
| 20 |
+
- Uploads a digital stethoscope audio file (WAV or MP3 format).
|
| 21 |
+
- Extracts features from the audio using a pre-trained Audio Set Transfer (AST) model.
|
| 22 |
+
- Predicts the most likely respiratory disease based on the extracted features using a deep learning model.
|
| 23 |
+
- Displays informative messages and relevant images based on the prediction.
|
| 24 |
+
|
| 25 |
+
**Requirements:**
|
| 26 |
+
|
| 27 |
+
- Python 3.x
|
| 28 |
+
- Streamlit (`pip install streamlit`)
|
| 29 |
+
- TensorFlow (`pip install tensorflow`)
|
| 30 |
+
- PyTorch (`pip install torch`)
|
| 31 |
+
- torchaudio (`pip install torchaudio`)
|
| 32 |
+
- transformers (`pip install transformers`)
|
| 33 |
+
- Pillow (`pip install Pillow`)
|
| 34 |
+
|
| 35 |
+
**Instructions:**
|
| 36 |
+
|
| 37 |
+
1. Download the pre-trained AST model or Import it From the Hugging Face Website and disease classification model:
|
| 38 |
+
- Download the AST model files (e.g., `pytorch_model.bin`) from [https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593) (replace with the actual download URL). Place them in a directory.
|
| 39 |
+
- Download the disease classification model (`Model.h5`) and place it in the same directory as the AST model files.
|
| 40 |
+
2. Update file paths in the code:
|
| 41 |
+
- Unzip the Assets zip file
|
| 42 |
+
- Modify the following paths to reflect your actual locations:
|
| 43 |
+
- `'C:\\Users\\UserName\\Desktop\\RESPIRATORY DISEASE CLASSIFIER\\Model.h5'` (path to your disease classification model)
|
| 44 |
+
- `'C:\\Users\\UserName\\Desktop\\RESPIRATORY DISEASE CLASSIFIER\\Assets\\Healthy.gif'` (path to the healthy image)
|
| 45 |
+
- `'C:\\Users\\UserName\\Desktop\\RESPIRATORY-DISORDERS-.jpg'` (path to the generic respiratory issues image)
|
| 46 |
+
- `'C:\\Users\\UserName\\Desktop\\RESPIRATORY DISEASE CLASSIFIER\\Assets\\COPD.png'` (path to the COPD info image )
|
| 47 |
+
3. Run the application:
|
| 48 |
+
- Open a terminal and navigate to the directory containing the script (`APP.py`).
|
| 49 |
+
- Run the script using `streamlit run APP.py`.
|
| 50 |
+
4. Use the application:
|
| 51 |
+
- Upload an audio file from your digital stethoscope.
|
| 52 |
+
- The application will display the predicted disease, relevant information, and images.
|
| 53 |
+
- For COPD prediction, an additional information button can be clicked to display a detailed explanation.
|
| 54 |
+
|
| 55 |
+
**Disclaimer:**
|
| 56 |
+
|
| 57 |
+
This application is for informational purposes only and should not be used for medical diagnosis. Always consult a qualified healthcare professional for any health concerns.
|