According to the related laws and regulations in Germany and Bavaria(General Data Protection Regulation- GDPR and Federal Data Protection Act Bundesdatenschutzgesetz - BDSG), medical personal data on a public website without the individual's explicit consent would typically violate these regulations. Yet all code is provided with some illustrative examples.
|-config ## Training and inferring are configured with hydra
- ReadImageBin.py ## Class for reading image.bin, which was exported from MunichHeart
- preprocess.py ## preprocessing the data
- Res18.reg.py ## training code
- utils.py ## dataloader and savepoints
- test_single.py ## code for test set
- loc.py ## a library for localization, including all the localization tools
- models ## models for training
- run_copy.ipynb ## examples of running result, an example patient with stress and rest polar map is shown, providing how the localization is going from scratch.
This part is about how to preprocess the data ReadImageBin.py:
- Data was exported in a format of image.bin from MunichHeart, including stress/rest polar map, the area of stress and rest polar map (15x36) , and a standard polar map in (3,256,256) of stress/rest/difference polar map. preprocess.py:
- Stress and rest map are further processed in such a way: first from (15,36) to (224,224), then duplicate to (3,224,224) for adapting proper size to use Grad CAM++
- Critical point: Stress and rest polar map should be in the same training dataset, if individually trained with different models, it would be misregistered.
- Simultanuously image, label, severity score are save in a dict for next step training
utils.py: including dataloader and dataset,save and read checkpoints Res18_reg.py: Train, optimizer
function and class for test
function and class for localization with Grad-CAM,GradCAM++,and other CAM family
an illustrative example of a running result.