Fast Table Detect¶
Completed
Overview¶
Fast Table Detect is a Python library I developed to detect tables in document images using classical computer vision, without relying on machine learning models.
The library combines morphological operations and whitespace analysis to identify table regions, including tables with visible borders and those without them.
Implementation¶
I implemented three detection methods:
- Line-based detection: Extracts horizontal and vertical lines using morphological operations to identify table boundaries.
- Gutter-based detection: Analyzes whitespace between text regions to identify potential tables without visible borders.
- Hybrid detection: Combines both approaches and filters overlapping detections.
The preprocessing pipeline uses OpenCV for grayscale conversion, denoising, thresholding, deskewing, and morphological operations.
I also implemented area-based filtering to remove unlikely table candidates and visualization tools to inspect detection results.
The library accepts images ranging from small documents to resolutions above 4K and provides a Python API for integration into document-processing workflows.
Results¶
On the structured documents used during development, the project reported:
- Typical processing time below 100 ms per page.
- Detection precision above 95%.
- More than 95% test coverage.
These results describe the project's original evaluation conditions and should not be interpreted as performance guarantees across arbitrary document layouts or hardware.