Skip to content

Commit 8f536b5

Browse files
IgorTavcarclaude
andcommitted
Fix Detectron2LayoutModel import path in docs
Updates lp.Detectron2LayoutModel to lp.models.Detectron2LayoutModel in modelzoo.md and index.rst examples. From: Layout-Parser#202 (firesh), Layout-Parser#198 (drewm23) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c69c455 commit 8f536b5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/example/deep_layout_parsing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Use Layout Models to detect complex layout
2929
3030
.. code:: python
3131
32-
model = lp.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config',
32+
model = lp.models.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config',
3333
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
3434
label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
3535
# Load the deep layout model from the layoutparser API

docs/notes/modelzoo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We provide a spectrum of pre-trained models on different datasets.
66

77
```python
88
import layoutparser as lp
9-
model = lp.Detectron2LayoutModel(
9+
model = lp.models.Detectron2LayoutModel(
1010
config_path ='lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config', # In model catalog
1111
label_map ={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}, # In model`label_map`
1212
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8] # Optional
@@ -42,4 +42,4 @@ model.detect(image)
4242
| [PrimaLayout](https://www.primaresearch.org/dataset/) | `{1:"TextRegion", 2:"ImageRegion", 3:"TableRegion", 4:"MathsRegion", 5:"SeparatorRegion", 6:"OtherRegion"}` |
4343
| [NewspaperNavigator](https://news-navigator.labs.loc.gov/) | `{0: "Photograph", 1: "Illustration", 2: "Map", 3: "Comics/Cartoon", 4: "Editorial Cartoon", 5: "Headline", 6: "Advertisement"}` |
4444
| [TableBank](https://doc-analysis.github.io/tablebank-page/index.html) | `{0: "Table"}` |
45-
| [MFD](http://transcriptorium.eu/~htrcontest/MathsICDAR2021/) | `{1: "Equation"}` |
45+
| [MFD](http://transcriptorium.eu/~htrcontest/MathsICDAR2021/) | `{1: "Equation"}` |

0 commit comments

Comments
 (0)