Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.78k stars 459 forks source link

Improve Layout #24

Closed lolipopshock closed 3 years ago

lolipopshock commented 3 years ago
  1. The page_data argument for Layout should be a keyword argument
  2. Implement sort for Layout, fix #23
    >>> import layoutparser as lp
    >>> i = lp.Interval(4, 5, axis="y")
    >>> l = lp.Layout([i, i.shift(2)])
    >>> l.sort(key=lambda x: x.coordinates[1], reverse=True)