Coder Social home page Coder Social logo

Comments (21)

crazylyf avatar crazylyf commented on July 24, 2024

Yes, it can be used to generate non-ASCII characters like Chinese, but you will need to do some adaptation.

from synthtext.

ankush-me avatar ankush-me commented on July 24, 2024

You would need to (at least) make the following changes:

  1. Add Chinese fonts --> generate the corresponding font_px2pt.cp
  2. Get a Chinese text source (to replace newsgroup.txt)

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

Be careful of Chinese fonts, some characters in your vocabulary may be not covered. Some font contain more than 10k characters, while others contain ~4k common Chinese characters.

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

@crazylyf I want to use this "SynthText" to generate images with natural chinese words. then to do chinese words recognition in the image.
my question is :

  1. chinese words is about 3K, and more complicated than English words. can this be possible ( with high a accuracy)
  2. I may need lots of samples , i don't know how to train and define network( code by caffe )
    Does you did the reference works? or can you give any ideas?

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

@Jayhello
1. Yes, definitely. There are many end-2-end trainable networks for text-line/word recognition. Although they are mostly focused on English, they are adaptable to Chinese.
2. As to reference works, you can refer to "http://arxiv.org/abs/1507.05717", which has an good torch implementation at: (https://github.com/bgshih/crnn). It is nearly off-the-shelf for recognition. If you try it, may be you want to use warp_ctc(https://github.com/baidu-research/warp-ctc) to replace the built-in CTC implementation, which runs on CPU and thus relatively slow.
3. Is 3k characters really enough for you?

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

@crazylyf
thank you very much for you reply !! I have read the paper your recommend
and my question is

  1. how to prepare training images , for example the character " 你" in chinese, how many image about this
    char to prepare, and the image form ( the image i want to recognize which has a complicated background,like the image below . and how the trained image size is provided)

I know i should localities the char sequence firstly and then to recognition.
For location chars this https://github.com/MhLiao/TextBoxes is useful
image

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

@Jayhello
Sorry, I have exact answer on how many characters for each words to prepare. Usually, one generate samples from given corpus, which contains quite diverse character frequency, and common character like "你" has much larger occurrence.
The text on your example seems added afterwards via some photo editing tool, it may be different from the synthesized text here, which suppose that the text is located on well defined regions. Perhaps you should try release or loosen this constraint to suit your case.

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

the origin image is below, the mark in the image is located by deep learnhttps://github.com/MhLiao/TextBoxes

and are you a chinese people?
image

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

Yeah

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

@crazylyf
我生成图片拿去识别训练的话,应该用怎样的图片呢?
如果用下面的第一张,那就像是OCR了,没有什么意义?下面的第二张这样?
那得多少张图片呢? 每个字要 1K 张图片? 一张图片包含很多字?

image

image

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

@Jayhello
除非做文档识别,不然肯定采用第二种图片。
具体每个字需要多少个样本,没有相关数据,我也没有做过相关实验。个人认为大致在几十个,具体还看应用场景。

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

@Jayhello
我有一个163邮箱,用户名是crazylyf。有兴趣私聊吧

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

@crazylyf
非常感谢哈,我也有代码往图片上面打上文字 以及 坐标。
你没有[email protected] 吗?

from synthtext.

Jayhello avatar Jayhello commented on July 24, 2024

@crazylyf
SynthText 应该也可以生成这样的图片吧

from synthtext.

xiaomaxiao avatar xiaomaxiao commented on July 24, 2024

@crazylyf https://github.com/MhLiao/TextBoxes 你是重新训练了吗

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

@xiaomaxiao TextBoxes?没有

from synthtext.

xiaomaxiao avatar xiaomaxiao commented on July 24, 2024

@crazylyf 直接可以用于汉字检测了?

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

不好意思,没看原文,不过我想应该可以吧。

from synthtext.

xiaomaxiao avatar xiaomaxiao commented on July 24, 2024

@crazylyf 哇那真是不错,CTPN也可以直接检测汉字。TextbOX 再CPU下的速度如何?

from synthtext.

crazylyf avatar crazylyf commented on July 24, 2024

没试过TextBoxes,不太清楚。

from synthtext.

xiaomaxiao avatar xiaomaxiao commented on July 24, 2024

抱歉@错人了, @Jayhello

from synthtext.

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.