4 models in production · designed and trained by Staksoft

Staksoft AI Models: built in-house, running on your device

These are the AI models Staksoft designs, trains and ships inside its own apps. They run on the phone itself — offline, with nothing uploaded. Our first family, Document AI, finds pages, flattens curved book pages, removes shadows and erases the thumb holding the book in Scan2PDF.

100% on-device Works offline 12–25 ms page detection Pages never uploaded
Staksoft AI models at a glance
ModelShips inWhat it doesKey number
Page Boundary DetectionScan2PDFWorks on pages held in the hand, on patterned or dark desks, and on pages only partly in view.Speed: 12–25 ms per frame (GPU)
Book Page FlatteningScan2PDFStraightens text that bends towards the spine of thick books.Speed: 0.35–0.9 s per page
Auto Color (Shadow & Lighting Removal)Scan2PDFRemoves hand and phone shadows and uneven room light.Model size: ≈ 3.2 MB
Finger RemovalScan2PDFBest on the margin, where a thumb holding a book usually sits.Found: 26 of 28 real test pages

Model family · 4 models

Document AI

Four computer-vision models that turn a phone photo of a page into a clean scan: they find the page in the camera, flatten curved book pages, remove shadows and erase the thumb holding the book. About 14 MB together, all running on the phone.

Ships in Scan2PDF · Android 8.0+

Document AI · model 1 of 4

Page Boundary Detection

How does Scan2PDF find the page automatically?

Scan2PDF runs a page-detection model on every camera frame. It finds the four corners of the page in 12–25 ms on a 2018 mid-range phone, so the outline follows the page live and the photo is taken the moment you hold still. It then checks the corners again on the full-resolution photo.

  • Works on pages held in the hand, on patterned or dark desks, and on pages only partly in view.
  • Checks the corners a second time on the captured photo, so a fraction-of-a-second hand movement does not cost you the crop.
  • If a shot looks wrong — the page runs out of the frame or nothing is found — the app opens the crop screen and says what to fix.
Speed
12–25 ms per frame (GPU)
Model size
≈ 3 MB
Runs
Live, on every camera frame
Before: Notebook on a dark desk with the page outline the model detected drawn over itDetected
After: the page found and cropped by Scan2PDFScan
The outline the model found on a notebook lying on a desk, and the page it cut out.

Document AI · model 2 of 4

Book Page Flattening

How do I flatten a curved book page when scanning?

Scan the page in Book mode. Scan2PDF’s page-flattening model predicts how the paper is bent near the spine and remaps the page so the lines of text come out straight. A second model decides whether the page is curved at all, so flat pages are left untouched. It takes under a second per page.

  • Straightens text that bends towards the spine of thick books.
  • A separate check leaves already-flat pages, covers and single sheets alone.
  • Runs automatically in Book mode; a Flatten switch turns it off for any page.
Speed
0.35–0.9 s per page
Model size
≈ 3.4 MB (+ flat/curved check)
Runs
After the crop, in Book mode
After: Open book page whose lines of text bend where the paper curves towards the spineBefore: Open book page whose lines of text bend where the paper curves towards the spine
⇆
BeforeAfter
A page held open: the lines that bend towards the spine come out straight.

Document AI · model 3 of 4

Auto Color (Shadow & Lighting Removal)

How do I remove shadows from a photo of a document?

Use the Auto Color filter. Scan2PDF’s lighting model estimates how light fell across the page — including the shadow of your hand or phone — and divides it out, so the paper comes out white while ink, crayon and printed colours keep their true colour. It runs entirely on the phone.

  • Removes hand and phone shadows and uneven room light.
  • Keeps coloured ink, highlighter and crayon instead of washing them out.
  • Also available: Light Text, Grayscale, Whiteboard, Original and a Custom brightness/contrast control.
Model size
≈ 3.2 MB
Output
White paper, true colours
Runs
On the phone, per page
After: Handwritten page with hard diagonal shadows falling across itBefore: Handwritten page with hard diagonal shadows falling across it
⇆
BeforeAfter
Hard shadows across a handwritten page → white paper, every stroke kept.

Document AI · model 4 of 4

Finger Removal

How do I remove my finger from a scanned book page?

Scan2PDF removes it for you. A finger-detection model marks the thumb or finger holding the book open, and the app fills that area with the paper around it. On real phone photos held back from training, it found the finger on 26 of 28 pages and flagged only 2 of 104 pages that had none.

  • Best on the margin, where a thumb holding a book usually sits.
  • Over printed text the area becomes clean paper: words hidden under a finger cannot be recovered by any app.
  • Pages without a finger are left exactly as they were.
