Skip to content

Commit

Permalink
Version 1.4.0.RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
apage224 committed Aug 21, 2024
1 parent f6fba9d commit 8784945
Show file tree
Hide file tree
Showing 58 changed files with 851 additions and 113 deletions.
2 changes: 2 additions & 0 deletions configs/arr-2-eff-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

"val_size": 40000,
"test_size": 40000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.20,
"batch_size": 256,
Expand Down
15 changes: 7 additions & 8 deletions configs/arr-4-eff-lg.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
}
}],

"sampling_rate": 100,
"frame_size": 800,

"num_classes": 4,
"class_map": {
"0": 0,
Expand All @@ -24,26 +27,22 @@
"SR", "SB", "AFIB", "GSVT"
],


"sampling_rate": 100,
"frame_size": 800,

"samples_per_patient": [5, 5, 5, 10],
"val_samples_per_patient": [5, 5, 5, 10],
"test_samples_per_patient": [5, 5, 5, 10],

"val_size": 40000,
"test_size": 50000,
"test_size": 40000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.20,
"batch_size": 256,
"buffer_size": 50000,
"epochs": 150,
"epochs": 200,
"steps_per_epoch": 50,
"class_weights": "balanced",
"val_metric": "loss",
"val_patients": 0.20,
"lr_rate": 1e-3,
"lr_cycles": 1,

Expand Down Expand Up @@ -121,7 +120,7 @@
}],

"model_file": "model.keras",
"use_logits": true,
"use_logits": false,
"architecture": {
"name": "efficientnetv2",
"params": {
Expand Down
19 changes: 9 additions & 10 deletions configs/arr-4-eff-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "arr-4-eff-sm",
"project": "hk-rhythm-4",
"job_dir": "./results/arr-4-eff-sm",
"verbose": 2,

"datasets": [{
"name": "lsad",
Expand All @@ -13,10 +14,6 @@
"sampling_rate": 100,
"frame_size": 800,

"samples_per_patient": [5, 5, 5, 10],
"val_samples_per_patient": [5, 5, 5, 10],
"test_samples_per_patient": [5, 5, 5, 10],

"num_classes": 4,
"class_map": {
"0": 0,
Expand All @@ -30,10 +27,12 @@
"SR", "SB", "AFIB", "GSVT"
],

"val_patients": 0.20,
"samples_per_patient": [5, 5, 5, 10],
"val_samples_per_patient": [5, 5, 5, 10],
"test_samples_per_patient": [5, 5, 5, 10],

"val_size": 40000,
"test_size": 50000,
"test_size": 40000,
"val_file": "val.tfds",
"test_file": "val.tfds",

Expand All @@ -44,12 +43,13 @@
"epochs": 200,
"steps_per_epoch": 50,
"val_metric": "loss",
"val_patients": 0.20,
"class_weights": "balanced",

"threshold": 0.5,

"test_metric": "f1",
"test_metric_threshold": 0.02,

"tflm_var_name": "g_rhythm_model",
"tflm_file": "rhythm_model_buffer.h",

Expand Down Expand Up @@ -118,6 +118,7 @@
"name": "cutout"
}
}],

"model_file": "model.keras",
"use_logits": false,
"architecture": {
Expand All @@ -137,7 +138,5 @@
"include_top": true,
"use_logits": true
}
},

"verbose": 2
}
}
8 changes: 5 additions & 3 deletions configs/beat-2-eff-sm.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "beat-2-eff-sm",
"project": "hk-beat-2",
"verbose": 2,
"job_dir": "./results/beat-2-eff-sm",
"verbose": 2,

