8000 GitHub - ZyoungXu/MoSt-DSA: [ECAI 2024] MoSt-DSA: Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[ECAI 2024] MoSt-DSA: Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images

License

Notifications You must be signed in to change notification settings

ZyoungXu/MoSt-DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MoSt-DSA

Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images

Ziyang Xu1, Huangxuan Zhao2, Ziwei Cui1, Wenyu Liu1, Chuansheng Zheng2, Xinggang Wang1 πŸ“§

(πŸ“§) corresponding author.

1 Institute of AI, School of Electronic Information and Communications, Huazhong University of Science and Technology, Wuhan, China. 2 Department of Radiology, Union Hospital, Tongji Medical College, Huazhong University of Science and Technology, Wuhan, China.

arxiv license

πŸ”” News

  • July 10, 2024: We released our code. If you found it helpful, please give us a star 🌟 and cite our paper! πŸ€—

  • July 4, 2024: MoSt-DSA is accepted to ECAI2024! 🍻 The preprint paper πŸ“” can be found on arxiv.

πŸ”– Abstract

Artificial intelligence has become a crucial tool for medical image analysis. As an advanced cerebral angiography technique, Digital Subtraction Angiography (DSA) poses a challenge where the radiation dose to humans is proportional to the image count. By reducing images and using AI interpolation instead, the radiation can be cut significantly. However, DSA images present more complex motion and structural features than natural scenes, making interpolation more challenging. We propose MoSt-DSA, the first work that uses deep learning for DSA frame interpolation. Unlike natural scene Video Frame Interpolation (VFI) methods that extract unclear or coarse-grained features, we devise a general module that models motion and structural context interactions between frames in an efficient full convolution manner by adjusting optimal context range and transforming contexts into linear functions. Benefiting from this, MoSt-DSA is also the first method that directly achieves any number of interpolations at any time steps with just one forward pass during both training and testing. We conduct extensive comparisons with 7 representative VFI models for interpolating 1 to 3 frames, MoSt-DSA demonstrates robust results across 470 DSA image sequences (each typically 152 images), with average SSIM over 0.93, average PSNR over 38 (standard deviations of less than 0.030 and 3.6, respectively), comprehensively achieving state-of-the-art performance in accuracy, speed, visual effect, and memory usage.

πŸŽ‡ Highlights

  • MoSt-DSA is the first work that uses deep learning for DSA frame interpolation, and also the first method that directly achieves any number of interpolations at any time steps with just one forward pass during both training and testing.

  • MoSt-DSA demonstrates robust results across 470 DSA image sequences (each typically 152 images), with average SSIM over 0.93, average PSNR over 38 (standard deviations of less than 0.030 and 3.6, respectively), comprehensively achieving SOTA performance in accuracy, speed, visual effect, and memory usage.

  • MoSt-DSA can significantly reduce the DSA radiation dose received by doctors and patients when applied clinically, lowering it by 50%, 67%, and 75% when interpolating 1 to 3 frames, respectively.

πŸ“¦ Environment Setups

  • python 3.8
  • cudatoolkit 11.2.1
  • cudnn 8.1.0.77
  • See 'MoSt-DSA_env.txt' for Python libraries required
conda create -n MoSt_DSA python=3.8
conda activate MoSt_DSA
conda install cudatoolkit=11.2.1 cudnn=8.1.0.77
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
# cd /xx/xx/MoSt-DSA
pip install -r MoSt-DSA_env.txt

πŸ—ƒοΈ Model Checkpoints

Download the checkpoints of single-frame interpolation, two-frame interpolation, three-frame interpolation, and put all pkl files into ../MoSt-DSA/weights/checkpoints. You can use these checkpoints as pre-training weights or for inference.

🎞️ Inference Demo

Run the following commands to generate single/multi-frame interpolation:

  • Single-frame interpolation
python Simple_Interpolator.py \
--model_path ./weights/checkpoints/Inf1.pkl \
--frame1 ./demo_images/DSA_a.png \
--frame2 ./demo_images/DSA_b.png \
--inter_frames 1
  • Two-frame interpolation
python Simple_Interpolator.py \
--model_path ./weights/checkpoints/Inf2.pkl \
--frame1 ./demo_images/DSA_a.png \
--frame2 ./demo_images/DSA_b.png \
--inter_frames 2
  • Three-frame interpolation
python Simple_Interpolator.py \
--model_path ./weights/checkpoints/Inf3.pkl \
--frame1 ./demo_images/DSA_a.png \
--frame2 ./demo_images/DSA_b.png \
--inter_frames 3

πŸš‚ Training on your medical datasets

Data Preparation

You should extract consecutive frames of data and then organize your dataset as follows:

  • For single-frame interpolation
β”œβ”€β”€ <Your_datasets_root>
β”‚    β”œβ”€β”€ Data_part_1
β”‚        β”œβ”€β”€ Sequence_1
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3.png
β”‚        β”œβ”€β”€ Sequence_2
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3.png
β”‚        β”œβ”€β”€ ...
β”‚    β”œβ”€β”€ Data_part_2
β”‚        β”œβ”€β”€ Sequence_1
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3.png
β”‚        β”œβ”€β”€ Sequence_2
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3.png
β”‚        β”œβ”€β”€ ...
β”‚    | ...
  • For multi-frame interpolation(for example, three-frame)
