| |
| """ |
| Centralized configuration settings for the ECG Digitization and Classification Dashboard. |
| This holds paths, hyperparameter defaults, and metadata for classification tasks. |
| """ |
|
|
| import os |
|
|
| |
| |
| |
| |
| |
| YOLO_BOX_MODEL_PATH = "models/digitization_models/yolo11_full/weights/best.pt" |
| YOLO_LEAD_NAME_MODEL_PATH = "models/digitization_models/yolo11_lead/weights/best.pt" |
| YOLO_PULSE_MODEL_PATH = "models/digitization_models/yolo11_pulse/weights/best.pt" |
| YOLO_SEGMENTATION_MODEL_PATH = "models/digitization_models/yolo11_patch/weights/best.pt" |
|
|
| |
| |
| |
| |
| TARGET_FS = 500 |
|
|
| |
| LEAD_NAMES = ['I', 'aVR', 'V1', 'V4', 'II', 'aVL', 'V2', 'V5', 'III', 'aVF', 'V3', 'V6'] |
|
|
| |
| |
| |
| |
| CLASSIFICATION_TASKS = { |
| "Normal vs Myocardial Infarction (MI) - Segmented": { |
| "model_dir": "mi_vs_normal_segmented", |
| "model": "Arsenal", |
| "labels": {0: "NORMAL", 1: "MYOCARDIAL_INFARCTION"}, |
| "description": "Differentiates normal healthy heartbeats from Myocardial Infarction using the pre-trained Arsenal ensemble classifier (Segmented Heartbeats)." |
| }, |
| "Occlusive Myocardial Infarction (OMI) vs non-OMI": { |
| "model_dir": "omi_vs_nonomi", |
| "model": "Rocket", |
| "labels": {0: "non-OMI", 1: "OMI"}, |
| "description": "Identifies Occlusive Myocardial Infarction (OMI) vs Non-Occlusive Myocardial Infarction/controls using the pre-trained Rocket classifier." |
| }, |
| "Pre-Procedural vs Post-Procedural MI": { |
| "model_dir": "ecg_surgery", |
| "model": "InceptionTime", |
| "labels": {0: "post-procedural MI", 1: "pre-procedural MI"}, |
| "description": "Classifies pre-procedural MI vs post-procedural MI using the pre-trained InceptionTime deep learning time-series classifier." |
| } |
| } |
|
|
|
|
| |
| |
| |
| |
| OUTPUT_BASE_DIR = "output" |
| DIGITIZATION_OUTPUT_DIR = os.path.join(OUTPUT_BASE_DIR, "digitization") |
| CLASSIFICATION_OUTPUT_DIR = os.path.join(OUTPUT_BASE_DIR, "classification") |
|
|
| |
| os.makedirs(DIGITIZATION_OUTPUT_DIR, exist_ok=True) |
| os.makedirs(CLASSIFICATION_OUTPUT_DIR, exist_ok=True) |
|
|