How zuyhung05/mobile_2026.1 works
InstructIR Android is an image-restoration engine library, with a demo app and Python tools for preparing its model assets and checking outputs. The main workflow is a consumer supplying a bitmap and restoration task; the engine loads the packaged model and task embedding, processes overlapping image patches through LiteRT, and returns a bitmap with backend and fallback information. The README identifies YOLO and a complete application as future work, not current capabilities. Some tool and demo relationships are based on README statements; unsampled implementation details are not inferred.
Main entry points: RestorationEngine.java Restoration API · restoration TFLite model · compare_embeddings.py Embedding comparison · embeddings Task embeddings
Components 13
Android restoration
- Demo app
android/demo/app/src/main/java/vn/tv1/demo/MainActivity.java - Restoration API
android/restoration-engine/src/main/java/vn/tv1/restoration/RestorationEngine.java - Patch blending
android/restoration-engine/src/main/java/vn/tv1/restoration/PatchProcessor.java
Model assets
- TFLite model
models/restoration - Task embeddings
models/restoration/embeddings
Preparation and evaluation
- Model export
tools/restoration/export.py - Reference generation
tools/restoration/baseline.py - Output comparison
tools/restoration/compare.py - Tiled comparison
tools/restoration/compare_tiled.py - Embedding comparison
tools/restoration/compare_embeddings.py
Other components
- App consumer
- LiteRT runtime
- InstructIR source
Connections 17
- App consumer → Restoration API: submits image
README.md - Demo app → Restoration API: uses library
README.md - Restoration API → Patch blending: processes patches
android/restoration-engine/src/main/java/vn/tv1/restoration/RestorationEngine.java - Restoration API → TFLite model: maps model
android/restoration-engine/src/main/java/vn/tv1/restoration/RestorationEngine.java - Restoration API → Task embeddings: reads task vector
android/restoration-engine/src/main/java/vn/tv1/restoration/RestorationEngine.java - Restoration API → LiteRT runtime: runs inference
android/restoration-engine/src/main/java/vn/tv1/restoration/RestorationEngine.java - Model export → InstructIR source: exports model
tools/restoration/export.py - Model export → TFLite model: writes artifact
README.md - Reference generation → InstructIR source: generates references
tools/restoration/baseline.py - Reference generation → Task embeddings: writes vectors
tools/restoration/baseline.py - Output comparison → TFLite model: loads model
tools/restoration/compare.py - Output comparison → LiteRT runtime: runs inference
tools/restoration/compare.py - Tiled comparison → TFLite model: loads model
tools/restoration/compare_tiled.py - Tiled comparison → LiteRT runtime: runs inference
tools/restoration/compare_tiled.py - Embedding comparison → TFLite model: loads model
tools/restoration/compare_embeddings.py - Embedding comparison → Task embeddings: reads vectors
tools/restoration/compare_embeddings.py - Embedding comparison → InstructIR source: compares outputs
tools/restoration/compare_embeddings.py