← 开源
ankush-me

SynthText

Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016.

Model DevelopmentDataset engineeringPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
2.15k
Star
622
Fork
+-1
本周
3
贡献者
创建于 2016-09-11 · 更新于 2026-10-13 · 今日第 8926 名
主要开发者
ankush-mecarandraugcodeVerySlow

ankush-me/SynthText 排名第 8,926,有 2,145 个星标。

同类别比较

ankush-me/SynthText 排名第 8,926,此处有 8 个同类条目;facebookresearch/SparseConvNet 排名第 8,928。

同类别比较
名称排名指标
bubbliiiing/yolov4-pytorch8,910
语言:
Python
星标数:
2,163
分叉数:
593
简介:
这是一个YoloV4-pytorch的源码,可以用于训练自己的模型。
fangwei123456/spikingjelly8,911
语言:
Python
星标数:
2,162
分叉数:
327
简介:
SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
facebookresearch/pycls8,912
语言:
Python
星标数:
2,161
分叉数:
239
简介:
Codebase for Image Classification Research, written in PyTorch.
jeonsworld/ViT-pytorch8,915
语言:
Jupyter Notebook
星标数:
2,159
分叉数:
396
简介:
Pytorch reimplementation of the Vision Transformer (An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale)
facebookresearch/SparseConvNet8,928
语言:
C++
星标数:
2,145
分叉数:
334
简介:
Submanifold sparse convolutional networks
MIT-SPARK/Kimera8,934
星标数:
2,136
分叉数:
239
简介:
Index repo for Kimera code
SeanNaren/deepspeech.pytorch8,936
语言:
Python
星标数:
2,134
分叉数:
618
简介:
Speech Recognition using DeepSpeech2.
yang-song/score_sde_pytorch8,940
语言:
Jupyter Notebook
星标数:
2,132
分叉数:
360
简介:
PyTorch implementation for Score-Based Generative Modeling through Stochastic Differential Equations (ICLR 2021, Oral)
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Dataset engineering
关键词Data processing, OCR
星标数2,145
分叉数622
贡献者3
创建日期2016-09-11
更新日期2026-10-13
1 天星标数0
7 天星标数-1
排名8,926
上次排名8,984
排名变化58
7 天星标排名16,943
上次 7 天星标排名16,941
7 天星标排名变化-2
总星标排名5,993
上次总星标排名5,987
总星标排名变化-6
国家UK
README 摘录

SynthText Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016. **Synthetic Scene-Text Image Samples** The code in the branch is for Python2. The main dependencies are: Generating samples where, points to the directory included in the data torrent. Specifying this is optional, and if not specified, the script will automatically download and extract the same data file (~24 M). h5**: This is a

sample h5 file which contains a set of 5 images along with their depth and segmentation information. Note, this is just given as an example; you are encouraged to add more images (along with their depth and segmentation information) to this database for your own use. **fonts**: three sample fonts (add more fonts to this folder and then update with their paths). **newsgroup**: Text-source (from the News Group dataset). This can be subsituted with any text file. Look inside

to see how the text inside this file is used by the renderer. cp**: Color-model (foreground/background text color model), learnt from the IIIT-5K word dataset. **models**: Other cPickle files (**char\_freq. cp**: frequency of each character in the text dataset; **font\_px2pt. cp**: conversion from pt to px for various fonts: If you add a new font, make sure that the corresponding model is present in this file, if not you can add it by adapting ). This

script will generate random scene-text image samples and store them in an h5 file in . If the option is specified, the generated output will be visualized as the script is being run; omit the option to turn-off the visualizations. If you want to visualize the results stored in later, run: Pre-generated Dataset A dataset with approximately 800000 synthetic scene-text images generated with this code can be found in the file in the torrent here; dataset detais

/description in file in the same torrent. Adding New Images Segmentation and depth-maps are required to use new images as background. Sample scripts for obtaining these are available here. MATLAB script to regress a depth mask for a given RGB image; uses the network of Liu etal. and for getting segmentation masks using gPb-UCM. Pre-processed Background Images The 8,000 background images used in the paper, along with their segmentation and depth masks, are included in the

