Skip to content

OpenFilmKit 0.3.0

Choose a tag to compare

@aidansiegel aidansiegel released this 09 Nov 00:45
· 63 commits to main since this release
3a9fa6e

Scratch removal, and much better face detection in clean.

clean --scratches

A second, opt-in pass for what dust removal leaves: scratches, fibers and debris. Microsoft's scratch-detection model from "Bringing Old Photos Back to Life" finds them and MI-GAN, an inpainting model, fills them in. Faces get a lower threshold and extra speck finders; catchlights, the camera's date stamp and the scan edge are protected; thick dark marks are left as scene. Only the damaged spots are filled; because a model draws what goes into them, the pass is off by default, and the copy's recipe notes it, with the models' checksums. --spare-long-lines leaves long straight lines (tile grout, wires) the model can mistake for scratches.

The two models (about 100 MB, both MIT-licensed) download once on first use from the models-1 release and are checked by SHA-256; openfilmkit models --fetch gets them ahead of time. Both run in OpenCV, so nothing else is installed. A 33-megapixel scan takes about two minutes and 2.5 GB of memory.

Faces

clean now finds faces with YuNet, a small detector built into OpenCV, in all four orientations, so sideways frames are covered. On 154 real photos it found 97% of faces, against about a third for the Haar detector it replaces, with far fewer false detections. Dust removal now protects only eyes and mouths, so dust on cheeks and foreheads is cleaned too. Recipes name the detector used.

Install or upgrade

brew upgrade aidansiegel/openfilmkit/openfilmkit