Files data/imaging_data/(256, 256, 156) and data/imaging_data/(256, 256, 192) contain already the registered images (prefix wm)
Running ComBat NeuroHarmonize
Data must be registered and there should exist a CSV file with all the paths of the registered images. registered_files.csv contains the paths. Training can be done using the following command (e.g., for the images in data/imaging_data/(256, 256, 192)):
python3 train_neuroharmonize.py --file "data/imaging_data/(256, 256, 192)" --output_file "experiments/imaging_data/(256, 256, 192)"
In the folder experiments/imaging_data/(256, 256, 192)/NeuroHarmonizer_X/images you can then find the produced MRIs.
CatHarm consists of two steps:
- Train the autoencoder
- Generate the images
python3 train_images.py --file "data/imaging_data/(256, 256, 192)" --output_file "experiments/imaging_data/(256, 256, 192)"
python3 predict_images.py --image_file "data/imaging_data/(256, 256, 192)/registered_files.csv" --output_file "experiments/imaging_data/(256, 256, 192)/CatHarm_X"
In the folder experiments/imaging_data/(256, 256, 192)/CatHarm_X/images you can then find the produced MRIs.
One way to evaluate the quality of the images (before and after harmonization) is by predicting the site-specific metadata (e.g., scanner type) as well as the important metadata (e.g., diagnosis). This can be done as follows:
python3 eval_images.py --file "experiments/imaging_data/(256, 256, 192)/CatHarm_X"