How spipm/depixelization_poc works
Depix is a command-line proof of concept for recovering pixelated text regions by matching their colored blocks against a reference search image, then writing a reconstructed image. Its main workflow loads both images, detects and filters blocks, searches for matches, resolves ambiguous matches geometrically, and saves the result. The repository also includes a pixelation generator and a box-visualization tool. The README only notes that the project migrated; workflow details here come from the sampled source, and unsampled implementation details are not inferred.
Main entry points: depix.py Recovery CLI · tool_show_boxes.py Box visualization · LoadedImage.py Image loader · tool_gen_pixelated.py Pixelation generator
Components 16
Command-line tools
- Recovery CLI
depix.py - Box visualization
tool_show_boxes.py - Pixelation generator
tool_gen_pixelated.py
Image handling
- Image loader
depixlib/LoadedImage.py - Block averaging
tool_gen_pixelated.py - Box renderer
tool_show_boxes.py
Recovery pipeline
- Block detection
depixlib/functions.py - Block filtering
depixlib/functions.py - Reference matching
depixlib/functions.py - Match resolution
depixlib/functions.py - Image reconstruction
depixlib/functions.py
Image data model
- Rectangle models
depixlib/Rectangle.py - Input validation
depixlib/helpers.py
Other components
- User
- Image files
- Output image
Connections 23
- User → Recovery CLI: runs
depix.py - User → Box visualization: runs
tool_show_boxes.py - User → Pixelation generator: runs
tool_gen_pixelated.py - Recovery CLI → Input validation: validates inputs
depix.py - Box visualization → Input validation: validates inputs
tool_show_boxes.py - Recovery CLI → Image loader: loads images
depix.py - Box visualization → Image loader: loads images
tool_show_boxes.py - Pixelation generator → Image loader: loads image
tool_gen_pixelated.py - Image files → Image loader: read by
- Recovery CLI → Block detection: detects blocks
depix.py - Recovery CLI → Block filtering: filters blocks
depix.py - Recovery CLI → Reference matching: searches matches
depix.py - Recovery CLI → Match resolution: resolves matches
depix.py - Recovery CLI → Image reconstruction: writes matches
depix.py - Box visualization → Block detection: detects blocks
tool_show_boxes.py - Box visualization → Block filtering: filters blocks
tool_show_boxes.py - Box visualization → Box renderer: draws boxes
tool_show_boxes.py - Pixelation generator → Block averaging: averages blocks
tool_gen_pixelated.py - Pixelation generator → Output image: saves image
tool_gen_pixelated.py - Image reconstruction → Output image: writes pixels
- Block detection → Rectangle models: uses rectangles
depixlib/functions.py - Reference matching → Rectangle models: uses matches
depixlib/functions.py - Image loader → Image files: opens image
depixlib/LoadedImage.py