Giter VIP home page Giter VIP logo

Comments (2)

Jamsa avatar Jamsa commented on May 16, 2024

找出问题了,是我样本的宽度小于256,大概不到160,我把imgW调为160后正常。

ocr/model.predict还是存在问题的,改成与训练样本一样,效果会更好一些。我训练纯数字的情况下,如果不改,会有部分数字识别错误:

img = np.array(im).astype(np.float32) / 255.0
X = img.reshape((32, w, 1))
X = np.array([X])

改为

img = (np.array(im).astype(np.float32) / 255.0-0.5)/0.5
X = img.reshape((-1,32, w, 1))

from chinese-ocr.

HuiHuangEmi avatar HuiHuangEmi commented on May 16, 2024

@Jamsa 请问如果我的训练数据不定长,单个字符到十几个字符都有,这样训练的时候resize是不是就失真了?需要在较短的图片后面增加空白像素么?

from chinese-ocr.

Related Issues (20)

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.