Instructions to use microsoft/table-transformer-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/table-transformer-detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="microsoft/table-transformer-detection")# Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("microsoft/table-transformer-detection") model = AutoModelForObjectDetection.from_pretrained("microsoft/table-transformer-detection") - Notebooks
- Google Colab
- Kaggle
Preprocessing for better results
#7
by Prakash2403 - opened
Hi,
Can we do any preprocessing to obtain better detection results? In my case, I got full-page tables with alternating color rows (i.e. background for the first row is white, the second row is light yellow, the third is white again, and so on.
The table transformer detector is not able to detect these tables. It works beautifully on regular tables that are homogenous in terms of background and are not full-page.
I've tried padding the corners of my images, but that doesn't work.
Convert the image to grayscale, add some binary + otsu thresholding and if needs be use some dilations and it should be a lot better