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.
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?
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.