← all repositories
ohayonguy/PMRF

Photo-realistic restoration that keeps the math honest

PMRF uses rectified flow to approximate the optimal estimator that minimizes MSE while maintaining photo-realistic quality.

PMRF
Not currently ranked — collecting fresh signals.
star history

What it does

PMRF is a rectified-flow-based image restoration method that tries to square the circle between pixel-perfect accuracy and believable detail. It takes degraded images—primarily aligned face shots—and reconstructs them by flowing from noise toward a target distribution anchored by a posterior-mean predictor. The codebase includes training and evaluation pipelines for blind face restoration as well as controlled degradation experiments.

The interesting bit

The twist is that the method is framed as approximating the optimal estimator under a perfect perceptual quality constraint, rather than just trading off two losses with a hyper-parameter. It learns a flow from a noisy source distribution to the ground truth, conditioned on the posterior mean, which theoretically should give you the minimum MSE answer that still looks real.

Key highlights

  • Provides pre-trained checkpoints for blind face restoration and controlled degradation experiments.
  • Includes a Hugging Face demo and inference scripts for quick evaluation.
  • Ships with baseline implementations for direct comparison, including flow-conditioned and posterior-mean predictor variants.
  • Training relies on the FFHQ dataset and uses the HDiT architecture by default.

Caveats

  • The blind face restoration model expects square, aligned face images; general photos with multiple faces need extra handling.
  • Windows users may hit installation snags with the natten dependency, and the README notes a manual patch is needed for basicsr compatibility.

Verdict

Researchers working on inverse problems in computer vision—especially those who want a principled middle ground between distortion and perceptual metrics—should take a look. If you just need a drop-in face enhancer for arbitrary photos without reading the paper, this might be more machinery than you want.

Frequently asked

What is ohayonguy/PMRF?
PMRF uses rectified flow to approximate the optimal estimator that minimizes MSE while maintaining photo-realistic quality.
Is PMRF open source?
Yes — ohayonguy/PMRF is open source, released under the MIT license.
What language is PMRF written in?
ohayonguy/PMRF is primarily written in Python.
How popular is PMRF?
ohayonguy/PMRF has 752 stars on GitHub.
Where can I find PMRF?
ohayonguy/PMRF is on GitHub at https://github.com/ohayonguy/PMRF.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.