TahaDouaji commited on
Commit
c9211cb
1 Parent(s): 4438765

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Model description
2
+ detr-doc-table-detection is a model trained to detect both Bordered and Borderless tables in documents based on [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50)
3
+
4
+ ## Training data
5
+ The model was trained on ICDAR2019 Table Dataset
6
+
7
+ ### How to use
8
+
9
+ ```python
10
+ from transformers import DetrFeatureExtractor, DetrForObjectDetection
11
+ from PIL import Image
12
+ import requests
13
+ image = Image.open("Image path")
14
+ feature_extractor = DetrFeatureExtractor.from_pretrained('TahaDouaji/detr-doc-table-detection')
15
+ model = DetrForObjectDetection.from_pretrained('TahaDouaji/detr-doc-table-detection')
16
+ inputs = feature_extractor(images=image, return_tensors="pt")
17
+ outputs = model(**inputs)
18
+ # model predicts bounding boxes and corresponding COCO classes
19
+ logits = outputs.logits
20
+ bboxes = outputs.pred_boxes
21
+ ```