β”œβ”€β”€ <Your_datasets_root>
β”‚    β”œβ”€β”€ Data_part_1
β”‚        β”œβ”€β”€ Sequence_1
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3_gt.png
β”‚            β”œβ”€β”€ frame_4_gt.png
β”‚            β”œβ”€β”€ frame_5.png
β”‚        β”œβ”€β”€ Sequence_2
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3_gt.png
β”‚            β”œβ”€β”€ frame_4_gt.png
β”‚            β”œβ”€β”€ frame_5.png
β”‚        β”œβ”€β”€ ...
β”‚    β”œβ”€β”€ Data_part_2
β”‚        β”œβ”€β”€ Sequence_1
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3_gt.png
β”‚            β”œβ”€β”€ frame_4_gt.png
β”‚            β”œβ”€β”€ frame_5.png
β”‚        β”œβ”€β”€ Sequence_2
β”‚            β”œβ”€β”€ frame_1.png
β”‚            β”œβ”€β”€ frame_2_gt.png
β”‚            β”œβ”€β”€ frame_3_gt.png
β”‚            β”œβ”€β”€ frame_4_gt.png
β”‚            β”œβ”€β”€ frame_5.png
β”‚        β”œβ”€β”€ ...
β”‚    | ...

Also, you should list the paths of all the sequences for train-set and test-set by making TrainList.txt and TestList.txt, as follows:

  • Make TrainList.txt for train-set. Each line in txt corresponds to a sequence path, like:
Data_part_1/Sequence_1
Data_part_1/Sequence_2
Data_part_1/Sequence_3
Data_part_1/Sequence_4
Data_part_2/Sequence_1
Data_part_2/Sequence_2
Data_part_2/Sequence_3
Data_part_2/Sequence_4
...
  • Make TestList.txt for test-set. Each line in txt corresponds to a sequence path, like:
Data_part_301/Sequence_1
Data_part_301/Sequence_2
Data_part_301/Sequence_3
Data_part_301/Sequence_4
Data_part_302/Sequence_1
Data_part_302/Sequence_2
Data_part_302/Sequen
8437
ce_3
Data_part_302/Sequence_4
...

Download weight for Multi-loss Calculation

For calculating style loss and perceptual loss, download weight and put it into ../MoSt-DSA/weights/vgg_weight.

Training Commands

Taking the training single-frame interpolation model as an example. You can also modify the "--inter_frames" value to specify other number of interpolation frames. If you try to do so, please make sure that "--data_path" and "--txt_path" correspond to the "--inter_frames".

Single-machine Single-GPU Training

CUDA_VISIBLE_DEVICES=0 \
python -m torch.distributed.launch --nproc_per_node=1 --master_port 37501 Train_Test_Pipe.py \
--world_size 1 \
--batch_size 8 \
--data_path /xx/xx/Your_datasets_root \
--txt_path /xx/xx/txts_root/that/has/TrainList/and/TestList/txt \
--inter_frames 1 \
--model_save_name xxx_model \
--note name_of_log_folder \
--note_print xxx_experiment \
--max_epochs 50

Single-machine Multi-GPU Training

CUDA_VISIBLE_DEVICES=0,1,2,3 \
python -m torch.distributed.launch --nproc_per_node=4 --master_port 37502 Train_Test_Pipe.py \
--world_size 4 \
--batch_size 8 \
--data_path /xx/xx/Your_datasets_root \
--txt_path /xx/xx/txts_root/that/has/TrainList/and/TestList/txt \
--inter_frames 1 \
--model_save_name xxx_model \
--note name_of_log_folder \
--note_print xxx_experiment \
--max_epochs 50

πŸ“ˆ Evaluate on your medical datasets

Taking the evaluating single-frame interpolation model as an example. You can also modify the "--inter_frames" value to specify other number of interpolation frames. If you try to do so, please make sure that "--data_path" and "--txt_path" correspond to the "--inter_frames".

CUDA_VISIBLE_DEVICES=0 \
python -m torch.distributed.launch --nproc_per_node=1 --master_port 37503 Train_Test_Pipe.py \
--world_size 1 \
--data_path /xx/xx/Your_datasets_root \
--txt_path /xx/xx/txts_root/that/has/TrainList/and/TestList/txt \
--inter_frames 1 \
--note Eval-Model-xxx \
--note_print My-Eval-Inf2 \
--pretrain_weight /xxx/xxx/xxx/modelxxx.pkl \
--only_eval True

🏡️ Acknowledgements

This project is based on EMA-VFI, Lambda Networks, FILM, Perceptual Loss, Style Loss. Thanks for their wonderful works.

πŸ’– Citation

If you find MoSt-DSA is useful in your research or applications, please feel free to give us a star 🌟 and cite our paper:

@InProceedings{Xu2024MoSt-DSA,
      title={MoSt-DSA: Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images},
      author={Ziyang Xu and Huangxuan Zhao and Ziwei Cui and Wenyu Liu and Chuansheng Zheng and Xinggang Wang},
      booktitle={European Conference on Artificial Intelligence},
      pages={537-544},
      year={2024},
      url={https://ebooks.iospress.nl/pdf/doi/10.3233/FAIA240531},
}

or

@misc{Xu2024MoSt-DSA,
      title={MoSt-DSA: Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images},
      author={Ziyang Xu and Huangxuan Zhao and Ziwei Cui and Wenyu Liu and Chuansheng Zheng and Xinggang Wang},
      year={2024},
      eprint={2407.07078},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2407.07078},
}

About

[ECAI 2024] MoSt-DSA: Modeling Motion and Structural Interactions for Direct Multi-Frame Interpolation in DSA Images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0