Can Classical Vision Detect Tables in Under 100 ms?¶
Completed
Motivation¶
Document table detection is often treated as a model-serving problem. For structured pages, lines and whitespace already contain strong geometric evidence. Fast Table Detect asks whether a small classical pipeline can meet a sub-100 ms target without model weights.
Problem¶
Tables vary in scale, line density, scan quality, rotation, and page resolution. A single morphology kernel or a line-only detector is not sufficient across that range.
Architecture¶
The library exposes three complementary detectors:
- a line method based on morphological structure;
- a gutter method based on whitespace;
- a hybrid method combining both signals.
An adaptive preparation stage handles deskewing, denoising, thresholding, and morphology. Multiple kernel sizes cover different document scales, while area-based filters remove implausible regions. Visualization utilities expose intermediate decisions for debugging.
Implementation¶
The implementation supports images from 100×100 pixels through 4K and above. Tests cover the image-processing pipeline and detector behavior, with more than 95% reported coverage.
Results¶
Typical processing time is below 100 ms per page, with more than 95% precision on structured documents. These figures describe the recorded target documents; they are not presented as a claim over arbitrary page layouts.
Lessons Learned¶
Classical vision remains useful when the expected structure is explicit and latency matters. Multiple simple signals can be easier to inspect and tune than one opaque detector, especially when visual debugging is part of the library.
Future Work¶
No second version is recorded. Expansion should begin with a named failure set rather than replacing the current pipeline preemptively with a heavier model.