🎨 Mosaic Generator
Generate beautiful mosaic-style images from your photos using advanced image processing techniques.
Upload & Configure
8 128
4 64
256 1024
256 1024
Color Quantization:
4 16
4 32
Results
Performance Benchmarking
Grid Size Benchmarking
About the Mosaic Generator
This application implements a complete mosaic generation pipeline with the following features:
Note: The first time you generate a mosaic, it will load tiles from the Hugging Face dataset. This may take a few moments, but subsequent generations will be much faster as tiles are cached.
Core Functionality
- Image Preprocessing: Resize and crop images to fit grid requirements
- Color Quantization: Optional uniform and K-means quantization
- Grid Analysis: Vectorized operations for efficient processing
- Tile Mapping: Replace grid cells with matching image tiles
- Quality Metrics: MSE, PSNR, SSIM, and color similarity analysis
Performance Features
- Vectorized Operations: NumPy-based efficient processing
- Grid Size Benchmarking: Performance analysis across different resolutions
- Real-time Metrics: Processing time and quality measurements
Technical Details
- Uses Hugging Face datasets for tile sources
- Supports LAB and RGB color space matching
- Configurable grid sizes from 8×8 to 128×128
- Adjustable tile sizes and output resolutions
Assignment Requirements Met
✅ Image selection and preprocessing
✅ Grid division and thresholding
✅ Vectorized NumPy operations
✅ Tile mapping and replacement
✅ Gradio interface with parameter controls
✅ Similarity metrics (MSE, SSIM)
✅ Performance analysis and benchmarking