Skip to content

Releases: AIGAnimation/AnimationCodec

curvecodec v0.2.0

Choose a tag to compare

@Shimingyi Shimingyi released this 17 Oct 23:48

This is CurveCodec v0.2.0, the latest version of CurveCodec. Like version 1, it works on the smallest skeleton-independent unit of motion, each joint's own curve, so one model serves any rig: humans, hands, animals, robots and game characters, with no per-rig training.

Version 2 changes where the learning goes. The network no longer reconstructs the curve. Instead, the codec keeps the motion exact to a chosen precision, and the network only predicts how cheap that motion is to send:

Encoder: closed-loop quantization and rate–distortion-selected keyframes, corrected by error feedback through forward kinematics. Every decoded clip is checked against an error contract tied to ACL's mean error at the same precision (0.01–1 cm). A clip that misses is re-encoded with tighter margins.
Entropy model: a small causal transformer codes what remains. It has 2 blocks of width 64, 4 heads, a 128-step window and a 3-logistic mixture head, 108 K parameters in all. It sees only integer features of the curve's own decoded past, never joint or skeleton identity. Its integer inference is bit-exact across platforms, and it changes only the bits, never the decoded motion.

curvecodec v0.1.0

Choose a tag to compare

@Shimingyi Shimingyi released this 17 Oct 23:46

This is the archived version 0.1.0 of CurveCodec, the method of our SIGGRAPH Asia 2026 paper Neural Codec for Skeletal Animation Compression. We always maintained the best version in the main branch but keep previous as a historical reference.

Version 0.1.0 treats each joint's rotation component as an independent curve, so one model works for any skeleton. Each curve is cut into windows of 240 frames, and every window is sent as:

  1. Its first-frame value and scale, which normalise the curve so that curves from different joints and rigs look alike;
  2. A Fourier descriptor: the 4 lowest frequency bins of the curve, which give the low-frequency trend;
  3. Sparse anchors at the curve's turning points (extrema), selected by a prominence threshold. That threshold is the codec's single rate–distortion knob.

A single masked timeline transformer reconstructs every window. Its input is one descriptor token followed by one token per frame. Frame 0 and the anchors are known-value tokens, and every other frame is a learned mask token. The decoder has 6 pre-norm blocks (width 256, 4 heads, bidirectional RoPE attention) with sine-activated feed-forward layers and a tanh output head: 4.74 M parameters, 19 MB. It fills in the masked frames from the descriptor and the surrounding anchors, and the transmitted values are then substituted back exactly. The encoder itself is deterministic and has no learned parameters.

The zip includes two decoders. v1_decoder.pt is trained with the paper's recipe. v1_decoder_prior.pt (the default) also gives each mask token the interpolation of its neighbouring anchors, and the encoder can add anchors in a closed loop. On the CurveCodec 2 test split, the default setting compresses at 2.7x ACL's ratio (53.6x raw). The package includes the command line (encode / decode / evaluate), the training code and tests.