anatomy-check
Hash-bound semantic landmark tracker for unrigged flying and grounded complete drawings.
Opt-in anatomical landmark measurement guard for complete, unrigged 2D drawings that tracks painted face, torso, harness, wing-tip, and boot regions without masking, cropping, or modifying any source pixel.
git clone https://github.com/BestRoiMedia/anim-toolkit.gitWhy we built it
On complete hand-drawn characters—especially flying creatures with flapping wings or grounded characters carrying tall props—generic bounding-box tracking mistakes a raised wing tip for the head or a trailing prop for the feet. We built anatomy.py and grounded_anatomy.py to measure true anatomical landmarks while strictly forbidding partial or altered source art.
Architecture & how it works
In flying mode (anatomy.py), an authored JSON spec binds every frame by SHA-256 source and reference hashes, defining painted ROI color palettes for face and harness plus root/tip neighborhoods for both physical wing feathers. In grounded mode (grounded_anatomy.py), it tracks painted head, torso, and left/right boot soles while verifying pixel-level completeness against the reference. Missing anatomy, duplicated heads, shifted figures, or novel alpha above 6% trigger hard errors, and all source pixels remain intact for onion.py and studio assembly.
Key capabilities
- Dual modes: flying (face, harness, near/far wing tips) and grounded (head, torso, left/right boot soles)
- Cryptographic SHA-256 binding of every source drawing, reference PNG, and spec file
- Completeness guards rejecting missing/novel alpha > 6%, marker IoU < 65%, or altered source pixels
- Neighborhood-constrained wing-tip extremum tracking that avoids jumping to adjacent feathers
- Direct integration with onion.py frames --anatomy and anim-studio assembly jobs
Usage example
python3 anim/onion.py frames ./frames --anatomy ./anatomy_spec.json --out ./out/flying
python3 -m unittest discover -s anim -p "test_*anatomy.py" -v