How zhtmgxr/generative-face-modeling works
This is a PyTorch research package comparing VAE, GAN, and hybrid VAE-GAN face generation on CelebA. Its main workflow loads configured CelebA images, trains the selected model with its corresponding objectives, and saves checkpoints and generated samples; separate commands evaluate generated images and analyze VAE latent attribute directions. The training excerpt is partial, so the graph omits uncertain internal wiring beyond the calls shown and documented capabilities.
Main entry points: train.py Training entry · evaluate.py Evaluation command · latent_analysis.py Latent analysis · utils.py Experiment utilities
Components 18
Training
- Training entry
src/facegen/train.py
Models and objectives
- Model components
src/facegen/models.py - Training objectives
src/facegen/losses.py
Data and configuration
- Config loader
src/facegen/config.py - CelebA loader
src/facegen/data.py
Evaluation and latent analysis
- Evaluation command
src/facegen/evaluate.py - Inception Score
src/facegen/evaluate.py - Laplacian Variance
src/facegen/evaluate.py - Latent analysis
src/facegen/latent_analysis.py - Attribute traversal
src/facegen/latent_analysis.py
Experiment outputs
- Experiment utilities
src/facegen/utils.py - Checkpoints
- Generated samples
- Training metrics
- Evaluation results
- Traversal image
Other components
- Researcher
- CelebA dataset
Connections 23
- Researcher → Training entry: selects model
- Training entry → Config loader: loads settings
- Training entry → CelebA loader: builds loader
- CelebA loader → CelebA dataset: loads and transforms
- Training entry → Model components: constructs and trains
- Training entry → Training objectives: computes objectives
- Training entry → Experiment utilities: records outputs
- Experiment utilities → Checkpoints: writes
- Experiment utilities → Generated samples: writes
- Experiment utilities → Training metrics: writes
- Researcher → Evaluation command: requests evaluation
- Evaluation command → Checkpoints: loads
- Evaluation command → Model components: loads and samples
- Evaluation command → Inception Score: computes
- Evaluation command → Laplacian Variance: computes
- Evaluation command → Evaluation results: writes
- Researcher → Latent analysis: requests traversal
- Latent analysis → Config loader: loads settings
- Latent analysis → CelebA loader: builds loader
- Latent analysis → Checkpoints: loads
- Latent analysis → Model components: encodes examples
- Latent analysis → Attribute traversal: estimates direction and renders
- Attribute traversal → Traversal image: writes