How fabianxox/sih26 works
This repository is an image-enhancement tool for producing e-commerce product images. The shown workflow starts at the app entry point, loads an image, removes its background, composites white, corrects lighting, crops around the product, formats a square output, and saves it. Separate capabilities include tiled ONNX upscaling and image-quality measurements. The quality modules and upscaler are not wired into the shown pipeline; the README is empty, so their integration and other unsampled behavior are not inferred.
Main entry points: pipeline.py Image pipeline · upscaler.py Tiled upscaler · app.py App entry · segment.py Background removal
Components 16
Application entry
- App entry
image_enhancer/app.py
Product image workflow
- Image pipeline
image_enhancer/pipeline.py - Background removal
image_enhancer/segmentation/segment.py - White compositing
image_enhancer/enhancement/background.py - Lighting correction
image_enhancer/enhancement/lighting.py - Product cropping
image_enhancer/enhancement/crop.py - Output formatting
image_enhancer/output/formatter.py
Quality analysis
- Blur scoring
image_enhancer/quality/blur.py - Brightness scoring
image_enhancer/quality/brightness.py - Resolution checks
image_enhancer/quality/resolution.py
AI upscaling
- Tiled upscaler
image_enhancer/upscaler.py - Upscaling model
image_enhancer/models/RealESRGAN_x4plus.onnx
Other components
- Image operator
- rembg library
- Enhanced image
- ONNX Runtime
Connections 11
- Image operator → App entry: starts
- App entry → Image pipeline: calls
image_enhancer/app.py - Image pipeline → Background removal: segments
image_enhancer/pipeline.py - Background removal → rembg library: calls
image_enhancer/segmentation/segment.py - Image pipeline → White compositing: composites
image_enhancer/pipeline.py - Image pipeline → Lighting correction: corrects lighting
image_enhancer/pipeline.py - Image pipeline → Product cropping: crops
image_enhancer/pipeline.py - Image pipeline → Output formatting: formats
image_enhancer/pipeline.py - Image pipeline → Enhanced image: saves
image_enhancer/pipeline.py - Tiled upscaler → ONNX Runtime: runs inference
image_enhancer/upscaler.py - Tiled upscaler → Upscaling model: loads configured model