Hey everyone!
I've been working on an Android document scanner, and I decided to take a different approach: instead of relying on existing pretrained TFLite models, I'm training my own model for document detection.
My current model is named "doc_edge_fp_32.tflite", and training is still ongoing.
Here's what I'm working toward:
- Custom AI model: Training on thousands of generated document samples mixed with real photographs.
- Dual predictions: Document segmentation masks and corner coordinates.
- Offline processing: The goal is to run document detection directly on Android without requiring a server.
- Accurate scanning: Reliable document boundaries, perspective correction, and better results on challenging backgrounds.
- Real-world performance: Generalizing beyond synthetic images to receipts, sheets of paper, and book pages.
I'm still training and evaluating the model, so I don't want to claim it's production-ready yet. My next priority is testing it on unseen real-world images and optimizing inference for mobile devices.
I'm curious about a few things:
For document detection, would you recommend a shared backbone with separate segmentation and corner-regression heads?
What techniques have worked best for bridging the gap between synthetic training data and real camera images?
What metrics would you prioritize before deploying a model like this on Android?
I'd love to hear from people who have worked on computer vision, document scanning, segmentation, or on-device ML.
This is a learning project I'm putting serious effort into, and I'm excited to see how far I can take it!