Skip to content

πŸ“„ Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

build(python): make OpenCV headless by default with optional GUI support (issue #737)

SWHLc1ec6054a7c3
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 014d39c..a4cccf4 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -45,6 +45,7 @@ rapidocr = "rapidocr.main:main"
[project.optional-dependencies]
rtl = ["python-bidi>=0.4.2,<1.0"]
+opencv-python = ["opencv-python>=4.5.1.48"]
[tool.setuptools]
include-package-data = true
diff --git a/python/requirements.txt b/python/requirements.txt
index e2faa68..c28fe4c 100644
--- a/python/requirements.txt
+++ b/python/requirements.txt
@@ -1,5 +1,5 @@
pyclipper>=1.2.0
-opencv_python>=4.5.1.48
+opencv-python-headless>=4.5.1.48
numpy>=1.19.5,<3.0.0
six>=1.15.0
Shapely>=1.7.1,!=2.0.4 # python3.12 2.0.4 bug
@@ -8,4 +8,4 @@ Pillow
tqdm
omegaconf!=2.2.1 # https://github.com/omry/omegaconf/issues/934
requests
-colorlog
\ No newline at end of file
+colorlog