Found
26 of 28 real test pages
False alarms
2 of 104 pages without a finger
Model size
≈ 1 MB
After: Colouring page of grapes with a thumb holding the left edge of the pageBefore: Colouring page of grapes with a thumb holding the left edge of the page
⇆
BeforeAfter
The thumb holding the book open, removed.
After: Coloured jacket page with a finger on the left marginBefore: Coloured jacket page with a finger on the left margin
⇆
BeforeAfter
A finger on the margin, painted out with the paper around it.

How we build and test our models

Synthetic data to learn from, real phone photos to decide what ships.

01

Our own data engine

We built renderers that simulate phone photos of pages — paper, print, curls, folds, shadows, glare and blur — with the right answer known for every pixel.

02

Small models for real phones

Each model is 1–3.4 MB and designed to run on everyday Android phones, not only flagships. All four together take about 14 MB.

03

Judged on real photos only

A model ships only if it beats the one before it on real phone photos held back from training. For finger removal, four candidates in a row did not.

04

Encrypted in the app

The models ship encrypted inside Scan2PDF and open only in the genuine, signed app.

Why we build on-device AI

On-device AI means the model runs on your phone’s own processor, so your pages never have to leave it.

QuestionStaksoft models (on-device)Cloud AI services
Where your pages are processedOn your phoneOn a remote server
Works without internetYes — scanning and clean-upNo
Upload wait per pageNoneDepends on your connection
Mobile data usedNone for scanningEvery page uploaded
Page detection speed12–25 ms per frameVaries

Frequently asked questions

What AI models has Staksoft built?

Staksoft designs and trains its own on-device AI models. The first family is Document AI — four computer-vision models inside the Scan2PDF Android app: page boundary detection, book page flattening, Auto Color lighting removal and finger removal. More models are added to this page as they ship.

What does on-device AI mean?

On-device AI means the model runs on your phone’s own processor instead of a remote server. Your data is not uploaded to be processed, it works without internet, and there is no upload wait.

How do I remove my finger from a scanned document?

Scan the page with Scan2PDF. Its finger-removal model finds the thumb or finger holding the page and fills the area with the surrounding paper automatically. It works best on the margin; over printed text the area becomes blank paper, because words hidden under a finger cannot be recovered.

How do I flatten a curved book page?

Choose Book mode in the Scan2PDF camera and scan the page. The page-flattening model straightens lines that curve towards the spine, in under a second per page, and leaves pages that are already flat untouched.

How do I remove shadows from a document photo?

Apply the Auto Color filter in Scan2PDF. It estimates the light and shadow across the page and removes them, leaving white paper while keeping coloured ink, highlighter and crayon.

Does Scan2PDF upload my pages to process them?

No. Page detection, flattening, Auto Color and finger removal all run on your phone, and scanning works offline. The only tool that uses the internet is Edit Text, which opens Staksoft’s online PDF editor.

How accurate is the finger removal?

On real phone photos that were never used for training, it found the finger on 26 of 28 pages and flagged 2 of 104 pages that had no finger.

Which phones does it run on?

Scan2PDF runs on Android 8.0 and newer. The speeds on this page were measured on a Xiaomi Poco F1, a 2018 mid-range phone; newer phones are faster.

Is it free?

Scan2PDF is free to download from Google Play, and the document AI runs inside it at no extra cost.

Live in Production · Android 8.0+

Experience the models live on your phone

All 4 Document AI models ship inside Scan2PDF. Scan a thick book, test hard shadows, or place your thumb on the margin to watch the on-device AI straighten, brighten, and clean your pages in real time with zero cloud uploads.

100% On-Device Full Offline Function 12–25ms Real-Time Private & Encrypted

Want custom computer vision or on-device AI models trained for your app? Talk to our AI Engineering team →

Scan QR code to install Scan2PDF on Android

Scan to Download

Point your phone camera to open Scan2PDF directly on Google Play

Hardware & Evaluation Standards · Last updated 2026-09-26

Latency and frame-rate figures measured on a Xiaomi Poco F1 (2018, Snapdragon 845). Finger-removal accuracy validated on real, uncompressed phone camera captures held out from training sets.

The Document AI page-detection architecture is engineered upon MobileNetV2 (Apache 2.0) and trained in part with the SmartDoc 2015 and Mendeley “Document Corner Localization” datasets (CC BY 4.0). Full open-source attributions and licenses are bundled in the Scan2PDF application under Settings → Open Source Licenses.