代码拉取完成,页面将自动刷新
同步操作将从 amoxuk/chinese-ocr-win 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
conda create -n chinese-ocr python=3.5 pip scipy numpy PIL jupyter##运用conda 创建python环境
activate chinese-ocr
pip install easydict -i https://pypi.tuna.tsinghua.edu.cn/simple/ ##选择国内源,速度更快
pip install keras==2.0.8 -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install Cython opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install -U pillow -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install h5py lmdb mahotas -i https://pypi.tuna.tsinghua.edu.cn/simple/
conda install pytorch-cpu -c pytorch #解决window安装pytorch无源问题
pip install torchvision
conda install tensorflow=1.3 ##解决cuda报错相关问题
#配置ctpn按照https://github.com/eragonruan/text-detection-ctpn/issues/73配置
即:
step 1:make some change
change "np.int_t " to "np.intp_t" in line 25 of the file lib\utils\cython_nms.pyx
otherwise appear " ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long' " in step 6.
step 2:updata c file
execute:cd your_dir\text-detection-ctpn-master\lib\utils
execute:cython bbox.pyx
execute:cython cython_nms.pyx
step 3:builf setup file as setup_new.py
import numpy as np
from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
numpy_include = np.get_include()
setup(ext_modules=cythonize("bbox.pyx"),include_dirs=[numpy_include])
setup(ext_modules=cythonize("cython_nms.pyx"),include_dirs=[numpy_include])
step 4:build .pyd file
execute:python setup_new.py install
copy bbox.cp36-win_amd64.pyd and cython_nms.cp36-win_amd64.pyd to your_dir\text-detection-ctpn-master\lib\utils
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。