GitHub - gitlfc163/invoice: 增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等 · GitHub
Skip to content

gitlfc163/invoice

 
 

Repository files navigation

增值税发票识别

识别 type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等

环境

  1. python3.5/3.6 调试发现,在 python 3.6.7 环境下能运行
    opencv-contrib-python==4.3.0.38
    opencv-python==4.3.0.38
    tersflow 1.12.0
  1. 依赖项安装:pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple pip36 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple pip38 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple d:\programdata\python\python38\python38.exe -m pip install --upgrade pip
  2. 有 GPU 环境的可修改安装 requirements.txt 对应版本的 tensorflow-gpu,config.py 文件中控制 GPU 的开关

模型架构

YOLOv3 + CRNN + CTC

模型

  1. 模型下载地址:链接:https://pan.baidu.com/s/1bjtd3ueiUj3rt16p2_YQ2w
  2. 将下载完毕的模型文件夹 models 放置于项目根目录下

服务启动

  1. python36 app.py
  2. 端口可自行修改
  3. 服务调用地址:http://...: [端口号]/invoice-ocr,例:http://127.0.0.1:11111/invoice-ocr

测试 demo

  1. 测试工具:postman,可自行下载安装
  2. 增值税电子普票测试结果

Image text

  1. 增值税专用普票测试结果

Image text

  1. 增值税普通普票测试结果

Image text

Docker 说明

生成 Docker 镜像

docker build -t invoice:v1 .

运行 Docker 容器

docker run invoice:v1

D:\ProgramData\Python\Python36\lib\site.py

functions, through the main() function when Python starts.

USER_SITE = None USER_BASE = None

USER_SITE = "D:\ProgramData\Python\Cache\Python36\site-packages" USER_BASE = "D:\ProgramData\Python\Cache"

About

增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • C 83.0%
  • Python 10.4%
  • Cuda 5.6%
  • Cython 0.4%
  • C++ 0.2%
  • Makefile 0.2%
  • Other 0.2%