Ver código fonte

idc ocr v3.1: remove paddle-ocr

Tinger 2 anos atrás
pai
commit
4f82c650e6
3 arquivos alterados com 6 adições e 18 exclusões
  1. 6 1
      requires.cpu
  2. 0 1
      utils/__init__.py
  3. 0 16
      utils/ocr.py

+ 6 - 1
requires.cpu

@@ -1,5 +1,10 @@
 paddlepaddle==2.4.2
-paddleocr==2.6.1.3
+
+opencv-python==4.6.0.66
+pyclipper==1.3.0.post4
+urllib3==1.26.15
+shapely==2.0.1
+
 flask==2.3.1
 gevent==22.10.2
 gunicorn==20.1.0

+ 0 - 1
utils/__init__.py

@@ -1,2 +1 @@
 from .util import *
-from .ocr import *

+ 0 - 16
utils/ocr.py

@@ -1,16 +0,0 @@
-from .util import Args
-import numpy as np
-from paddleocr.tools.infer.predict_system import TextSystem
-
-
-class Ocr:
-    def __init__(self):
-        self._args = Args(
-            use_gpu=False,
-            enable_mkldnn=True,
-            det_model_dir="models/det/",
-            rec_model_dir="models/rec/"
-        )
-        self._eng = TextSystem(self._args)
-        img = np.random.uniform(0, 255, [640, 640, 3]).astype(np.uint8)
-        [self._eng(img) for _ in range(10)]