Downloads · 30 days
20
33% of all-time downloads
AmirEhsan1995/Glimpse
Glimpse is a image-to-image model from AmirEhsan1995. Use it when you need one image transformed into another. It is set up for glimpse-ct. The card lists the license as mit.
Coordinate-based CT reconstruction from sparse-view sinograms (paper, arXiv, code), published in IEEE Transactions on Medical Imaging. Instead of reconstructing a whole image at once, GLIMPSE
Downloads · 30 days
20
33% of all-time downloads
All-time downloads
61
Public
Parameters
1.3M
5.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.3 MB · 100%
From the Hugging Face model README
Coordinate-based CT reconstruction from sparse-view sinograms (paper, arXiv, code), published in IEEE Transactions on Medical Imaging. Instead of reconstructing a whole image at once, GLIMPSE predicts one pixel at a time from only the sinogram data local to that pixel's coordinate. This locality makes it resolution-agnostic and gives strong out-of-distribution generalization — e.g. train on natural images / faces and reconstruct medical brain scans without retraining.
| Image size | 128 |
| Projection angles (views) | 50 |
| Noise (SNR, dB) | 45 |
| Forward operator | odl (circle=False) |
| Parameters | ~1.3 M |
GLIMPSE substantially outperforms classical filtered back-projection (FBP), both in-distribution and out-of-distribution:
| Set | FBP PSNR / SSIM | GLIMPSE PSNR / SSIM |
|---|---|---|
| In-distribution (LoDoPaB-CT test) | 30.8 dB / 0.79 | 38.0 dB / 0.93 |
| Out-of-distribution (brain CT) | 26.1 dB / 0.51 | 31.6 dB / 0.88 |
import numpy as np, torch
from glimpse import GlimpseModel, Config
from glimpse.operators import build_operator
from glimpse.reconstruct import make_coordinate_grid, reconstruct_image
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model = GlimpseModel.from_pretrained("AmirEhsan1995/Glimpse").eval().to(device)
# Build the matching ODL parallel-beam operator (50 views over [0, 180) deg).
cfg = Config.from_yaml('configs/lodopab.yaml') # from the GitHub repo
_, init_angles = cfg.resolve_angles()
operator = build_operator(cfg, np.deg2rad(init_angles))
volume = torch.as_tensor(my_image[None], dtype=torch.float32, device=device) # (1, H, W)
sino = operator.project(volume) # sparse-view sinogram
coords = make_coordinate_grid(cfg.image_size).unsqueeze(0).to(device)
recon = reconstruct_image(sino, coords, 1, model, chunk_size=1024)
recon = recon.reshape(cfg.image_size, cfg.image_size)
See the demo notebook for an end-to-end example (data download, FBP baseline, PSNR/SSIM, figures).
@article{khorashadizadeh2025glimpse,
title = {GLIMPSE: Generalized Locality for Scalable and Robust CT},
author = {Khorashadizadeh, AmirEhsan and Debarnot, Valentin and Liu, Tianlin and Dokmani{\'c}, Ivan},
journal = {IEEE Transactions on Medical Imaging},
year = {2025},
doi = {10.1109/TMI.2025.3568017}
}