Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ESPRESO2: Estimate the Slice Profile for Resolution Enhancement from a Single Image Only Version 2

License: GPL v3

| Paper | Docker Image | Singularity Image |

Introduction

This algorithm estimates a slice profile from a single 2D MR acquisition. 2D MR acquisitions usually have a lower through-plane resolution than in-plane resolutions. The rationale of ESPRESO2 is that if we use a correct slice profile to blur a high-resolution in-plane axis, its appearance should match the low-resolution through-plane axis. Therefore, we use a GAN to learn this slice profile by matching the distributions of image patches that are extracted along the in- and through-plane axes.

Figure 1: Flowchart of ESPRESO2. G: the GAN's generator. D: the GAN's discriminator. T: transpose.

This algorithm can be used to

  • create training data for self-supervised super-resolution algorithms (SSR, Jog 2016, Zhao 2020) that improves the through-plane resolution,
  • measure the the difference between in- and through-plane resolutions (as a metric of the performance of these SSR algorithms).

Example results of using it with Zhao 2020 are shown in Fig. 2. Example measurements of through-plane resolutions (relative to the in-plane resolutions) are shown in Fig. 3.

Figure 2: Example results of an SSR algorithm with and without ESPRESO2. The true slice profile (red) and our estimated slice profile (blue) are shown on the right. The yellow arrow points to an artifact.

Figure 3: Example measurements of through-plane resolutions. (A): the true isotropic image. (B), (C): the super-resolved images from simulations with blurs of FWHM = 2 and FWHM = 4 pixels, respectively, and their corresponding estimated slice profiles from ESPRESO2. Their FWHMs (1.92 and 2.85) can be used as measurements of the super-resolution performance. Yello arrows point to the differences between these images.

Installation

The Docker image or Singularity image are recommended. To use the Docker image:

docker pull registry.gitlab.com/shan-deep-networks/espreso2:0.2.0

The Singularity image was built from the Docker image with Singularity 3.7:

sudo singularity build espreso2_020.sif docker-daemon://espreso2:0.2.0

You might need to rebuilt the Singularity image to use it in a lower version of Singularity. See this link for more details of building a Singularity image from a local Docker image.

The other option is to use pip:

pip install git+https://github.com/shuohan/espreso2

Usage

To use the Docker image, run

image=/path/to/image
output_dir=/path/to/output_dir
docker run -v $image:$image -v $output_dir:$output_dir --user $(id -u):$(id -g) \
    --rm --gpus device=0 -t espreso2:0.2.0 train.py -i $image -o $output_dir

The estimated slice profiles are stored as $output_dir/result.npy and $output_dir/result.png. To measure the FWHM of the estimated slice profile:

docker run -v $image:$image -v $output_dir:$output_dir --user $(id -u):$(id -g) \
    --rm --gpus device=0 -t espreso2:0.2.0 calc_fwhm.py $output_dir/result.npy

To use the Singularity image, run

singularity run -B $image:$image -B $output_dir:$output_dir --nv \
    espreso2_020.sif train.py -i $image -o $output_dir

If espreso2 is installed in the host machine, run

train.py -i $image -o $output_dir

About

MR slice profile estimation by learning to match internal patch distributions

Resources

License

Packages

No packages published