This repository provides a standalone implementation of the GPU-accelerated bilateral solver introduced in our paper (Modular Neural Image Signal Processing, Afifi et al., 2025 — supplemental Sec. A).
Our solver is built on the original Fast Bilateral Solver (FBS), but is redesigned entirely using dense GPU-friendly tensor operations, achieving up to 15x (~7x on average) faster performance on GPU* compared to the CPU-based FBS.
- Python 3.8+
- PyTorch (GPU build recommended)
- OpenCV
- NumPy
python demo.py \
--input-image-path path/to/input.png \
--reference-image-path path/to/guidance.pngThe solver will refine the input using the guidance image, save the output as: input_output.png
If you use this solver in your research, please cite:
@article{afifi2025modular,
title={Modular Neural Image Signal Processing},
author={Afifi, Mahmoud and Wang, Zhongling and Zhang, Ran and Brown, Michael S.},
year={2025}
}

