dempeg2-atla / README.md
seproDev's picture
dempeg2 weights for Avatar: The Last Airbender (NTSC DVDs)
91c95eb verified
|
Raw History Blame
2.01 kB
metadata
license: mit
library_name: dempeg2
pipeline_tag: image-to-image
tags:
  - video-restoration
  - mpeg2
  - dvd
  - compression-artifact-removal

dempeg2 weights for Avatar: The Last Airbender

Weights for dempeg2, which removes MPEG-2 artefacts. Besides the decoded picture, it reads what the MPEG-2 stream says about how each frame was compressed: the quantiser of every macroblock, the macroblock types, and the frame type.

These weights are only for the NTSC DVDs of Avatar: The Last Airbender. They were trained to undo two encoders: the one used for most NA discs (probably a Sony hardware encoder), and Cinema Craft Encoder (used for the Book 1 Vol 1 reissue and Book 3 Vol 3-4). On anything else (other shows, other encoders, PAL, live action) they are untested and probably wrong.

Comparisons: slow.pics

What they do

The model only aims to remove MPEG-2 artefacts: ringing, mosquito noise, block edges, and colour blotches. Film grain that the encoder dropped in P and B frames is restored, so the grain no longer pulses with every GOP.

There is no sharpening and no invented detail. Problems that come from the master, such as halos and the chroma shift of the NA discs, are kept on purpose. The training taught the model to leave these alone, so they can be fixed separately.

Model

A NAFNet-style U-Net with 27M parameters. Each frame is processed on its own, together with 15 planes of side information and a noise input for grain.

Training started with an MSE loss on clean Blu-ray animation, encoded to look like the ATLA DVDs. A GAN fine-tune of 16k steps followed. During the fine-tune, a penalty stopped the model from adding a block pattern, without punishing random grain.

model.safetensors holds the weights in fp16. The model config is stored in the file's metadata.

More details, measurements, and limits: docs/model.md.