Giter Club home page Giter Club logo

rdst's Introduction

RDST

A residual dense vision transformer for medical image super-resolution with novel general-purpose perceptual loss.

Introduction

This paper proposes an efficient vision transformer with residual dense connections and local feature fusion to achieve efficient single-image super-resolution (SISR) of medical modalities. Moreover, we implement a general-purpose perceptual loss with manual control for image quality improvements of desired aspects by incorporating prior knowledge of medical image segmentation. Compared with state-of-the-art methods on four public medical image datasets, the proposed method achieves the best PSNR scores of 6 modalities among seven modalities. It leads to an average improvement of +0.09 dB PSNR with only 38% parameters of SwinIR. On the other hand, the segmentation-based perceptual loss increases +0.14 dB PSNR on average for SOTA methods, including CNNs and vision transformers. Additionally, we conduct comprehensive ablation studies to discuss potential factors for the superior performance of vision transformers over CNNs and the impacts of network and loss function components.

Framework of the proposed RDST network.

Results

Broad applicability on medical images

OASIS BraTS ACDC COVID-CT

Comparing with SOTA methods (PSNR + Segmentation)

On OASIS

Segmentation-based perceptual loss

Train & Test

To setup:

git clone https://github.com/GinZhu/RDST.git
cd RDST
pip install -r requirements.txt

To train:

python -W ignore train.py --config-file config_files/RDST_E1_OASIS_example_SRx4.ini

To test:

python -W ignore test.py --config-file config_files/RDST_E1_OASIS_example_SRx4_testing.ini

Pre-trained models

Here we provide pre-trained models to download (on the OASIS dataset):

  • RDST-E1: +0.16 PSNR than SwinIR with only 38% parameters;
  • RDST-HRL: [+0.0016, +0.0051, +0.0005, +0.0005] dice coefficients than SwinIR.
  • RDST-E: +0.02 PSNR than SwinIR with only 20% parameters and +46% faster.

Publications & citations

This work is available at arXiv, please cite as:

@article{zhu2023rdst,
  title={A residual dense vision transformer for medical image super-resolution with segmentation-based perceptual loss fine-tuning},
  author={Zhu, Jin and Yang, Guang and Lio, Pietro},
  journal={arXiv preprint arXiv:2302.11184},
  year={2023}
}

We refer to the previous works for better understanding of this project:

rdst's People

Contributors

ginzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nvr98

rdst's Issues

issues

I am particularly impressed by your work and interested in conducting a detailed analysis based on similar parameters. To ensure the accuracy and compatibility of my data with the methodologies you employed, I would be very grateful if you could provide me with the specific data format you used in your study.Thank you

损失权重问题

你好,请问使用WGAN或VGG损失时,该使用多少的权重?

Training Discrepancy

Hello, I trained the RDST model using the approach you recommended, but the PSNR and SSIM values I obtained during testing differ significantly from the ones you provided. I'm wondering if I made a mistake during training, or if you have unique training techniques? Here are the metrics I obtained:
Case IDs: ['OAS1_0009_MR1', 'OAS1_0033_MR1', 'OAS1_0023_MR1', 'OAS1_0004_MR1', 'OAS1_0019_MR1', 'OAS1_0032_MR1', 'OAS1_0029_MR1', 'OAS1_0010_MR1', 'OAS1_0003_MR1']
SR psnr ssim mse uqi ergas scc vifp fid


4 32.71(3.2) 0.9218(0.037) 0.0006475(0.00033) 0.6924(0.3) 7.013(9.9) 0.3758(0.16) 0.8148(0.065) 93.57(5.7)

I made modifications to the 'RDST_E1_OASIS_example_SRx4.ini' file you provided by changing the number of epochs to 100000 and 20000, and performing validation every 2000 epochs. I would like to ask if there are any other aspects that need to be changed.

Training Model

I can't train the model. I get this error. Can you please help me?

Traceback (most recent call last):
File "/content/RDST/train.py", line 57, in
ds_train = OASISMultiSRTrain(paras)
File "/content/RDST/datasets/OASIS_dataset.py", line 122, in init
self.loading()
File "/content/RDST/datasets/OASIS_dataset.py", line 72, in loading
image_path = glob(join(self.raw_data_folder, pid, self.image_folder, '*masked_gfc.img'))[0]
IndexError: list index out of range

测试出现问题

Traceback (most recent call last):
File "test.py", line 31, in
tester.test()
File "/data2/qinfl_home/home/RDST-main/models/trans_sr_tester.py", line 200, in test
eva_report, inference_cost = self.evaluation(pid, self.DS)
File "/data2/qinfl_home/home/RDST-main/models/basic_tester.py", line 172, in evaluation
eva_report = self.eva_func(rec_imgs, ori_samples)
File "/data2/qinfl_home/home/RDST-main/metrics/sr_evaluation.py", line 152, in call
report_with_scale = self.func(gt_imgs, rec_imgs_with_scale, int(np.ceil(s)))
File "/data2/qinfl_home/home/RDST-main/metrics/sr_metrics.py", line 72, in call
s = func(g, p)
File "/data2/qinfl_home/home/RDST-main/metrics/sr_metrics.py", line 13, in ssim
return structural_similarity(GT, P, data_range=1, multichannel=False)
File "/data2/qinfl_home/home/anaconda3/envs/RDST/lib/python3.8/site-packages/skimage/metrics/_structural_similarity.py", line 178, inty
raise ValueError(
ValueError: win_size exceeds image extent. Either ensure that your images are at least 7x7; or pass win_size explicitly in the functionalue less than or equal to the smaller side of your images. If your images are multichannel (with color channels), set channel_axis to esponding to the channels.

你好,请问出现这个问题是因为python版本问题还是测试集的问题,但是我就是用你本来的数据集呀

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.