Layout-Parser / layout-parser

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

[Fix] reduce memory consumption and close pdf stream after usage #164

Open jakobnrmnn opened 1 year ago

jakobnrmnn commented 1 year ago

Flushes the pages and pdf afterwards to reduce the memory/ram consumption.

Opens the pdf stream as a context manager so that the file is closed afterwads.