V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
legend99
V2EX  ›  Python

国税发票查验验证码识别

  •  
  •   legend99 · 2021-02-18 17:27:38 +08:00 · 1564 次点击
    这是一个创建于 1162 天前的主题,其中的信息可能已经有所发展或是发生改变。
    import base64
    import requests
    
    with open('./test02.png', 'rb') as f:
        img_bytes = f.read()
    
    img_base64 = base64.b64encode(img_bytes)
    # '00' 黑色 '01' 红色 '02' 黄色 '03' 蓝色
    data = {'image': str(img_base64, 'utf-8'), 'key': '03'}
    result = requests.post('http://47.99.174.98:8808/captcha', json=data)
    # 返回 json 格式数据{"code": "7RT"}
    print(result.json())
    
    4 条回复    2021-02-18 20:06:24 +08:00
    yqmac
        2
    yqmac  
       2021-02-18 17:45:34 +08:00
    牛批了我滴哥,训练样本是人工打码来的么
    yqmac
        3
    yqmac  
       2021-02-18 18:46:04 +08:00
    去网站看了一下,返回值能解析出颜色和图片。根据颜色筛就明了了。吆西。打码都不需要了
    justin2018
        4
    justin2018  
       2021-02-18 20:06:24 +08:00
    http://47.99.174.98:8808/captcha

    这是推广 还是 ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3220 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:24 · PVG 21:24 · LAX 06:24 · JFK 09:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.