zoukankan      html  css  js  c++  java
  • 一则手写汉字识别应用介绍

    项目

    https://github.com/fanqingsong/cnn_handwritten_chinese_recognition

        使用python+flask搭建的一个网站,然后从网页的写字板上获取鼠标手写的汉字经过转码后传回后台,并经过图片裁剪处理之后传入CNN手写中文识别的模型中进行识别,最后通过PIL将识别结果生成图片,最后异步回传给web端进行识别结果展示。中文总共50,000多汉字,常用的有3,755个。这里主要对常见的3755个汉字进行识别。

    使用技术

    前台:

    1、 drawingboard.js 在canvas上手写汉字

          并可以获取canvas手写汉字的图片编码 base64

    2、 手写过程监控事件,实时收集canvas图片数据,通过ajax发往后台进行识别。

    后台:

    1、 flask -- web服务器框架

    2、 tensorflow --- 加载汉字识别模型, 并根据输入的图片数据给出预测结果, 取最可能的前三个发往前台。

    drawingboard

    http://leimi.github.io/drawingboard.js/

    This is a canvas based drawing app that you can integrate easily on your website.

    drawingboard.js consists of a blank canvas surrounded by a few UI elements that control it: a color picker, a pencil, a paint can, an eraser, a pencil size chooser, navigations and reset buttons.

    You can draw with mouse or touch on pretty much every browser that supports <canvas>. Didn't test that much on IE but hey, WIP.

    local and session storage are supported: your last drawing is restored when you come back on the website.

    You can set a background image at initialization, or let the user drop one on the canvas.

    The drawingboard is really lightweight, but also really simple: if you want something more complete, go look at similar projects at the bottom of this doc.

  • 相关阅读:
    [LeetCode] 143. 重排链表
    [LeetCode] 342. 4的幂
    [LeetCode] 1744. 你能在你最喜欢的那天吃到你最喜欢的糖果吗?
    [LeetCode] 148. 排序链表
    [LeetCode] 525. 连续数组
    [LeetCode] 160. 相交链表
    [LeetCode] 134. 加油站
    [LeetCode] 474. 一和零
    CentOS 升级 OpenSSH
    AWS 证书取消挂靠
  • 原文地址:https://www.cnblogs.com/lightsong/p/11632938.html
Copyright © 2011-2022 走看看