Skip to content

smriti-joshi/muvi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MuVi

MuVi: Official repository of "Single Image Test-Time Adaptation via Multi-View Co-Training" In MICCAI 2025.

architecture

Important Links

Pipeline Overview

This pipeline is built on top of the nnU-Net inference pipeline, extending the nnUNetPredictor class.

📂 Repository Structure

├── LICENSE                         # Main license for this repo
├── NOTICE                          # Notices for reused third-party code
├── README.md                       # You’re reading it :)
│
├── images/                         # Figures for README/docs
|
└── scripts/                        # All experiment & training scripts
    │
    ├── compute_metrics.py          # Evaluation metrics (e.g. Dice, Hausdorff, ASSD)
    ├── infer_with_test_time_adaptation.py  # 🌟 Main entry point for running inference w/ MuVi and other methods
    ├── run.sh                      # Example bash script to run experiments
    ├── utils.py                    # Shared utility functions
    │
    ├── test_time_training_methods/ # Implementations of different TTA methods
    │   ├── bnadapt/                # BNAdapt method
    │   │   ├── LICENSE
    │   │   ├── NOTICE
    │   │   ├── bn.py               # BNAdapt core implementation
    │   │  
    │   ├── intent/                 # InTent method 
    │   │   ├── LICENSE
    │   │   ├── intent.py           # InTent core implementation
    │   │  
    │   ├── memo/                   # MEMO method 
    │   │   ├── LICENSE
    │   │   ├── memo.py             # MEMO core implementation
    │   │   └── test_time_augmentation.py  # Augmentation logic for MEMO
    │   │
    │   ├── muvi/                   # 🌟 Our proposed MuVi method
    │   │   ├── config.yaml         # 🌟 MuVi hyperparameters & configs
    │   │   └── muvi_trainer.py     # 🌟 MuVi training & test-time adaptation logic

    │   │
    │   └── tent/                   # Tent method (modified the original repo to add PTN and 2D BatchNorm --> 3D BatchNorm)
    │       ├── LICENSE
    │       ├── README.md           # Original Tent docs
    │       ├── cfgs/               
    │       │   ├── norm.yaml
    │       │   ├── source.yaml
    │       │   └── tent.yaml
    │       ├── cifar10c.py         
    │       ├── conf.py             
    │       ├── norm.py             # PTN core implementation
    │       ├── tent.py             # Tent core implementation
    │       └── requirements.txt   

🐣 How to run?

1. Install nnU-Net

Follow the official nnU-Net installation instructions:
👉 nnU-Net GitHub

⚠️ Our pipeline is built on nnU-Net’s inference pipeline (nnUNetPredictor class).
Currently, only one-fold inference is supported (not five-fold).

2. Clone the repository

git clone https://github.com/your-username/muvi-tta.git
cd muvi-tta/scripts

3. Make necessary modifications

📊 Normalization: To switch between InstanceNorm and BatchNorm, edit norm_op in plans.json file in the respective nnUNet_results folder.

📦 Checkpoints: Download the baseline and supervised checkpoints from here and add it to the respective nnUNet_results folder.

4. Run inference with MuVi

python infer_with_test_time_adaptation.py \
    --input /path/to/images \
    --output /path/to/save/results \
    --model /path/to/nnunet_trained_model \
    --method muvi

5. Compute Evaluation Metrics

python compute_metrics.py \
    --predictions /path/to/save/results \
    --ground_truth /path/to/gt_labels

run.sh compiles the commands above!

📋 To-Do List

This repository is currently being developed. The remaining tasks include:

[ ] Add preprocessing pipeline

[ ] Add checkpoints to google drive

[ ] Add data partitioning information

[ ] Add additional results

[ ] Verify that MuVi works with the current version of nnUNet

[ ] Create requirements.txt file

Citation

If you use MuVi in your work, we’d love it if you gave us a shout-out by citing our paper!

@misc{joshi2025singleimagetesttimeadaptation,
      title={Single Image Test-Time Adaptation via Multi-View Co-Training}, 
      author={Smriti Joshi and Richard Osuala and Lidia Garrucho and Kaisar Kushibar and Dimitri Kessler and Oliver Diaz and Karim Lekadir},
      year={2025},
      eprint={2506.23705},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2506.23705}, 
}

Acknowledgements

This work builds upon nnUNet repository and adapts several test time adaptation methods to this framework:

We acknowledge the authors of these works for releasing their code.

This repository was developed at the BCN-AIM, Universitat de Barcelona, Spain.

We gratefully acknowledge support from RadioVal (European research and innovation programme grant agreement No 101057699).

bcn-aim radioval ub

About

MuVi: Official repository of "Single Image Test-Time Adaptation via Multi-View Co-Training" In MICCAI 2025.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors