kukkiri

How it works

kukkiri doesn't remove a mosaic. It finds it, then generates the detail a video model predicts was underneath.

The pipeline

  1. Detect. An RF-DETR segmentation model marks mosaic regions in every frame.
  2. Track. Overlapping detections are merged into regions and followed through the scene; short misses are bridged by interpolation.
  3. Restore. Each region is cut out as a square window with a little context and restored by BasicVSR++ in clips of 96 frames. Neighbouring clips overlap and are crossfaded, so there are no seams.
  4. Blend. The restored region is feathered back into the frame and the video is encoded on the GPU with the source audio.

Why coarse mosaics can't be fully recovered

A mosaic replaces each block of pixels with one average color. A 16×16 block turns 256 pixels into one; every arrangement with the same average looks identical afterwards. That detail is not in the file, so no tool can recover it exactly.

MosaicWhat survivesResult
FineOutlines and shadingOften convincing
MediumShape and colorPlausible, softer
CoarseA few colorsGenerated detail; can look wrong

Video helps: as things move, the block grid falls on different pixels each frame, and a multi-frame model can combine them. It improves fine and medium mosaics; it can't rescue a coarse one.

Limitations

Credits