Main
Use it as an evaluation harness: craft a payload image, then test how different downscalers reveal (or hide) the prompt injection after resizing.
Compare implementations: README highlights OpenCV, PyTorch, TensorFlow, and Pillow for scaling behavior differences.
Treat results as probabilistic: README warns outcomes vary and recommends running each example ~5 times for consistent evaluation.
Source-backed notes
- README positions Anamorpher as a tool for crafting/visualizing image scaling attacks and provides both a frontend UI and Python API.
- README lists supported downscaling algorithms (bicubic, bilinear, nearest neighbor) and comparison backends (OpenCV/PyTorch/TensorFlow/Pillow).
- README setup uses
uv sync, runs the backend viauv run python backend/app.py, and opensfrontend/index.htmlin a browser.
FAQ
- Is this for text-only LLMs?: No — README explicitly targets multi-modal AI systems where image downscaling can hide/reveal instructions.
- Do results always reproduce?: Not always — README warns outcomes can vary and suggests running examples multiple times.
- What’s a safe rollout?: Run it in a controlled eval environment and document the exact preprocessing pipeline (resize settings, libraries) you deploy.