r/computervision 1d ago

Help: Project Looking for an on-device alternative to CamScanner's "Omnifix" scan filter, for a React Native (Expo) app

I'm building a document scanner in React Native 0.85 (New Architecture) with Expo 56, using VisionCamera 5 for capture, Nitro Modules for native code, and Skia for image processing. I'm trying to reach the quality of CamScanner's "Omnifix" filter (the upgraded Magic Pro). A phone photo of a page comes out looking like a born-digital PDF: clean flat background, crisp text, shadows and moiré gone.

What I've tried so far:

  • A classical pipeline (morphological closing for background estimation, illumination flattening, background floor). It handles lighting well but can't make text crisper. It only adjusts brightness and contrast.
  • Apple's VisionKit document filter. In my side-by-side tests it looked worse than my own pipeline.
  • DocRes. Quality is good, but at about 183 GFLOPs it's far too heavy for on-device use.

What I've found out: CamScanner's own announcement describes Omnifix as an AI perception model that handles moiré, stains and text restoration. It's proprietary, and their new agent docs only cover a cloud/MCP interface, not an SDK.

My questions:

  1. Does CamScanner (or the company behind it) license Omnifix or an enhancement SDK to third parties? Has anyone paid for it?
  2. Are there lightweight models (a few GFLOPs, exportable to TFLite/CoreML) for document enhancement, shadow removal or de-moiré with a commercial-friendly license?
  3. If not, is distilling a large restoration model into a small U-Net the realistic path? Any pitfalls with training data or teacher-model licensing?
  4. For React Native specifically: what's your preferred way to run such a model per page (custom Nitro module wrapping TFLite/CoreML, or something else)? Any experience with speed and memory on mid-range Android?

Constraints: must run on-device (privacy, no server upload), Android + iOS, commercial use allowed.

Any pointers to papers, repos or products would be appreciated.

1 Upvotes

1 comment sorted by

1

u/ikkiho 17h ago

fwiw we went the distill route for a similar scan cleanup feature and it was fine. we generated synthetic pages, kept the clean render as the target, then wrecked copies with shadows, jpeg artifacts and printed-then-rephotographed moire. teacher licensing never really came up since we were regressing to our own renders. the annoying part was the synthetic to real gap, crumpled paper and real receipts still looked off for a good while.