Skip to content

imatge-upc/3D-MTransINR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D MTransINR: a 3D Modality Translation model based on Implicit Neural Representations

This is the official implementation of the model introduced in the paper "3D MTransINR: a 3D Modality Translation model based on Implicit Neural Representations", which was presented in the 1st Conference of the Spanish Society of Artificial Intelligence in Biomedicine (CIABiomed 2025).

Install requirements

It is highly recommended to create a new environment to install the requirements so it does not affect your other projects.

pip install -r requirements.txt

Usage

  1. Create your own dataset class in the folder data. Ensure data intensity is normalized to [-1, 1].
  2. Create a configuration file in configs.
  3. Add the required imports to your dataset class in the file train.py.
  4. To train the model use the following line changing the arguments as needed (they are explained in the train.py file):
python train.py --name name_of_your_experiment --config_file ./configs/brats_flair_to_t1t1cet2.json --label_nc 1 --output_nc 3 --batchSize 1 --L1_loss --hr_depth 5 --hr_width 64 --latent_dim 256 --use_gan --latent_code_regularization --checkpoints_dir /path/to/dir/ --encoder resunet --lr 0.0001 --lr_scheduler constant --niter 400

If you have a computing time limit, you may resume the training with the option "--continue_train":

python train.py --name name_of_your_experiment --config_file ./configs/brats_flair_to_t1t1cet2.json --label_nc 1 --output_nc 3 --batchSize 1 --L1_loss --hr_depth 5 --hr_width 64 --latent_dim 256 --use_gan --latent_code_regularization --checkpoints_dir /path/to/dir/ --encoder resunet --lr 0.0001 --lr_scheduler constant --niter 400 --continue_train

Note that Weights and Biases (W&B) is used to monitor the training. If you do not have an account and do not wish to create one, comment all the code that refers to the wandb library and remember to save all the information so you can monitor the process.

  1. To test the model use the test.py file with the arguments that match the training process.

Model

The model architecture is the following:

Model Architecture

For more information, please read the article.

Acknowledgements

This code is based on CoNeS.

The code of the 3D Residual U-Net has been extracted from pytorch-3dunet.

About

3D MTransINR's official repository. 3D MTransINR is a DL model to translate MRI modalities using Implicit Neural Representations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages