EndlessSora/focal-frequency-loss

[ICCV 2021] Focal Frequency Loss for Image Reconstruction and Synthesis

59
/ 100
Established

Computes an adaptive frequency-domain loss that down-weights easy-to-synthesize frequency components while focusing on harder-to-reconstruct ones, complementing spatial losses in generative models. Implemented as a drop-in PyTorch `nn.Module` with tunable hyperparameters (`alpha` for focus strength, `loss_weight` for contribution), it integrates seamlessly with VAEs, pix2pix, SPADE, and StyleGAN2 architectures. Operates via Fourier transform analysis with configurable patch-based and batch-level spectrum weighting strategies across diverse image tasks from reconstruction to conditional and unconditional synthesis.

706 stars and 2,572 monthly downloads. No commits in the last 6 months. Available on PyPI.

Stale 6m
Maintenance 0 / 25
Adoption 18 / 25
Maturity 25 / 25
Community 16 / 25

How are scores calculated?

Stars

706

Forks

63

Language

Python

License

MIT

Last pushed

Aug 21, 2024

Monthly downloads

2,572

Commits (30d)

0

Dependencies

2

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/diffusion/EndlessSora/focal-frequency-loss"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.