How bavuong2005/occlusion-aware-viton works
This is an occlusion-aware virtual try-on application. Its main workflow accepts a person and garment image, detects and segments occluders, prepares person parsing and pose inputs, parses the garment, runs StableVITON, then restores occluders with blending. The local Gradio app and optional Modal deployment expose that workflow; the README also documents garment-category support and a baseline mode. The tree and excerpts support the orchestration and several stage details, but not every stage implementation or all wiring, so uncertain links are omitted.
Main entry points: pipeline.py Pipeline runner · tryon_inference.py StableVITON inference · object_segmentation.py Object segmentation · person_parsing.py Person parsing
Components 16
User interfaces
- Local Gradio
app.py - Modal app
modal_app.py
Pipeline orchestration
- Pipeline runner
pipeline.py - GPU memory
utils/memory.py
Image preparation
- Object detection
stages/object_detection.py - Object segmentation
stages/object_segmentation.py - Person parsing
stages/person_parsing.py - DensePose
stages/densepose.py - Cloth parsing
stages/cloth_parsing.py - Mask utilities
postprocess/mask_utils.py
Try-on and compositing
- StableVITON inference
stages/tryon_inference.py - StableVITON baseline
- Occluder blending
postprocess/occluder.py - Try-on result
Other components
- Image user
- GPU runtime
Connections 20
- Image user → Local Gradio: uploads images
- Local Gradio → Pipeline runner: calls
- Image user → Modal app: uploads images
- Modal app → Pipeline runner: dispatches
- Pipeline runner → Object detection: runs
- Pipeline runner → Object segmentation: runs
- Object detection → Object segmentation: passes boxes
- Pipeline runner → Person parsing: runs
- Object segmentation → Person parsing: passes mask
- Pipeline runner → DensePose: runs
- Pipeline runner → Cloth parsing: runs
- Person parsing → Mask utilities: builds masks
- Pipeline runner → StableVITON inference: supplies prepared inputs
- Cloth parsing → StableVITON inference: provides garment mask
- StableVITON inference → StableVITON baseline: invokes inference
- Pipeline runner → Occluder blending: restores objects
- Occluder blending → Try-on result: blends image
- StableVITON inference → Try-on result: generates image
- Pipeline runner → GPU memory: manages VRAM
- GPU runtime → Pipeline runner: executes stages