How it works
kukkiri doesn't remove a mosaic. It finds it, then generates the detail a video model predicts was underneath.
The pipeline
- Detect. An RF-DETR segmentation model marks mosaic regions in every frame.
- Track. Overlapping detections are merged into regions and followed through the scene; short misses are bridged by interpolation.
- 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.
- 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.
| Mosaic | What survives | Result |
|---|---|---|
| Fine | Outlines and shading | Often convincing |
| Medium | Shape and color | Plausible, softer |
| Coarse | A few colors | Generated 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
- Pixelated faces (identity mosaics) are recognised and left as they are. kukkiri never restores them.
- Content another tool has already "decensored" into smooth shapes can't be recovered; the input check declines such files.
Credits
- Lada, for showing what open mosaic restoration can do
- BasicVSR++ (Chan et al., CVPR 2022), via OpenMMLab's MMagic
- Roboflow's RF-DETR