系统:win10

显卡:GTX1050

项目环境:pycharm+anaconda3+python 3.6 +cuda10.0 +dudnn10.1

python库:

tensorflow1.14.0 +  tensorflow-gpu1.14.0+matplotlib3.0.3+numpy1.16.3+opencv-python    3.3.0.10

pillow4.3.0+pip19.3.1+pyyaml3.13 +protobuf3.10.0+tornado6.0.2+vc14+watchdog0.9.0

python镜像源配置文件 C:\Users\administrator\.condarc :

文本文件内容:

channels:

- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

- https://pypi.tuna.tsinghua.edu.cn/simple/

show_channel_urls: true

ssl_verify: true

安装库命令:

进入anaconda 中的python36环境

activate py36

命令:

pip install tensorflow-gpu==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install numpy==1.13.3 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install pyyaml==3.13 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install pillow==4.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install matplotlib==3.0.3 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install tornado==6.0.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install watchdog==0.9.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

开始使用项目训练验证码

1.把训练项目captcha_trainer-master和服务项目captcha_platform-master导入pycharm

2.标记验证码图片样本 E:\OCR\IMAGE\jdyzm

3.修改captcha_trainer-master项目配置文件model_demo.yaml

4.运行make_dataset.py  生产训练集和测试集

5.运行trains.py,开始训练,提高识别率

6.把out文件夹中的JdModel_10000.pb拷贝到captcha_platform-master项目中的graph文件夹中

把out文件夹中的JdModel_model.yaml 拷贝到captcha_platform-master项目中的 model文件夹中

7.运行captcha_platform-master项目中的tornado_server.py文件, 发布服务  Running on http://0.0.0.0:19952/ \

8.图片识别调用接口   图片base64的二进制码  参数

Logo

欢迎加入 MCP 技术社区!与志同道合者携手前行,一同解锁 MCP 技术的无限可能!

更多推荐