Skip to content

Commit 82e919f

Browse files
authored
Add tablebank models (#19)
* Add tablebank model to catalog * Add tablebank model tests * Update model zoo with tablebank models
1 parent 96d6116 commit 82e919f

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

docs/notes/modelzoo.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ model.detect(image)
2626
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | [mask_rcnn_X_101_32x8d_FPN_3x](https://www.dropbox.com/s/nau5ut6zgthunil/config.yaml?dl=1) | lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config | 88.98 [eval.csv](https://www.dropbox.com/s/15ytg3fzmc6l59x/eval.csv?dl=0) |
2727
| [PrimaLayout](https://www.primaresearch.org/dataset/) | [mask_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/yc92x97k50abynt/config.yaml?dl=1) | lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config | 69.35 [eval.csv](https://www.dropbox.com/s/9uuql57uedvb9mo/eval.csv?dl=0) |
2828
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/wnido8pk4oubyzr/config.yml?dl=1) | lp://NewspaperNavigator/faster_rcnn_R_50_FPN_3x/config | |
29+
| [TableBank](https://doc-analysis.github.io) | [faster_rcnn_R_50_FPN_3x](https://www.dropbox.com/s/7cqle02do7ah7k4/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_50_FPN_3x/config | 89.78 [eval.csv](https://www.dropbox.com/s/1uwnz58hxf96iw2/eval.csv?dl=0) |
30+
| [TableBank](https://doc-analysis.github.io) | [faster_rcnn_R_101_FPN_3x](https://www.dropbox.com/s/h63n6nv51kfl923/config.yaml?dl=1) | lp://TableBank/faster_rcnn_R_101_FPN_3x/config | 91.26 [eval.csv](https://www.dropbox.com/s/e1kq8thkj2id1li/eval.csv?dl=0) |
2931

3032
* For PubLayNet models, we suggest using `mask_rcnn_X_101_32x8d_FPN_3x` model as it's trained on the whole training set, while others are only trained on the validation set (the size is only around 1/50). You could expect a 15% AP improvement using the `mask_rcnn_X_101_32x8d_FPN_3x` model.
3133

@@ -36,4 +38,5 @@ model.detect(image)
3638
| [HJDataset](https://dell-research-harvard.github.io/HJDataset/) | `{1:"Page Frame", 2:"Row", 3:"Title Region", 4:"Text Region", 5:"Title", 6:"Subtitle", 7:"Other"}` |
3739
| [PubLayNet](https://github.com/ibm-aur-nlp/PubLayNet) | `{0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}` |
3840
| [PrimaLayout](https://www.primaresearch.org/dataset/) | `{1:"TextRegion", 2:"ImageRegion", 3:"TableRegion", 4:"MathsRegion", 5:"SeparatorRegion", 6:"OtherRegion"}` |
39-
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | `{0: "Photograph", 1: "Illustration", 2: "Map", 3: "Comics/Cartoon", 4: "Editorial Cartoon", 5: "Headline", 6: "Advertisement"}` |
41+
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | `{0: "Photograph", 1: "Illustration", 2: "Map", 3: "Comics/Cartoon", 4: "Editorial Cartoon", 5: "Headline", 6: "Advertisement"}` |
42+
| [TableBank](https://doc-analysis.github.io) | `{0: "Table"}` |

src/layoutparser/models/catalog.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
},
1919
"NewspaperNavigator": {
2020
'faster_rcnn_R_50_FPN_3x': 'https://www.dropbox.com/s/6ewh6g8rqt2ev3a/model_final.pth?dl=1',
21-
}
21+
},
22+
"TableBank": {
23+
'faster_rcnn_R_50_FPN_3x': 'https://www.dropbox.com/s/8v4uqmz1at9v72a/model_final.pth?dl=1',
24+
'faster_rcnn_R_101_FPN_3x': 'https://www.dropbox.com/s/6vzfk8lk9xvyitg/model_final.pth?dl=1',
25+
},
2226
}
2327

2428
CONFIG_CATALOG = {
@@ -37,7 +41,11 @@
3741
},
3842
"NewspaperNavigator": {
3943
'faster_rcnn_R_50_FPN_3x': 'https://www.dropbox.com/s/wnido8pk4oubyzr/config.yml?dl=1',
40-
}
44+
},
45+
"TableBank": {
46+
'faster_rcnn_R_50_FPN_3x': 'https://www.dropbox.com/s/7cqle02do7ah7k4/config.yaml?dl=1',
47+
'faster_rcnn_R_101_FPN_3x': 'https://www.dropbox.com/s/h63n6nv51kfl923/config.yaml?dl=1',
48+
},
4149
}
4250

4351

tests/test_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"lp://PubLayNet/mask_rcnn_R_50_FPN_3x/config",
1111
"lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config",
1212
"lp://NewspaperNavigator/faster_rcnn_R_50_FPN_3x/config",
13+
"lp://TableBank/faster_rcnn_R_50_FPN_3x/config",
14+
"lp://TableBank/faster_rcnn_R_101_FPN_3x/config",
1315
]
1416

1517

0 commit comments

Comments
 (0)