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

Run pre-trained model #1

Open
hrktkhs opened this issue Aug 5, 2021 · 2 comments
Open

Run pre-trained model #1

hrktkhs opened this issue Aug 5, 2021 · 2 comments

Comments

@hrktkhs
Copy link

hrktkhs commented Aug 5, 2021

Hello, I am a beginner at python programming, considering to use your bone-suppression model for my radiology research.
About a hundred chest radiographs in DICOM data are retrieved for evaluation.

I have several questions about how to run your pre-trained model

Input your desired dataset into datasets.py

In which line of py file should I input my dataset? What kind of data type (DICOM, NIFTI etc) is required?

Then, either: 2) Run analysis_script.ipynb on jupyter notebook or jupyter lab
Or: 2) Modify produce_suppressed_images to get your desired settings & paths 3) Run produce_suppressed_images.py in python console.

I am not using jupyter notebook. How can I change the setting and path? Which line of py file should I modify?

Thank you!

@danielnflam
Copy link
Owner

danielnflam commented Aug 5, 2021

Thank you for considering use of my code for your research.

Input your desired dataset into datasets.py
I will recommend using the POLYU_COVID19_CXR_CT_Cohort1 dataset structure in datasets.py

However, this is designed to work only for PNG images.

Since you have DICOM images, you can 1) transform them into PNG images or 2) change the code to add functionality for loading DICOM and extracting the pixel array, e.g. using PyDICOM

2) Run analysis_script.ipynb on jupyter notebook
You will need to open the code in a text editor and change the settings and paths of your files in the code

I have removed the produce_suppressed_images.py because it is out of date. If you want to run this as a .py script, please copy the code on https://github.com/danielnflam/Deep-Learning-Models-for-bone-suppression-in-chest-radiographs/blob/main/analysis_script.ipynb to a text editor, save as script.py and then run that as:

python script.py

in command line.

@hrktkhs
Copy link
Author

hrktkhs commented Oct 24, 2021

Thank you for your reply. I would transform DICOM to PNG. Could you let me know the required size/shape of PNG image? Should it be in 256 by 256 or any shape acceptable? All files should be saved in the folder "source"?

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

2 participants