vlbthambawita commited on
Commit
5438002
1 Parent(s): 91d976a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -2
README.md CHANGED
@@ -6,11 +6,82 @@ tags:
6
  - ECG
7
  - Synthetic ECG
8
  ---
9
- # To generate synthetic ECGs
 
 
 
 
 
 
10
  ```python
11
  from transformers import AutoModel
12
 
13
  model = AutoModel.from_pretrained("deepsynthbody/deepfake_ecg", trust_remote_code=True)
14
 
15
  out = model(num_samples=5)
16
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  - ECG
7
  - Synthetic ECG
8
  ---
9
+
10
+ # deepfake-ecg
11
+
12
+ [Paper](https://www.nature.com/articles/s41598-021-01295-2) | [GitHub](https://github.com/vlbthambawita/deepfake-ecg) | [Pre-generated ECGs (150k)](https://osf.io/6hved/)
13
+ ---
14
+
15
+ # To generate synthetic ECGs from Hugging face
16
  ```python
17
  from transformers import AutoModel
18
 
19
  model = AutoModel.from_pretrained("deepsynthbody/deepfake_ecg", trust_remote_code=True)
20
 
21
  out = model(num_samples=5)
22
+ ```
23
+
24
+
25
+
26
+ ## [Pulse2Pulse - development repo](https://github.com/vlbthambawita/Pulse2Pulse)
27
+ If you want to train the model from scratch, please refere our development repository Pulse2Pulse.
28
+
29
+ ---
30
+
31
+
32
+
33
+
34
+
35
+ ## Usage
36
+
37
+
38
+ The generator functions can generate DeepFake ECGs with 8-lead values [lead names from first coloum to eighth colum: **'I','II','V1','V2','V3','V4','V5','V6'**] for 10s (5000 values per lead). These 8-leads format can be converted to 12-leads format using the following equations.
39
+
40
+ ```
41
+ lead III value = (lead II value) - (lead I value)
42
+ lead aVR value = -0.5*(lead I value + lead II value)
43
+ lead aVL value = lead I value - 0.5 * lead II value
44
+ lead aVF value = lead II value - 0.5 * lead I value
45
+
46
+ ```
47
+
48
+
49
+ ### Pre-generated DeepFake ECGs and corresponding MUSE reports are here: https://osf.io/6hved/ or (https://huggingface.co/datasets/deepsynthbody/deepfake_ecg)
50
+ - In this repository, there are two DeepFake datasets:
51
+ 1. 150k dataset - Randomly generated 150k DeepFakeECGs
52
+ 2. Filtered all normals dataset - Only "Normal" ECGs filtered using the MUSE analysis report
53
+
54
+ ## A real ECG vs a DeepFake ECG (from left to right):
55
+
56
+
57
+ ![GitHub Logo](samples/real_vs_fake_left_to_right_v2.png)
58
+
59
+ ## A sample DeepFake ECG:
60
+ ![GitHub Logo](samples/2879.png)
61
+
62
+
63
+ ## Contributing
64
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
65
+
66
+ Please make sure to update tests as appropriate.
67
+
68
+
69
+ ## Citation:
70
+ ```latex
71
+ @article{thambawita2021deepfake,
72
+ title={DeepFake electrocardiograms using generative adversarial networks are the beginning of the end for privacy issues in medicine},
73
+ author={Thambawita, Vajira and Isaksen, Jonas L and Hicks, Steven A and Ghouse, Jonas and Ahlberg, Gustav and Linneberg, Allan and Grarup, Niels and Ellervik, Christina and Olesen, Morten Salling and Hansen, Torben and others},
74
+ journal={Scientific reports},
75
+ volume={11},
76
+ number={1},
77
+ pages={1--8},
78
+ year={2021},
79
+ publisher={Nature Publishing Group}
80
+ }
81
+ ```
82
+
83
+ ## License
84
+ [MIT](https://choosealicense.com/licenses/mit/)
85
+
86
+ ## For more details:
87
+ Please contact: vajira@simula.no, michael@simula.no