OSA-Detection is a project aimed at detecting Obstructive Sleep Apnea (OSA) using various hardware components and machine learning models. The repository includes code and resources for data collection, model training, and real-time detection of OSA events.
- Real-time data collection using sensors connected to Arduino and ESP8266/ESP32 boards.
- Machine learning models for OSA detection.
- Firebase integration for data storage and retrieval.
- Mobile application (OSA.apk) for user interface and monitoring.
- Arduino IDE
- Python 3.x
- Jupyter Notebook
- Firebase account
- MAX30102 Pulse Oximeter Sensor
- ESP8266/ESP32 microcontroller
-
Clone the repository:
git clone https://github.com/bodiwael/OSA-Detection.git cd OSA-Detection -
Set up Arduino:
- Open the Arduino IDE.
- Install the required libraries from the
libraries/directory. - Upload the
arduino/code to your Arduino board.
-
Set up Firebase:
- Follow the steps in
Python-Firebase-Tutorialto configure Firebase. - Update the Firebase configuration in the Python scripts.
- Follow the steps in
-
Install Python dependencies:
pip install -r requirements.txt
-
Data Collection:
- Use the Arduino setup to collect real-time data and upload it to Firebase.
-
Model Training:
- Use the
models-trial.ipynbJupyter Notebook to preprocess data and train the machine learning models.
- Use the
-
Real-time Detection:
- Run the
osa-detection.ipynbnotebook for real-time OSA detection using the trained model.
- Run the
-
Mobile Application:
- Install
OSA.apkon your Android device for monitoring and alerts.
- Install
arduino/: Contains Arduino code for data collection.Python-Firebase-Tutorial/: Tutorial for setting up Firebase with Python.models-trial.ipynb: Jupyter Notebook for training machine learning models.osa-detection.ipynb: Jupyter Notebook for real-time OSA detection.OSA.apk: Android application for user interface.firebase/: Firebase setup files.data_filtered (1).csv: Example dataset.faceDetection.png: Image resource.libraries/: Contains Arduino libraries required for the project.
Contributions are welcome! Please fork this repository and submit pull requests with detailed descriptions of your changes.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or need further assistance, please open an issue in this repository. Happy coding!
