DeepCAN-SR-swinViT: Canine Brain MRI Super-Resolution Model
GitHub: https://github.com/Core-BMC/DeepCAN-SegSR.git
4x super-resolution model for canine brain MRI using SwinUNETR with LoRA adapters, fine-tuned on v1.1a high-resolution balanced dataset.
Model Description
This model performs 2x super-resolution on canine brain MRI scans, enhancing low-resolution inputs to high-resolution outputs for improved visualization and downstream analysis.
- Architecture: SwinUNETR-SR with LoRA fine-tuning
- Input: 64x64x64 patches (single channel)
- Output: 64x64x64 patches (2x enhanced resolution)
- Parameters: ~731MB (includes pretrained SwinUNETR backbone)
- LoRA Config: r=32, alpha=64, dropout=0.1
Super-Resolution Pipeline
Input (0.5mm) โ SwinUNETR-SR โ Output (0.25mm equivalent)
Performance
Validation Metrics (Epoch 100)
| Metric | Value |
|---|---|
| PSNR | 35.88 dB |
| SSIM | 0.972 |
| Loss | 0.010 |
Training Metrics
- Train PSNR: 37.36 dB
- Train Loss: 0.009
Comparison with Previous Version
| Metric | v1.0 (50 epochs) | v1.1a (100 epochs) | Improvement |
|---|---|---|---|
| Val PSNR | 32.23 dB | 35.88 dB | +3.65 dB |
| Val SSIM | 0.941 | 0.972 | +0.031 |
| Val Loss | 0.016 | 0.010 | -37.5% |
Training Details
- Dataset: DeepCAN v1.1a (balanced L/R hemisphere patches)
- Base Model: DeepCAN-SR-swinViT v1.0 (fine-tuned)
- Fine-tuning: LoRA on swinViT layers
- Epochs: 100
- Batch Size: 4
- Learning Rate: 5e-5 (cosine scheduler, min_lr=1e-6)
- Optimizer: AdamW (weight_decay=1e-5)
- Loss: Combined L1 + SSIM + Gradient (weights: 1.0, 0.1, 0.05)
- Early Stopping: patience=15, monitor=val_psnr
- Hardware: NVIDIA RTX 4090 (24GB)
- Training Time: ~72 hours
Training Logs
Full training logs available on Weights & Biases:
- Project: DeepCAN-SegSR
- Run: DeepCAN-SR-swinViT
Usage
import torch
from monai.networks.nets import SwinUNETR
# Load model
model = SwinUNETR(
img_size=(64, 64, 64),
in_channels=1,
out_channels=1,
feature_size=48,
use_checkpoint=False
)
checkpoint = torch.load("DeepCAN-SR-swinViT.pth", map_location="cpu")
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
# Inference
with torch.no_grad():
# input_patch: [B, 1, 64, 64, 64] - normalized intensity
output = model(input_patch)
With Clinical Pipeline
# Clone the main repository
git clone https://github.com/Core-BMC/DeepCAN-SegSR.git
cd DeepCAN-SegSR
# Run super-resolution only
python -m src.inference.cli sr \
--input data/lr_volume.nii.gz \
--checkpoint path/to/DeepCAN-SR-swinViT.pth
# Or use full clinical pipeline (SR + Segmentation)
python -m src.inference.cli clinical \
--input your_dicom_folder/ \
--output outputs/
Model Files
DeepCAN-SR-swinViT.pth: Model weights (731MB)
Requirements
- PyTorch 2.0+
- MONAI 1.3+
- CUDA 11.8+ (for GPU inference)
Limitations
- Trained on canine brain MRI only (not validated for other species)
- Optimized for T2-weighted sequences
- Requires preprocessing to match training data distribution
- Research use only - not validated for clinical diagnosis
Citation
@software{deepcan2025,
title = {DeepCAN SegSR Suite: Canine Brain MRI Super-Resolution and Segmentation},
author = {Hwon Heo & Woo Hyun Shim, DeepCAN AI team},
year = {2025},
url = {https://github.com/Core-BMC/DeepCAN-SegSR}
}
License
This model is released under the DeepCAN Research License - free for non-commercial research and educational use only.
For commercial licensing inquiries, contact: heohwon@gmail.com
See LICENSE for full terms.