Official implementation of ResMatching, accepted at ISBI 2026.
ResMatching: Noise-Resilient Computational Super-Resolution via Guided Conditional Flow Matching
Anirban Ray, Vera Galinova, Florian Jug [arXiv] | [Interactive Results]
Computational Super-Resolution (CSR) in fluorescence microscopy has, despite being an ill-posed problem, a long history. At its very core, CSR is about finding a prior that can be used to extrapolate frequencies in a micrograph that have never been imaged by the image-generating microscope. It stands to reason that, with the advent of better data-driven machine learning techniques, stronger prior can be learned and hence CSR can lead to better results. Here, we present ResMatching, a novel CSR method that uses guided conditional flow matching to learn such improved data-priors. We evaluate ResMatching on 4 diverse biological structures from the BioSR dataset and compare its results against 7 baselines. ResMatching consistently achieves competitive results, demonstrating in all cases the best trade-off between data fidelity and perceptual realism. We observe that CSR using ResMatching is particularly effective in cases where a strong prior is hard to learn, e.g. when the given low-resolution images contain a lot of noise. Additionally, we show that ResMatching can be used to sample from an implicitly learned posterior distribution and that this distribution is calibrated for all tested use-cases, enabling our method to deliver a pixel-wise data-uncertainty term that can guide future users to reject uncertain predictions.
pip install uv
uv syncStart here for the quickest hands-on introduction: notebooks/resmatching_walkthrough.ipynb
This beginner-friendly notebook is aimed at biologists and microscopists and is the easiest way to get a feel for the full ResMatching workflow.
The notebook explains each cell in detail, includes a tiny 2 to 3 epoch training demo, runs small-sample inference with a pre-trained model, computes lightweight metrics, plots calibration, and visualizes the input / ground truth / MMSE / posterior samples.
Experiments use the BioSR dataset. The following subsets are supported:
| Subset | Structure |
|---|---|
ccp |
Clathrin-Coated Pits |
er |
Endoplasmic Reticulum |
factin |
F-actin |
mt |
Microtubules |
mt_noisy |
Microtubules data with additional noise added |
There are two workflows depending on whether you want to train from scratch or use pre-trained checkpoints.
Metrics are reproducible from provided checkpoints. Full retraining may produce slight variance due to non-deterministic operations.
Step 1. Download data
# Download all subsets
uv run python scripts/download_data.py
# Or download a specific subset
uv run python scripts/download_data.py --subset ccpData is saved to data/<subset>/ by default.
Step 2. Train
uv run python scripts/train.py ccpThe best checkpoint is saved to checkpoints/ccp/best_model.pth. Training runs for 200 epochs by default.
Step 3. Run inference
uv run python scripts/infer.py ccp --checkpoint checkpoints/ccp/best_model.pthWrites multi-sample TIFFs to data/ccp/test_results/ and data/ccp/val_results/.
Step 4. Compute metrics
uv run python scripts/metrics.py ccpReads from data/ccp/test_results/ and prints PSNR, MicroMS3IM, LPIPS, FID, FSIM, and GMSD.
Step 5. (Optional) Calibration
uv run python scripts/calibrate.py ccp --results-dir data/ccpReads val_results/ and test_results/ under data/ccp/ and saves a calibration curve to data/ccp/calibration.pdf.
Step 1. Download data
uv run python scripts/download_data.py --subset ccpStep 2. Download pre-trained checkpoints
# Download all checkpoints
uv run python scripts/download_models.py
# Or download a specific checkpoint
uv run python scripts/download_models.py --subset ccpCheckpoints are saved to checkpoints/<subset>/best_model.pth by default.
Step 3. Run inference
uv run python scripts/infer.py ccp --checkpoint checkpoints/ccp/best_model.pthStep 4. Compute metrics
uv run python scripts/metrics.py ccpStep 5. (Optional) Calibration
uv run python scripts/calibrate.py ccp --results-dir data/ccpIf you find this work useful in your research, please consider citing:
@article{resmatching2025,
title={ResMatching: Noise-Resilient Computational Super-Resolution via Guided Conditional Flow Matching},
author={Anirban Ray and Vera Galinova and Florian Jug},
journal={arXiv preprint arXiv:2510.26601},
year={2025}
}MIT
