Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to visualize the generated sample #6

Closed
XLIU430 opened this issue Jul 25, 2023 · 6 comments
Closed

How to visualize the generated sample #6

XLIU430 opened this issue Jul 25, 2023 · 6 comments

Comments

@XLIU430
Copy link

XLIU430 commented Jul 25, 2023

Hello, I run the inference.py script and successfully generated a sample with the "generate_four_leads()" function. The shape of sample is (400,12,1000) and the shape of label is (400,44). Are the shapes correct? I am little struggling to visualize the output. Could you please give me some advices on how to use matplotlib to visualize the generated sample? Thank you!

@juanlopezcode
Copy link
Collaborator

Seems that your shapes are correct. You might need to adjust your custom function for the plot as you desire. Or you can use a library like this: https://pypi.org/project/ecg-plot/.

@dtt355
Copy link

dtt355 commented Sep 2, 2023

Hello, when I was running inference.py, error KeyError: 'use_model''masking' and so on occurred. How should I solve it?Thank you!

@juanlopezcode
Copy link
Collaborator

unsure, this si not a complete error output to be able to trace it

@dtt355
Copy link

dtt355 commented Sep 9, 2023

When I run "ecg_data_preprocessing.ipynb", I get an error that the label "label_diag_filtered_numeric" cannot be found. I found in the run "df_ptb_xl, lbl_itos_ptb_xl, mean_ptb_xl, std_ptb_xl = prepare_data_ptb_xl(data_folder_ptb_xl, min_cnt=0, target_fs=target_fs, channels=12, channel_stoi=channel_stoi_default, target_folder=target_folder_ptb_xl)" min_cnt=0 is passed in, so the "map_and_filter_labels" function in the file that executes "SSD-ECG-main/src/ptb_xl/clinical_ts/ecg_utils.py" is not called. So what should I set min_cnt to?

@juanlopezcode
Copy link
Collaborator

I didn't run the code now, but I did before, I have the feeling that you don't need to change these parameters, anyway for a easy use, I uploaded the labels in the mega directory

@juanlopezcode
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants