Skip to content

Commit

Permalink
feat: Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
apage224 committed Jan 11, 2024
1 parent 4dbe9f8 commit d0d7b85
Show file tree
Hide file tree
Showing 71 changed files with 1,815 additions and 428 deletions.
29 changes: 29 additions & 0 deletions configs/arrhythmia-class-2/demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"job_dir": "./results/arrhythmia-class-2",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 2,
"model_file": "./results/arrhythmia-class-2/model.tflite",
"threshold": 0.75,
"backend": "pc",
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
31 changes: 31 additions & 0 deletions configs/arrhythmia-class-2/evaluate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"job_dir": "./results/arrhythmia-class-2",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 2,
"samples_per_patient": [25, 200],
"test_patients": 1000,
"test_size": 100000,
"model_file": "./results/arrhythmia-class-2/model.tf",
"threshold": 0.75,
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
36 changes: 36 additions & 0 deletions configs/arrhythmia-class-2/export.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"job_dir": "./results/arrhythmia-class-2",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 2,
"samples_per_patient": [5, 40],
"test_patients": 1000,
"test_size": 10000,
"model_file": "./results/arrhythmia-class-2/model.tf",
"quantization": true,
"use_logits": false,
"threshold": 0.75,
"val_acc_threshold": 0.98,
"tflm_var_name": "g_arrhythmia_model",
"tflm_file": "./results/arrhythmia-class-2/arrhythmia_model_buffer.h",
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
78 changes: 78 additions & 0 deletions configs/arrhythmia-class-2/train.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"job_dir": "./results/arrhythmia-class-2",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 2,
"samples_per_patient": [25, 200],
"val_samples_per_patient": [25, 200],
"train_patients": 10000,
"val_file": "./results/arrhythmia-class-2-10000pt-200fs-4s.pkl",
"val_patients": 0.20,
"val_size": 100000,
"batch_size": 256,
"buffer_size": 100000,
"epochs": 200,
"steps_per_epoch": 20,
"val_metric": "loss",
"datasets": ["icentia11k"],
"lr_rate": 5e-3,
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
],
"augmentations": [
{
"name": "baseline_wander",
"args": {
"amplitude": [0.5, 1.0],
"frequency": [0.4, 0.5]
}
},
{
"name": "motion_noise",
"args": {
"amplitude": [0.2, 0.4],
"frequency": [0.4, 0.6]
}
},
{
"name": "burst_noise",
"args": {
"burst_number": [0, 4],
"amplitude": [0.05, 0.5],
"frequency": [80, 100]
}
},
{
"name": "powerline_noise",
"args": {
"amplitude": [0.005, 0.01],
"frequency": [50, 60]
}
},
{
"name": "noise_sources",
"args": {
"num_sources": [1, 2],
"amplitude": [0.04, 0.1],
"frequency": [10, 40]
}
}
]
}
29 changes: 29 additions & 0 deletions configs/arrhythmia-class-3/demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"job_dir": "./results/arrhythmia-class-3",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 3,
"model_file": "./results/arrhythmia-class-3/model.tflite",
"threshold": 0.75,
"backend": "pc",
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
31 changes: 31 additions & 0 deletions configs/arrhythmia-class-3/evaluate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"job_dir": "./results/arrhythmia-class-3",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 3,
"samples_per_patient": [25, 100, 100],
"test_patients": 1000,
"test_size": 50000,
"model_file": "./results/arrhythmia-class-3/model.tf",
"threshold": 0.5,
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
36 changes: 36 additions & 0 deletions configs/arrhythmia-class-3/export.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"job_dir": "./results/arrhythmia-class-3",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 3,
"samples_per_patient": [5, 20, 20],
"test_patients": 1000,
"test_size": 10000,
"model_file": "./results/arrhythmia-class-3/model.tf",
"quantization": true,
"use_logits": false,
"threshold": 0.5,
"val_acc_threshold": 0.98,
"tflm_var_name": "g_arrhythmia_model",
"tflm_file": "./results/arrhythmia-class-3/arrhythmia_model_buffer.h",
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
79 changes: 79 additions & 0 deletions configs/arrhythmia-class-3/train.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"job_dir": "./results/arrhythmia-class-3",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 800,
"num_classes": 3,
"samples_per_patient": [25, 100, 100],
"val_samples_per_patient": [25, 100, 100],
"train_patients": 10000,
"val_file": "./results/arrhythmia-class-3-10000pt-200fs-4s.pkl",
"val_patients": 0.20,
"val_size": 100000,
"batch_size": 256,
"buffer_size": 100000,
"epochs": 150,
"steps_per_epoch": 20,
"val_metric": "loss",
"datasets": ["icentia11k"],
"lr_rate": 5e-3,
"lr_cycles": 1,
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
],
"augmentations": [
{
"name": "baseline_wander",
"args": {
"amplitude": [0.5, 1.0],
"frequency": [0.4, 0.5]
}
},
{
"name": "motion_noise",
"args": {
"amplitude": [0.2, 0.4],
"frequency": [0.4, 0.6]
}
},
{
"name": "burst_noise",
"args": {
"burst_number": [0, 4],
"amplitude": [0.05, 0.5],
"frequency": [80, 100]
}
},
{
"name": "powerline_noise",
"args": {
"amplitude": [0.005, 0.01],
"frequency": [50, 60]
}
},
{
"name": "noise_sources",
"args": {
"num_sources": [1, 2],
"amplitude": [0.04, 0.1],
"frequency": [10, 40]
}
}
]
}
28 changes: 28 additions & 0 deletions configs/beat-class-2/demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"job_dir": "./results/beat-class-2",
"ds_path": "./datasets",
"sampling_rate": 200,
"frame_size": 160,
"num_classes": 2,
"model_file": "./results/beat-class-2/model.tflite",
"backend": "pc",
"preprocesses": [
{
"name": "filter",
"args": {
"lowcut": 0.5,
"highcut": 30,
"order": 3,
"forward_backward": true,
"axis": 0
}
},
{
"name": "znorm",
"args": {
"eps": 0.1,
"axis": null
}
}
]
}
Loading

0 comments on commit d0d7b85

Please sign in to comment.