Layout-Parser / layout-parser

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

Support for opencv-python-headless #170

Open sandzone opened 1 year ago

sandzone commented 1 year ago

Motivation To improve use of LayoutParser with AWS Lambda

Additional context The latest version of opencv-python has a well known dependency issue with ZLIB. Following is a thread about it.

https://github.com/opencv/opencv-python/issues/772

Workaround for that problem is to install an earlier version of opencv-python. Specifically, 4.6.0.66

To make LayoutParser compatible with AWS Lambda, one has to install opencv-pytyon==4.6.0.66 ahead of LayoutParser.

Also, I am not sure if opencv-python-headless will be sufficient as a dependency instead of opencv-python to get LayoutParser to work properly. If 'headless' is sufficient, it saves a bit of space when creating AWS Lambda containers.

micmarty-deepsense commented 3 months ago

I'd also love to see that change - opencv-python-headless or opencv-contrib-python-headless should be sufficient, whatever works. Is there a chance to introduce one of them in the short term?