This project demonstrates the key idea from the paper
"Compositional Generative Modeling: A Single Model is Not All You Need"
by training:
- A Shape VAE on grayscale 2D shapes
- A Color Mapper CNN to colorize them
- A Compositional Generator that mixes shape + color
generate_shapes_dataset.py: creates the toy datasettrain_shape_vae.py: trains the shape generatortrain_color_mapper.py: trains the color mapper (with edge-aware loss)compose_generate.py: composes grayscale + color into new samplesview_results.ipynb: visualizes progress over epochs
This reproduces the compositional generalization discussed in the paper, showing improved performance over a monolithic VAE.