Code Monkey home page Code Monkey logo

invoice's Introduction

OverView

智能发票识别系统

Requirements

  • tomcat服务器
  • eclipse
  • mysql数据库
  • redis数据库

Function

  • 自动归类识别机打发票中的发票信息
  • 用户手动绘制用于识别的发票模板和识别区域
  • 查看等待识别发票的任务缓冲队列
  • 可视化发票识别算法的过程,动态展示当前识别的区域和结果
  • 管理员可对系统平台内的用户、用户组进行权限编辑管理
  • 单位负责人可修改使用系统平台的单位信息
  • 个人设置可查看个人信息和权限

Details

前端

  • Jquery + bootstrap搭建前端框架,处理前端逻辑和展示,负责MVC架构中的View视图层
  • 前后端通过websocket和ajax通信,ajax主要用于按钮等控件的事件处理函数中的请求,websocket用于后端主动向前端推送消息
  • JSP控制cookies和session,在页面跳转时记录会话用户态,并可通过前端可视化界面对用户权限(用户权限分为继承的用户组权限和个人权限)进行编辑
  • 识别算法的可视化通过websocket实现,算法端将每个区域的识别结果通过后台服务器逐次转送给前端,前端在onmessage回调函数中处理信息并在可视化窗口的canvas画布中显示出来
  • 通过画布的getImageDataputImageData获取图片的像素点,并制造模糊效果,对比突出当前的识别区域
  • Js + canvas实现用户动态画图的效果,可以在canvas画布中框出自定义的识别区域和填写区域信息

后端

  • Spring MVC + Spring + JDBC搭建后端框架,Controller负责接收请求,Service负责主要业务逻辑,Dao负责数据库访问
  • 算法端用C++编写,java后端通过多线程+socket+TCP与算法端通讯,利用对象锁完成线程调度
  • 利用redis实现缓冲队列以及模板操作调度队列
  • 利用spring-websocket与前端进行全双工通信
  • 使用shiro作为安全管理框架,通过其内置session实现安全登录,使用shiro注解完成权限管理。

算法端

  1. 使用Bag of Words + CNN完成票据分类,根据分类结果查询并获取相应的发票模板。
  2. 使用SIFT特征匹配和配准思路完成票据对齐
  3. 根据模板中信息区域坐标截取ROI,因为票据可能存在套打情况,故还使用了约束式ROI搜索算法对信息区域进行重定位。
  4. 对每个ROI进行去噪、去印章、去直线等预处理操作,并使用形态学处理得到目标文本信息的连通体的最小外接矩形,并将此区域送入OCR模块。
  5. 使用搭建好的基于深度学习的卷积神经网络进行文字识别,识别结果组装成协议格式,返回给后台。

Screenshot

  • 缓冲队列
    img

  • 算法可视
    img

  • 发票模板
    img

  • 添加/修改模板
    img

  • 未识发票
    img

  • 日志查询
    img

  • 用户管理
    img

  • 单位管理
    img

  • 个人设置
    img

Author

Author E-mail
Eric_Wong [email protected]
huanglu [email protected]

invoice's People

Contributors

huanghlun avatar huanglu20124 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.