Home

Awesome

SynthText_kr

This is KOREAN version code of original SynthText scene-text image generator. (You can find the English, original version in here: https://github.com/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.

Korean Synthetic Scene-Text Image Samples Synthetic Scene-Text Samples

The main dependencies are:

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

Pre-processed Background Images

The 8,000 background images used in the paper, along with their segmentation and depth masks, have been uploaded here: http://www.robots.ox.ac.uk/~vgg/data/scenetext/preproc/<filename>, where, <filename> can be:

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

Sample Korean Fonts

There are some sample Korean fonts you can use like the following. If you want to use these fonts, you should update the fonts/fontlist.txt with their paths.

https://koreaoffice-my.sharepoint.com/:f:/g/personal/ygseo_korea_edu/EvnQDCsjGMFGp8RIpoECvZUBtZ1FV1Wf7kUkRvz9kZqecg?e=QuQ21Z

Note: I do not own the copyright to these fonts.

Generating scene-text images with background

The background image files are saved in bg_img directory. The following files are used to generate the images.

python make_h5.py

This will generate random scene-text image files with background images and store them in an h5 file in dset_kr.h5. When it generates the image, it also creates the following files.

python visualize_results.py

This will generate the followings from stored images in dset_kr.h5. There are 3 types of dataset that you can generate.

Also, you can get the coordinate files of characters and words each

Adding New Images

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

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

Further Information

Please refer to the paper for more information, or contact the author (email address in the paper). If you find errors for koreans, don't hesitate to give me an email: ygseo@korea.ac.kr