Asclepius_v1 / README.md
Kossayart's picture
Create README.md
11ca8ed verified
---
language:
- en
license: mit
library_name: tflite
tags:
- medical
- time-series
- health-monitoring
- cnn-bilstm
- attention-mechanism
datasets:
- custom-sensor-data
metrics:
- accuracy
- f1
pipeline_tag: audio-classification # Closest tag for time-series sensor data in some HF contexts
---
# Model Card for Asclepius_v1
Asclepius_v1 is a specialized deep learning model designed for real-time medical crisis prediction. It processes multi-modal time-series data from wearable sensors to detect and classify health emergencies.
## Model Details
### Model Description
Asclepius_v1 utilizes a hybrid architecture combining **1D-CNN**, **Bidirectional LSTM (BiLSTM)**, and an **Attention Mechanism**. This design allows the model to extract local features from high-frequency sensor noise while maintaining a long-term memory of physiological trends.
- **Developed by:** Koussay Chaanbi
- **Model type:** Hybrid CNN-BiLSTM-Attention Network
- **Language(s):** English (Technical Documentation)
- **License:** MIT
- **Model Architecture:** - **1D-CNN:** For local feature extraction from sensor streams.
- **BiLSTM:** To capture temporal dependencies in both forward and backward directions.
- **Attention Layer:** To assign weights to critical physiological events within the data window.
### Model Sources
- **Repository:** [Asclepius_v1 on Hugging Face](https://huggingface.co/Koussay/Asclepius_v1)
- **Hardware Target:** Raspberry Pi 4 / Raspberry Pi 5
## Uses
### Direct Use
The model is intended for integration into wearable health devices (such as smart shirts) to monitor:
1. Heart Rate (HR)
2. Oxygen Saturation (SpO2)
3. Movement (Accelerometer data)
It classifies input data into one of five specific medical crisis categories.
### Out-of-Scope Use
This model is **not** a replacement for professional medical diagnosis or clinical-grade monitoring equipment. It should not be used as the sole basis for medical intervention without human-in-the-loop verification.
## Bias, Risks, and Limitations
- **Technical Limitations:** The model is optimized for edge deployment (float16 quantization), which may lead to a slight drop in precision compared to full-precision desktop models.
- **Data Bias:** Performance is dependent on the quality and placement of the hardware sensors.
### Recommendations
Users should ensure proper sensor calibration and skin contact for reliable inference. The model should be used as a proactive "early warning" system rather than a definitive diagnostic tool.
## How to Get Started with the Model
Since the model is provided in `.tflite` format, use the following code to run inference:
```python
import tensorflow as tf
import numpy as np
# Load the TFLite model and allocate tensors.
interpreter = tf.lite.Interpreter(model_path="model_quantized.tflite")
interpreter.allocate_tensors()
# Get input and output details.
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
# Prepare your sensor data (HR, SpO2, Movement)
# Shape should match: [1, window_size, features]
input_data = np.array(your_sensor_window, dtype=np.float32)
interpreter.set_tensor(input_details[0]['index'], input_data)
interpreter.invoke()
# Extract prediction
output_data = interpreter.get_tensor(output_details[0]['index'])
print(f"Crisis Classification Result: {np.argmax(output_data)}")