Automated pipeline for generating synthetic clear-sky images from real sky images with clouds using the Chauvin et al. (2015) photometric model.
# Install dependencies
pip install -r requirements.txt
# Run on an image
python src/synthetic_clearsky_optimizer.py \
--image path/to/image.png \
--mask path/to/mask.png \
--output output_directoryInput requirements:
- Image: RGB fisheye image (PNG, JPG, WEBP)
- Semantic mask: PNG with labeled regions:
- RGB(66, 245, 84): Background
- RGB(66, 135, 245): Clear sky
- RGB(245, 66, 66): Cloud
- RGB(245, 212, 66): Sun
Output files:
best_synthetic_clearsky.png- Final synthetic clear-skybest_comparison.png- Side-by-side comparisonoptimization_results.json- Parameters and metrics
4-stage hybrid optimizer:
- Grid search - Tests multiple sun sizes and band configurations
- Continuous refinement - Optimizes 21 clear-sky parameters (7 per RGB channel)
- Sun enhancement - Adds realistic sun disk + bloom PSF
- Sun parameter grid - Exhaustive search across 252 configurations
See TECHNICAL_DOCS.md for detailed algorithm description and mathematical models.
See LICENSE file.
Version: Production
Last Updated: 2025-10-18
Status: ✅ Production Ready