same torrent as the pre-generated dataset under the directory. Note: We do not own the copyright to these images. Generating Samples with Text in non-Latin (English) Scripts @JarveeLee has modified the pipeline for generating samples with Chinese text here. @adavoudi has modified it for arabic/persian script, which flows from right-to-left here. @MichalBusta has adapted it for a number of languages (e. Bangla, Arabic, Chinese, Japanese, Korean) here. @gachiemchiep has adapted for Japanese here. @gungui98 has

adapted for Vietnamese here. @youngkyung has adapted for Korean here. @kotomiDu has developed an interactive UI for generating images with

常见问题

记录了多少星标和分叉?

ankush-me/SynthText 有 2,145 个星标和 622 个分叉。

仓库排名是多少?

ankush-me/SynthText 排名第 8,926。

记录的语言和类别是什么?

ankush-me/SynthText 有 2,145 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

ankush-me/SynthText 与 facebookresearch/SparseConvNet 比较,后者排名第 8,928,有 2,145 个星标。

README

SynthText

Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016.

Synthetic Scene-Text Image Samples

The code in the master branch is for Python2. Python3 is supported in the python3 branch.

The main dependencies are:

pygame==2.0.0, opencv (cv2), PIL (Image), numpy, matplotlib, h5py, scipy

Generating samples

python gen.py --viz [--datadir ]

where, --datadir points to the renderer_data directory included in the data torrent. Specifying this datadir is optional, and if not specified, the script will automatically download and extract the same renderer.tar.gz data file (~24 M). This data file includes:

  • sample.h5: This is a sample h5 file which contains a set of 5 images along with their depth and segmentation information. Note, this is just given as an example; you are encouraged to add more images (along with their depth and segmentation information) to this database for your own use.
  • fonts: three sample fonts (add more fonts to this folder and then update fonts/fontlist.txt with their paths).
  • newsgroup: Text-source (from the News Group dataset). This can be subsituted with any text file. Look inside text_utils.py to see how the text inside this file is used by the renderer.
  • models/colors_new.cp: Color-model (foreground/background text color model), learnt from the IIIT-5K word dataset.
  • models: Other cPickle files (char_freq.cp: frequency of each character in the text dataset; font_px2pt.cp: conversion from pt to px for various fonts: If you add a new font, make sure that the corresponding model is present in this file, if not you can add it by adapting invert_font_size.py).

This script will generate random scene-text image samples and store them in an h5 file in results/SynthText.h5. If the --viz option is specified, the generated output will be visualized as the script is being run; omit the --viz option to turn-off the visualizations. If you want to visualize the results stored in results/SynthText.h5 later, run:

python visualize_results.py

Pre-generated Dataset

A dataset with approximately 800000 synthetic scene-text images generated with this code can be found in the SynthText.zip file in the torrent here; dataset detais/description in readme.txt file in the same torrent.

Adding New Images

Segmentation and depth-maps are required to use new images as background. Sample scripts for obtaining these are available here.

  • predict_depth.m MATLAB script to regress a depth mask for a given RGB image; uses the network of Liu etal. However, more recent works (e.g., this) might give better results.
  • run_ucm.m and floodFill.py for getting segmentation masks using gPb-UCM.

For an explanation of the fields in sample.h5 (e.g.: seg,area,label), please check this comment.

Pre-processed Background Images

The 8,000 background images used in the paper, along with their segmentation and depth masks, are included in the same torrent as the pre-generated dataset under the bg_data directory. The files are:

filenames description
imnames.cp names of images which do not contain background text
bg_img.tar.gz images (filter these using imnames.cp)
depth.h5 depth maps
seg.h5 segmentation maps

use_preproc_bg.py provides sample code for reading this data.

Note: We do not own the copyright to these images.

Generating Samples with Text in non-Latin (English) Scripts

  • @JarveeLee has modified the pipeline for generating samples with Chinese text here.
  • @adavoudi has modified it for arabic/persian script, which flows from right-to-left here.
  • @MichalBusta has adapted it for a number of languages (e.g. Bangla, Arabic, Chinese, Japanese, Korean) here.
  • @gachiemchiep has adapted for Japanese here.
  • @gungui98 has adapted for Vietnamese here.
  • @youngkyung has adapted for Korean here.
  • @kotomiDu has developed an interactive UI for generating images with text here.
  • @LaJoKoch has adapted for German here.

Further Information

Please refer to the paper for more information, or contact me (email address in the paper).

排名相邻
同类项目