christianpayer / MedicalDataAugmentationTool-VerSe

GNU General Public License v3.0
175 stars 81 forks source link

How can I obtain possible_successors.pickle without landmarks values during inference? #10

Open Monanayang opened 3 years ago

Monanayang commented 3 years ago

For data without labels, I find it need possible_successors.pickle and units_distances.pickle in main_vertebrae_localization.py. What is its content and how can i get it? I tried to use pickle folder, but it didn't work. Can you tell me how I can get it? Thanks!

christianpayer commented 3 years ago

The .pickle files contain the landmark offset statistics that are needed for the MRF. The file analyze_relative_landmarks.py can be used to generate these files for the verse2020 dataset. Generating these files is part of the training, as they contain the statistics of the training set. You can then use these files (i.e., the statistics of the landmarks saved in these files) to generate predictions on unseen data. The .pickle files need to be in the working directory of the scripts in order to be loaded correctly. So either create a symlink (which should be present when checking out the repository) or copy the files to the working directory.

If you use a different python version than my, it could be that the .pickle files cannot be loaded. There should be a python error message in this case. If this is the case for you, then regenerate the pickle files with analyze_relative_landmarks.py on your computer.

Monanayang commented 3 years ago

Thank you very much for taking the time to answer my questions. Can I understand that for the new CT scans, the .pickle files generated by the verse2020 dataset can still be used instead of generating a new pickle?

christianpayer commented 3 years ago

Yes, you can use these .pickle files for the prediction.

Monanayang commented 3 years ago

Thank you very much. Great work, great code.