How nav3054/balle2018-scale-hyperprior works
Project type and purpose
• This is a machine-learning training pipeline (not a web app).
• Purpose: train and evaluate a learned image compression model (Ballé et al. 2018) using TensorFlow 2.x.
• Key use cases: ingest large image datasets, train the scale-hyperprior compression model, log and checkpoint results, evaluate on held-out data.
File structure
• Top-level files
• README.md, LICENSE
• data/
• imagenet_patch_loader.py – dataset extraction, splitting, patch creation
• models/
• balle_hyperprior_2018_model.py – the Keras Model implementation (encoder/decoder, entropy models)
• training/
• train.py – main entrypoint, argument parsing, orchestration
• callbacks.py – checkpoint management, early stopping, image logging
• losses.py – rate-distortion loss implementation
• No frontend or microservices; purely a single-process training pipeline.
Extract additional insights from the README
• CLI interface for configuring data paths, hyperparameters
• Modular utilities for data loading, model definition, loss calculation, callbacks
• Outputs: model checkpoints, image logs, final metrics
• Underlying pattern: sequential ML pipeline with clearly separated concerns.