AI4HealthUOL / SSSD-ECG

Repository for the paper: 'Diffusion-based Conditional ECG Generation with Structured State Space Models'
MIT License
36 stars 4 forks source link

Label Mapping for Generated Data #13

Closed sanketahegde closed 5 months ago

sanketahegde commented 6 months ago

Hi,

I have been interested in generating synthetic ECGs from the real data for sometime now. I came across your project and SSSD-ECG model seemed interesting and I wanted to test it myself. I have trained the model with the available PTB-XL dataset with the default configurations and also managed to perform inference on the test dataset. This is where the problem arises for me. I now have generated the ECGs by providing the number of samples required and by using the test labels already available i.e. ''ptbxl_test_labels.npy'. Now that I have the ECGs generated from the latest checkpoint, how do I map the right diagnosis label name to the ECG.

Maybe this is a naive question but it would be really helpful if you could provide some information about my problem @juanlopezcode . Thanks in advance!

sanketahegde commented 5 months ago

Hi again,

I am in real need of your reply here. I still need to confirm if I am assigning the label names correctly for the Real and Synthesized data. This is a bit urgent to continue my ongoing project.

Looking forward to an answer from your side. Thank you!

juanlopezcode commented 5 months ago

Hi, you will need to map to the original ptb-xl label set at the 71 multilabel setting. you can either pre-process ptbxl or download the numpy lbl_itos.npy file from here and just index them: https://mega.nz/folder/kT91jYpI#97GyTkVVUk97fzs1Oy4nBQ/folder/sW8UiBpT