This is an revised version from SynthText and Chinese SynthText, which is more suitable to generate customized data, e.g. generating multiple data same as the text data in game. It works for both Chinese and English.
- Add function to customize the font size, color
- Add UI interface , which is more easier for fresh user
- Delete character augmentation, e.g. no border, no shadow
- make the text placement geometry-aware, e.g. using depth and segmentation
- python3, Windows,Ubuntu
python GUIstart.py
Click open data path button, Choose a folder and confirm,the image number under the chosen folder will be popped up as the picture shows
- The first way is to select from the
comboboxwhich is provided by current tool; - The second way is to click
add fontbutton and choose the font file what users want.
The chosen font will be listed infontlist. You can clear all the fonts by clickingclearbutton. Deleting one specific font is not supported so far.
Here is the example for character “WINNER WINNER CHICKEN DINNER”.
- Input
40for the font size - Choose color by clicking
open color palettebutton - Input
1for the reusing number for each image - Input
1for the text number in each image - Set the text content by clicking
import text sourcebutton with atxtfile or entering text directly in the box area.
Click the button generate data , generate detection label and generate recognition label step by step, it will show the messages as the pictures show.
- detection label format
222,230,601,230,601,271,222,271,WINNER WINNER CHICKEN DINNER
#value oder
(left,top) ---> (right,top)
|
|
v
(left,bottom) <--- (right,bottom)
- recognition label format
test3_000_000.png WINNER WINNER CHICKEN DINNER
Here is the example after Usage Steps
这是基于SynthText和Chinese SynthText进行修改的项目,适用于生成自定义数据,如生成大量跟游戏文字相同的数据。 它适用于中文和英文。
- 生成定制化文本数据,指定字体大小、颜色等
- 增加UI交互,方便操作
- 删除字体增强功能,没有对字体渲染阴影,边框等
- python3, Windows,Ubuntu
python GUIstart.py
按 open data path 按键, 选择一个文件并且确定,所选文件夹下的图像编号将作为图片弹出
- 第一种方法是在复选框种选择想要的格式,选完后点击
comfirm按钮确认; - 第二种方法是点击
add font按钮,选择想要的格式。 被选择的格式会添加在右边的列表中,可以用clear按钮来清除所有,暂时不支持清楚单个格式
这里有个文本样式作为参考 文本内容:“大吉大利,今晚吃鸡” 参数解析:
-
fontsize:文本大小
-
fontcolor:文本颜色、
-
reusing number for each image:每张图片复用次数
-
text number in each image:每张图片中的文本数量
-
text content:文本内容
-
输入
40在font size输入框中 -
点击按钮
open color palette来选择颜文本色 -
输入
1在reusing number for each image输入框中 -
输入
1在for the text number in each image输入框中 -
点击按钮
import text source来设置文本内容,可以选择txt文件或者根据提示自定义文本内容在输入框中
依次按下按钮 generate data , generate detection label 和 generate recognition label , 按完后会弹窗显示生成的本文信息
- 文本检测标签的格式
222,230,601,230,601,271,222,271,WINNER WINNER CHICKEN DINNER
#坐标点顺序
(左边,顶部) ---> (右边,顶部)
|
|
v
(左边,底部) <--- (右边,底部)
- 识别标签的格式
test3_000_000.png WINNER WINNER CHICKEN DINNER





