dempeg2 weights for Avatar: The Last Airbender (NTSC DVDs)
Browse files- README.md +45 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: dempeg2
|
| 4 |
+
pipeline_tag: image-to-image
|
| 5 |
+
tags:
|
| 6 |
+
- video-restoration
|
| 7 |
+
- mpeg2
|
| 8 |
+
- dvd
|
| 9 |
+
- compression-artifact-removal
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# dempeg2 weights for Avatar: The Last Airbender
|
| 13 |
+
|
| 14 |
+
Weights for [dempeg2](https://github.com/seproDev/dempeg2), which removes MPEG-2 artefacts.
|
| 15 |
+
Besides the decoded picture, it reads what the MPEG-2 stream says about how each frame was compressed: the quantiser of
|
| 16 |
+
every macroblock, the macroblock types, and the frame type.
|
| 17 |
+
|
| 18 |
+
**These weights are only for the NTSC DVDs of Avatar: The Last Airbender.**
|
| 19 |
+
They were trained to undo two encoders: the one used for most NA discs (probably a Sony hardware encoder), and Cinema
|
| 20 |
+
Craft Encoder (used for the Book 1 Vol 1 reissue and Book 3 Vol 3-4).
|
| 21 |
+
On anything else (other shows, other encoders, PAL, live action) they are untested and probably wrong.
|
| 22 |
+
|
| 23 |
+
Comparisons: [slow.pics](https://slow.pics/c/aC8xE9pb)
|
| 24 |
+
|
| 25 |
+
## What they do
|
| 26 |
+
|
| 27 |
+
The model only aims to remove MPEG-2 artefacts: ringing, mosquito noise, block edges, and colour blotches.
|
| 28 |
+
Film grain that the encoder dropped in P and B frames is restored, so the grain no longer pulses with every GOP.
|
| 29 |
+
|
| 30 |
+
There is no sharpening and no invented detail.
|
| 31 |
+
Problems that come from the master, such as halos and the chroma shift of the NA discs, are kept on purpose.
|
| 32 |
+
The training taught the model to leave these alone, so they can be fixed separately.
|
| 33 |
+
|
| 34 |
+
## Model
|
| 35 |
+
|
| 36 |
+
A NAFNet-style U-Net with 27M parameters.
|
| 37 |
+
Each frame is processed on its own, together with 15 planes of side information and a noise input for grain.
|
| 38 |
+
|
| 39 |
+
Training started with an MSE loss on clean Blu-ray animation, encoded to look like the ATLA DVDs.
|
| 40 |
+
A GAN fine-tune of 16k steps followed.
|
| 41 |
+
During the fine-tune, a penalty stopped the model from adding a block pattern, without punishing random grain.
|
| 42 |
+
|
| 43 |
+
`model.safetensors` holds the weights in fp16. The model config is stored in the file's metadata.
|
| 44 |
+
|
| 45 |
+
More details, measurements, and limits: [docs/model.md](https://github.com/seproDev/dempeg2/blob/main/docs/model.md).
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:919fb1882c9d194f0df7192de3a7038de1cb49629aa8c00ca4f3d5dfc1aab8a8
|
| 3 |
+
size 54092972
|