TahaDouaji commited on
Commit
b794013
1 Parent(s): 00312f8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -15,13 +15,15 @@ The model was trained on ICDAR2019 Table Dataset
15
  ```python
16
  from transformers import DetrFeatureExtractor, DetrForObjectDetection
17
  from PIL import Image
18
- import requests
19
  image = Image.open("Image path")
 
20
  feature_extractor = DetrFeatureExtractor.from_pretrained('TahaDouaji/detr-doc-table-detection')
21
  model = DetrForObjectDetection.from_pretrained('TahaDouaji/detr-doc-table-detection')
 
22
  inputs = feature_extractor(images=image, return_tensors="pt")
23
  outputs = model(**inputs)
24
- # model predicts bounding boxes and corresponding COCO classes
25
  logits = outputs.logits
26
  bboxes = outputs.pred_boxes
27
  ```
 
15
  ```python
16
  from transformers import DetrFeatureExtractor, DetrForObjectDetection
17
  from PIL import Image
18
+
19
  image = Image.open("Image path")
20
+
21
  feature_extractor = DetrFeatureExtractor.from_pretrained('TahaDouaji/detr-doc-table-detection')
22
  model = DetrForObjectDetection.from_pretrained('TahaDouaji/detr-doc-table-detection')
23
+
24
  inputs = feature_extractor(images=image, return_tensors="pt")
25
  outputs = model(**inputs)
26
+
27
  logits = outputs.logits
28
  bboxes = outputs.pred_boxes
29
  ```