from cnstd import CnStd
from cnocr import CnOcr
std = CnStd()
cn_ocr = CnOcr()
box_infos = std.detect('output_dir/t1-Scene-002-01.jpg')
for box_info in box_infos['detected_texts']:
cropped_img = box_info['cropped_img']
ocr_res = cn_ocr.ocr_for_single_line(cropped_img)
print('ocr result: %s' % str(ocr_res))
dubo@LAPTOP-I2R9VG58 MINGW64 /d/Download/audio-visual/make-compilation-videos/auto_video_splitter (master)
$ python cnst.py
Traceback (most recent call last):
File "cnst.py", line 3, in <module>
from cnstd import CnStd
File "D:\Program Files\anaconda3\lib\site-packages\cnstd\__init__.py", line 20, in <module>
from .cn_std import CnStd
File "D:\Program Files\anaconda3\lib\site-packages\cnstd\cn_std.py", line 32, in <module>
from .model import gen_model
File "D:\Program Files\anaconda3\lib\site-packages\cnstd\model\__init__.py", line 22, in <module>
from .dbnet import gen_dbnet, DBNet
File "D:\Program Files\anaconda3\lib\site-packages\cnstd\model\dbnet.py", line 31, in <module>
from .base import DBPostProcessor, _DBNet
File "D:\Program Files\anaconda3\lib\site-packages\cnstd\model\base.py", line 23, in <module>
from shapely.geometry import Polygon
File "D:\Program Files\anaconda3\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
from .base import CAP_STYLE, JOIN_STYLE
File "D:\Program Files\anaconda3\lib\site-packages\shapely\geometry\base.py", line 19, in <module>
from shapely.coords import CoordinateSequence
File "D:\Program Files\anaconda3\lib\site-packages\shapely\coords.py", line 8, in <module>
from shapely.geos import lgeos
File "D:\Program Files\anaconda3\lib\site-packages\shapely\geos.py", line 154, in <module>
_lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
File "D:\Program Files\anaconda3\lib\ctypes\__init__.py", line 381, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'D:\Program Files\anaconda3\Library\bin\geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
(base)