Interactive Garment Recoloring (DeepLabV3 + CIELAB Region Growing)
Hybrid digital image processing pipeline combining DeepLabV3-ResNet101 person segmentation, interactive seeded region growing, and lightness-preserving CIELAB/HSV color transfer in Streamlit.
Key Performance Metrics
Abstract
Recoloring clothing realistically in portrait photographs requires solving two separate problems: isolating the garment without leaking into skin, hair, or background, and changing fabric hue without flattening natural folds and shadows. Built as a learning-focused Digital Image Processing & Analysis (DIPA) project, shirt-recolor pairs a pretrained DeepLabV3-ResNet101 semantic person mask with classical OpenCV fixed-range flood fill (guided by user-clicked foreground seeds and background barriers) and perceptual CIELAB lightness-variation transfer.
Date
May 2026
Course
Digital Image Processing & Analysis
Client
Traditional Image Processing & Hybrid Segmentation
Methodology & Architecture
Five-stage hybrid pipeline pairing pretrained semantic segmentation with classical DIP refinement.
Tap to zoom
DeepLabV3-ResNet101 defines a hard person boundary, constraining median-filtered fixed-range flood fill before perceptual CIELAB ΔL or HSV color transfer.
Results & Visual Evaluation
Stage-by-stage mask isolation and CIELAB vs. HSV comparison on low-saturation fabrics.
Tap to zoom
On a white T-shirt (mean saturation 3.7/255), HSV hue shifting produces no visible change, whereas CIELAB ΔL transfer recolors cleanly to cobalt blue (#2563EB) and forest green (#15803D) while preserving shading (L-channel correlation 0.998).
Tap to zoom
End-to-end progression from input portrait to DeepLabV3 person mask, refined shirt mask, and dark-shirt recoloring (#FF0000) retaining original folds and lighting.
Findings
Key observations, empirical takeaways, and analytical conclusions.
- Early automatic GrabCut and connected-component heuristics frequently leaked into dark hair, shadows, and trousers; bounding fixed-range region growing inside the DeepLabV3 person mask with optional barrier clicks gave far cleaner edges.
- HSV hue shifting works cleanly on already-saturated colored garments but fails on white/gray/black shirts (saturation < 30/255), where CIELAB lightness-offset transfer is essential.
- Fixed-range flood fill assumes relatively uniform base fabric; heavily patterned garments or softer hair/collar transitions would require multi-seed input or alpha matting as a next step.