andrew33333 commited on
Commit
454ccb9
·
verified ·
1 Parent(s): 71d28cb

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +45 -0
  2. config.json +19 -0
  3. model.onnx +3 -0
  4. model.pt +3 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - document-layout
5
+ - object-detection
6
+ - yolo
7
+ library_name: ultralytics
8
+ ---
9
+
10
+ # DocLayout-YOLO - Docstructbench
11
+
12
+ Document layout detection model. Paper: [DocLayout-YOLO](https://arxiv.org/abs/2410.12628)
13
+
14
+ ## Classes (10)
15
+
16
+ - `title`
17
+ - `plain_text`
18
+ - `abandon`
19
+ - `figure`
20
+ - `figure_caption`
21
+ - `table`
22
+ - `table_caption`
23
+ - `table_footnote`
24
+ - `isolate_formula`
25
+ - `formula_caption`
26
+
27
+ ## Usage
28
+
29
+ ```python
30
+ pip install anyformat-doclayout
31
+ ```
32
+
33
+ ```python
34
+ from anyformat.doclayout import DocLayoutModel, download_converted
35
+
36
+ # Download weights from this repo
37
+ weights = download_converted("docstructbench")
38
+
39
+ # Run inference
40
+ model = DocLayoutModel(weights)
41
+ results = model.predict("document.png")
42
+
43
+ for det in results:
44
+ print(f"{det['class_name']}: {det['confidence']:.2f}")
45
+ ```
config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "doclayout-yolo",
3
+ "model_name": "docstructbench",
4
+ "architecture": "yolov10m-g2l-crm",
5
+ "num_classes": 10,
6
+ "class_names": [
7
+ "title",
8
+ "plain_text",
9
+ "abandon",
10
+ "figure",
11
+ "figure_caption",
12
+ "table",
13
+ "table_caption",
14
+ "table_footnote",
15
+ "isolate_formula",
16
+ "formula_caption"
17
+ ],
18
+ "input_size": 1024
19
+ }
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5817d783e3f7b5854a06b5d4b96f649257315f985892331705d5f596113b236
3
+ size 75725584
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:603d42c9ab6822b1aacde18a2615a6a3d415ec8eb269d2ac3bc6504d7472e69c
3
+ size 81028589