How to run the code on other datasets?
June 13, 2024 ยท View on GitHub
-
Based on the production process of the IXI dataset in TransMorph or the LPBA dataset we provided, create your corresponding .pkl dataset. Or modify the file reading method in data/datasets.py according to your needs.
-
Modify the
self.seg_tableof the class Seg_norm in data/trans.py to include all the values present in the label images of the dataset, which can typically be obtained using the np.unique function.The function of this class is to normalize the values in
seg_tableto a sequence of consecutive integers starting from zero. -
Modify the
VOI_lblsin the dice_val_VOI function of the utils.py to the number of the label (normalized in step 2) that needs to be calculated in Dice metric.