Skip to content

parsakhavarinejad/HADESR-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HADESR-GAN: A Lightweight Hybrid Attention-based GAN for Medical Image Super-Resolution

This repository contains the official PyTorch implementation of HADESR-GAN, a parameter-efficient hybrid-attention generative adversarial network for medical image super-resolution, as presented in the paper "HADESR-GAN: A Lightweight Hybrid Attention-based GAN for Medical Image Super-Resolution." which is already submitted to Nature Scientific Reports


🧠 Abstract

High-resolution (HR) medical imaging is vital for accurate diagnosis, yet its deployment is often constrained by hardware limitations, radiation exposure, and real-time processing demands.
We introduce HADESR-GAN, a parameter-efficient hybrid-attention generative adversarial network for medical image super-resolution.
The generator integrates the Residual Whole Map Attention (RWMAN) backbone of MedSRGAN with a lightweight Hybrid Attention Separable Block (HASB) based on depthwise-separable convolutions and attention fusion.
Transformer-inspired global context modeling further enhances textural consistency.
This model achieves high performance with approximately 85% fewer parameters than its baseline, MedSRGAN.


✨ Key Features

  • Lightweight Architecture: Achieves state-of-the-art results with only ~1.6 million parameters.
  • Hybrid Attention Mechanism: Integrates a Hybrid Attention Separable Block (HASB) with a Residual Whole Map Attention (RWMAN) backbone.
  • High Performance: Achieves excellent PSNR and SSIM scores across multiple medical imaging datasets.
  • GAN-based Training: Produces perceptually realistic high-resolution images.
  • Modular and Configurable: The code is organized for easy modification and experimentation.

🏗️ Model Architecture

The HADESR-GAN consists of a Generator and a Discriminator, trained in an adversarial setup.

🔹 Generator

The generator combines Short Residual Connections (SRC) with the novel Hybrid Attention Separable Blocks (HASB), significantly reducing the number of layers compared to the original MedSRGAN.

Generator Architecture Attention Blocks

🔹 Discriminator

The discriminator is a deep CNN with a dual-path design for multi-scale analysis, enabling it to effectively distinguish between real and super-resolved images. Generator Architecture


📊 Results

HADESR-GAN was evaluated on three medical imaging datasets:

Dataset Domain PSNR (dB) SSIM
Chest CT (LIDC-IDRI) CT 34.32 0.90
Echocardiography (Tehran Heart Center) Echo 32.04 0.92
Dermoscopy (ISIC) Skin 37.18 0.94

Ct-Scan Sample Echocardiography Sample Skin Cancer Sample

📁 Project Structure

HARNSRGAN/
│
├── dataset/
│ ├── train/
│ └── val/
│
├── models/
│ ├── discriminator.py
│ └── generator.py
│
├── losses/
│ ├── discriminator_loss.py
│ └── generator_loss.py
│
├── trainer/
│ └── trainer.py
│
├── utils/
│ ├── dataset.py
│ ├── early_stopping.py
│ └── visualize.py
│
├── config.py
├── main.py
├── requirements.txt
└── README.md

⚙️ Setup and Usage

🧩 Prerequisites

  • Python 3.8+
  • PyTorch
  • Other dependencies listed in requirements.txt

💻 Installation

Clone the repository:

git clone https://github.com/parsakhavarinejad/HADESR-GAN.git
cd HADESR-GAN

Install dependencies:

pip install -r requirements.txt

🚀 Training

Prepare your dataset: Place training images in dataset/train/ and validation images in dataset/val/.

Configure training parameters: Modify config.py as needed.

Run the training script:

python main.py

🧾 Citation

If you find this work useful for your research, please cite our paper when it is published.

About

Source code for HADESR-GAN

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages