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
Memory leak while using table detection
#6
by Vishfeb27 - opened
Hi Team,
I have a pdf of 20 pages and I am using pdf2image library to convert to images and passing each image for detection using threads and I could see the memory gets piles up and is not getting deallocated unless the entire application is exited... I tried debugging the code just when using table detection or table structure det the memory gets piledup.. in my flask application i am loading the model once and reusing in my function for infering each pages of pdf and also tried gc.collect() and del the variables but no luck... Is there any work around that could help in release the memory?