GithubHelp home page GithubHelp logo

classicvalues / mathai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roujack/mathai

0.0 1.0 0.0 79.71 MB

一个拍照做题程序。输入一张包含数学计算题的图片,输出识别出的数学计算式以及计算结果。This is a mathematic expression recognition project.

License: MIT License

Python 95.04% JavaScript 3.21% CSS 1.75%

mathai's Introduction

mathAI

一个拍照做题程序。输入一张包含数学计算题的图片,输出识别出的数学计算式以及计算结果。 请查看系统文档说明来运行程序。注意,这是一个半开源的项目,目前上传的版本只能处理简单的一维加减乘除算术表达式(如果想要识别更加复杂的表达式,可以参考数学公式识别的论文)。可以参考的代码是前面字符识别部分以及整个算法处理框架。 image

整个程序使用python实现,具体处理流程包括了图像预处理、字符识别、数学公式识别、数学公式语义理解、结果输出。

本程序使用opencv对输入的图像进行预处理,并将字符裁剪出来再归一化成固定大小的矩阵。我在TensorFlow上实现了一个lenet5 的卷积神经网络用来识别数学字符,训练使用CHROME数据集。对于数学公式的识别,主要是将识别出的独立的字符组织成计算机能够 理解的数学公式(这里的数学公式就是纯字符的可求解的数学计算题)。大概的方法是使用编译原理的算符优先法和递归下降法进行实现。 然后根据属性文法的值传递**,将数学公式的值计算出来。最后使用python的matlibplot库把计算过程和答案打印出来。

优点:这是一整套拍照做题的算法框架,同时能够处理多种多样的计算题,目前市面上还没有看到实现。OCR技术如此成熟的今天字符识别 已经不算有挑战的东西了。 缺点:字符空间关系判断只用了人类启发式规则,图像预处理不够鲁棒,数学公式的结构识别算法不够完美(可以考虑使用二维文法来做)。 系统还有很大的提升空间。

mathai's People

Contributors

roujack 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.