A Unified Toolkit for Deep Learning Based Document Image Analysis
Full Changelog: https://github.com/Layout-Parser/layout-parser/compare/v0.3.3...v0.3.4
inplace
to True in sorting function by @yusanshi in https://github.com/Layout-Parser/layout-parser/pull/104
Full Changelog: https://github.com/Layout-Parser/layout-parser/compare/v0.3.2...v0.3.3
Important fixes for multibackend layout model support:
label_map
in Detectron2LayoutModel
#75We are excited to release LayoutParser v0.3.0, with a lot of exciting updates and functional improvements.
layoutparser
library, and makes it easier for implementing customized layout models in the future. #54 #67AutoModel
and improved model configuration parsing makes it easier load and use the layout detection models. #69
model = lp.AutoLayoutModel("lp://efficientdet/PubLayNet")
.layoutparser
and the needed dependencies (see instructions). #65 #68layoutparser
supports directly loading PDF files into as layout
objects: #71
import layoutparser as lp
pdf_layout, pdf_images = lp.load_pdf("path/to/pdf", load_images=True)
lp.draw_box(pdf_images[0], pdf_layout[0])
import layout parser as lp
page_layout = lp.load_pdf("tests/fixtures/io/example.pdf")[0]
pdf_lines = lp.simple_line_detection(page_layout)
json
and csv
, see #6union
and intersect
operations, see #20 and the detailed explanation
When loading Layout Parser official models, Detectron2LayoutModel
can automatically detect the label_map, . For example,
model = lp.Detectron2LayoutModel("lp://HJDataset/faster_rcnn_R_50_FPN_3x/config")
model.label_map
# {1: 'Page Frame', ... }
Detectron2LayoutModel
now supports the enforce_cpu
flag that enforces using cpu even when CUDA devices are available.
For visualization.draw_box
, it now supports a show_element_type
flag that shows the bbox category name on the top left corner of the layout objects.
layout
issue mentioned in #9 - Thanks to @remidbs.iopath
instead of fvcore
. See #18, Thanks to @edisongustavo.Improvements:
Detectron2LayoutModel
object. This might be helpful for using the plain layoutparser
library without installing the Detectron2 module.New models:
lp://NewspaperNavigator/faster_rcnn_R_50_FPN_3x/config
Fixes:
In this version, we released a new model for publaynet and made several improvements:
mask_rcnn_X_101_32x8d_FPN_3x
model trained on the publaynet
dataset. Note: it's been trained on the full training set (while others are only trained on the validation set), and you could expect a 15% performance improvement based on this new model.layoutparser
now supports the following functionalities:
Coordinate system:
OCR System:
Layout Modeling:
Visualization: