Code Monkey home page Code Monkey logo

text-image-augmentation-python's Introduction

Text Image Augmentation

Build Status

A general geometric augmentation tool for text images in the CVPR 2020 paper "Learn to Augment: Joint Data Augmentation and Network Optimization for Text Recognition". We provide the tool to avoid overfitting and gain robustness of text recognizers.

Note that this is a general toolkit. Please customize for your specific task. If the repo benefits your work, please cite the papers.

Requirements

Demo

  • Distortion

  • Stretch

  • Perspective

Speed

To transform an image with size (H:64, W:200), it takes less than 14ms using a 2.5GHz CPU. It is possible to accelerate the process by calling multi-process batch samplers in an on-the-fly manner, such as setting "num_workers" in PyTorch.

Attention

Modify from https://github.com/Canjie-Luo/Text-Image-Augmentation.git.

text-image-augmentation-python's People

Contributors

rubanseven avatar wenmuzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

text-image-augmentation-python's Issues

生成时候出现错误,但是好像能生成

麻烦问一下,生成的时候报这个错是怎么回事哪,什么都没改
Total fonts num: 1
Background num: 1
Generate text images in ./output/default
Retry gen_img:
Traceback (most recent call last):
File "main.py", line 75, in gen_img_retry
return renderer.gen_img(img_index)
File "/home/aistudio/work/text_renderer/textrenderer/renderer.py", line 54, in gen_img
bg = self.gen_bg(width=word_size[0] * 8, height=word_size[1] * 8)
File "/home/aistudio/work/text_renderer/textrenderer/renderer.py", line 452, in gen_bg
bg = self.gen_bg_from_image(int(width), int(height))
File "/home/aistudio/work/text_renderer/textrenderer/renderer.py", line 477, in gen_bg_from_image
assert width > height
AssertionError

关于注释

您好!
请问您代码中的注释哪些模块是必需的呀?我看 demo 还有导入 augment 中被注释掉的模块.
您会更新一份精简版的代码吗?
多谢了!

弯曲的文字超出图片区域

你好,我想通过该代码生成一些弯曲的文字,但是生成之后有部分弯曲的文字超出了图片的边界。请问可以将生成图片size变大,文字大小不变,保证文字在图片里面吗?感谢

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.