"datasets": [{
"name": "icentia11k",
Expand All @@ -28,8 +28,10 @@
"val_samples_per_patient": [20, 20],
"test_samples_per_patient": [20, 20],

"val_size": 30000,
"test_size": 30000,
"val_size": 40000,
"test_size": 40000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.20,
"batch_size": 256,
Expand Down
10 changes: 6 additions & 4 deletions configs/beat-3-eff-sm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beat-3-eff-lg",
"name": "beat-3-eff-sm",
"project": "hk-beat-3",
"job_dir": "./results/beat-3-eff-lg",
"job_dir": "./results/beat-3-eff-sm",
"verbose": 2,

"datasets": [{
Expand All @@ -28,8 +28,10 @@
"val_samples_per_patient": [10, 40, 40],
"test_samples_per_patient": [10, 40, 40],

"val_size": 30000,
"test_size": 30000,
"val_size": 40000,
"test_size": 40000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.20,
"batch_size": 256,
Expand Down
6 changes: 3 additions & 3 deletions configs/den-ppg-tcn-lg.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"val_samples_per_patient": 5,
"test_samples_per_patient": 5,

"val_size": 10000,
"test_size": 10000,
"val_size": 20000,
"test_size": 20000,

"batch_size": 128,
"buffer_size": 50000,
Expand All @@ -44,7 +44,7 @@

"backend": "pc",
"demo_size": 768,
"display_report": false,
"display_report": true,

"quantization": {
"qat": false,
Expand Down
4 changes: 2 additions & 2 deletions configs/den-ppg-tcn-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"val_samples_per_patient": 5,
"test_samples_per_patient": 5,

"val_size": 10000,
"test_size": 10000,
"val_size": 20000,
"test_size": 20000,

"val_patients": 0.20,
"batch_size": 128,
Expand Down
4 changes: 2 additions & 2 deletions configs/den-tcn-lg.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"val_samples_per_patient": 10,
"test_samples_per_patient": 10,

"val_size": 10000,
"test_size": 10000,
"val_size": 20000,
"test_size": 20000,

"val_patients": 0.20,
"batch_size": 256,
Expand Down
2 changes: 1 addition & 1 deletion configs/fnd-eff-lg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fnd-eff-lg",
"project": "foundation",
"job_dir": "./results/fnd-eff-lg",
"verbose": 1,
"verbose": 2,

"temperature": 1.0,

Expand Down
78 changes: 64 additions & 14 deletions configs/seg-2-tcn-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,28 @@
"job_dir": "./results/seg-2-tcn-sm",
"verbose": 2,

"dataset_weights": [0.32, 0.68],
"dataset_weights": [0.2, 0.8],
"datasets": [{
"name": "icentia11k",
"name": "ludb",
"params": {
"path": "./datasets/icentia11k"
"path": "./datasets/ludb"
}
},{
"name": "ptbxl",
}, {
"name": "ecg-synthetic",
"params": {
"path": "./datasets/ptbxl"
"num_pts": 20000,
"params": {
"presets": ["SR", "AFIB", "ant_STEMI", "LAHB", "LPHB", "high_take_off", "LBBB", "random_morphology"],
"preset_weights": [24, 8, 1, 1, 1, 1, 1, 0],
"duration": 10,
"sample_rate": 100,
"heart_rate": [40, 160],
"impedance": [1, 2],
"p_multiplier": [0.8, 1.2],
"t_multiplier": [0.8, 1.2],
"noise_multiplier": [0.05, 0.5],
"voltage_factor": [800, 1000]
}
}
}],

Expand All @@ -38,13 +50,15 @@

"val_size": 25000,
"test_size": 25000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.20,
"class_weights": "balanced",
"class_weights": "fixed",
"batch_size": 256,
"buffer_size": 50000,
"epochs": 100,
"steps_per_epoch": 100,
"steps_per_epoch": 50,
"val_metric": "loss",
"lr_rate": 1e-3,
"lr_cycles": 1,
Expand Down Expand Up @@ -76,19 +90,55 @@
}
],

"augmentations": [{
"name": "random_noise_distortion",
"params": {
"amplitude": [0, 0.5],
"frequency": [0.5, 1.5],
"name": "baseline_wander"
}
},{
"name": "random_sine_wave",
"params": {
"amplitude": [0, 0.05],
"frequency": [45, 50],
"auto_vectorize": false,
"name": "powerline_noise"
}
},{
"name": "amplitude_warp",
"params": {
"amplitude": [0.9, 1.1],
"frequency": [0.5, 1.5],
"name": "amplitude_warp"
}
}, {
"name": "random_noise",
"params": {
"factor": [0, 0.025],
"name": "random_noise"
}
}, {
"name": "random_background_noise",
"params": {
"amplitude": [0, 0.025],
"num_noises": 1,
"name": "nstdb"
}
}],

"model_file": "model.keras",
"use_logits": true,
"use_logits": false,
"architecture": {
"name": "tcn",
"params": {
"input_kernel": [1, 7],
"input_norm": "batch",
"blocks": [
{"depth": 1, "branch": 1, "filters": 8, "kernel": [1, 7], "dilation": [1, 1], "dropout": 0, "ex_ratio": 1, "se_ratio": 0, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 12, "kernel": [1, 7], "dilation": [1, 1], "dropout": 0, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 16, "kernel": [1, 7], "dilation": [1, 2], "dropout": 0, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 24, "kernel": [1, 7], "dilation": [1, 4], "dropout": 0, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 32, "kernel": [1, 7], "dilation": [1, 8], "dropout": 0, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"}
{"depth": 1, "branch": 1, "filters": 4, "kernel": [1, 7], "dilation": [1, 1], "dropout": 0.2, "ex_ratio": 1, "se_ratio": 0, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 8, "kernel": [1, 7], "dilation": [1, 2], "dropout": 0.2, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 12, "kernel": [1, 7], "dilation": [1, 4], "dropout": 0.2, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"},
{"depth": 1, "branch": 1, "filters": 16, "kernel": [1, 7], "dilation": [1, 8], "dropout": 0.2, "ex_ratio": 1, "se_ratio": 2, "norm": "batch"}
],
"output_kernel": [1, 7],
"include_top": true,
Expand Down
5 changes: 3 additions & 2 deletions configs/seg-4-tcn-lg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "seg-4-tcn-lg",
"project": "hk-segmentation-4",
"job_dir": "./results/seg-4-tcn-lg",

"verbose": 2,

"dataset_weights": [0.20, 0.80],
Expand All @@ -14,7 +13,7 @@
}, {
"name": "ecg-synthetic",
"params": {
"num_pts": 10000,
"num_pts": 20000,
"params": {
"presets": ["SR", "AFIB", "ant_STEMI", "LAHB", "LPHB", "high_take_off", "LBBB", "random_morphology"],
"preset_weights": [24, 8, 1, 1, 1, 1, 1, 0],
Expand Down Expand Up @@ -52,6 +51,8 @@

"val_size": 20000,
"test_size": 20000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"val_patients": 0.10,
"batch_size": 256,
Expand Down
4 changes: 3 additions & 1 deletion configs/seg-4-tcn-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}, {
"name": "ecg-synthetic",
"params": {
"num_pts": 10000,
"num_pts": 20000,
"params": {
"presets": ["SR", "AFIB", "ant_STEMI", "LAHB", "LPHB", "high_take_off", "LBBB", "random_morphology"],
"preset_weights": [24, 8, 1, 1, 1, 1, 1, 0],
Expand Down Expand Up @@ -52,6 +52,8 @@

"val_size": 20000,
"test_size": 20000,
"val_file": "val.tfds",
"test_file": "val.tfds",

"class_weights": "balanced",
"val_patients": 0.10,
Expand Down
3 changes: 2 additions & 1 deletion configs/seg-ppg-2-tcn-sm.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"datasets": [{
"name": "ppg-synthetic",
"params": {
"num_pts": 20000,
"num_pts": 40000,
"params": {
"duration": 20,
"sample_rate": 100,
Expand Down Expand Up @@ -113,6 +113,7 @@
}],

"model_file": "model.keras",
"use_logits": false,
"architecture": {
"name": "tcn",
"params": {
Expand Down
Loading

0 comments on commit 8784945

Please sign in to comment.