Repository navigation
curvecodec v0.1.0
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:
- Its first-frame value and scale, which normalise the curve so that curves from different joints and rigs look alike;
- A Fourier descriptor: the 4 lowest frequency bins of the curve, which give the low-frequency trend;
- 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.