This project contains two experiments based on FLOWER:
- A 2D toy experiment with a conditional GMM prior (
gmm.ipynb) - A face image super-resolution experiment using a pretrained model (
faces.ipynb)
The goal is to explain and visualize the 3-step FLOWER scheme:
- Flow-consistent destination estimation
- Refining this destination using the measurements
- Updating the trajectory over time
The results are then compared with simple baselines.
gmm.ipynb: 2D GMM experiment, flow matching training, trajectory visualizationfaces.ipynb: face super-resolution experiment using pretrained FLOWER weights
scripts/create_gmm_data.py: generation of the toy GMM prior and posteriorscripts/train_gmm_flow_matching.py: training of the flow matching model on posterior samplesscripts/gmm_flow_model.py: time-conditioned MLP architecture + Euler samplingscripts/flower_steps.py: factorized implementation of the FLOWER steps (GMM and image inverse problems)scripts/flower_plotting.py: plotting utilities for the GMM experimentscripts/faces_pipeline.py: utilities for images, seeds, PSNR computation, and local super-resolution
results_examples/: example images already generated to illustrate outputsmehrsapo_Flower/: FLOWER source code used by thefaces.ipynbexperiment
- Generates a 2D GMM prior and its posterior conditioned on a noisy linear observation
- Trains a flow matching model on posterior samples
- Applies the three FLOWER steps and saves step-by-step visualizations
- Loads a pretrained FLOWER model trained on CelebA (weights are downloaded if missing)
- Takes a custom face image and generates a noisy low-resolution observation
- Reconstructs the high-resolution image using the FLOWER steps
- Compares results with simple baselines (adjoint, bicubic) using PSNR
