Comments (15)
Ah ha your solution works pretty nice!Thanks~
After your suggestion averagely it just takes me 6 seconds to select and place text on 1 image with better appearance ! It was bad and took 60 seconds per image yesterday.....
from synthtext.
Like this pic,it will place some chinese character around the narrow edge,but I want to add to the broad white space.This situation frequently happens.
from synthtext.
sometime like this , I think it is good but this situation seldom happens.
from synthtext.
I don't know how to solve this problem....I guess I should change something in text_util.py in line 118
def render_multiline(self,font,text):
But don't know exactly what to do
from synthtext.
Maybe it is the problem about depth prediction?
from synthtext.
@JarveeLee : The segmentation regions are randomly selected for placing text (check here). If you remove this, and instead go through the regions in sequence, the regions should be ordered in decreasing order of their areas -- so then the largest region (as found in the segmentation step), should be selected first for placing text.
Next, regarding rendering multiple lines:
You can change this line, so that text_type
is always PARA
, which should select multiple lines containing multiple words, based on the dimensions of the segmentation region and the font-size.
from synthtext.
Hi, @JarveeLee , I want to generate Chinese scene images through SynthText, I have generated char_freq.cp and font_px2pt.cp based on newsgroup.txt, but it comes somes mistakes.
Traceback (most recent call last):
File "/home/chengls/data/SynthText_06.05/synthgen.py", line 661, in render_text
regions['homography_inv'][ireg])
File "/home/chengls/data/SynthText_06.05/synthgen.py", line 501, in place_text
render_res = self.text_renderer.render_sample(font,collision_mask)
File "/home/chengls/data/SynthText_06.05/text_utils.py", line 366, in render_sample
text = self.text_source.sample(nline,nchar,text_type)
File "/home/chengls/data/SynthText_06.05/text_utils.py", line 606, in sample
return self.fdictkind
File "/home/chengls/data/SynthText_06.05/text_utils.py", line 652, in sample_para
lines = self.get_lines(nline, nword, nchar_max, f=0.35)
File "/home/chengls/data/SynthText_06.05/text_utils.py", line 584, in get_lines
lines = h_lines(niter=100)
File "/home/chengls/data/SynthText_06.05/text_utils.py", line 576, in h_lines
line_start = np.random.choice(len(self.txt)-nline)
File "mtrand.pyx", line 1391, in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:14900)
ValueError: a must be greater than 0
So could you tell how to generate Chinese scene images in details? Thank you.
from synthtext.
@clscy generate own font_px2pt.cp by adding more chinese fonts which end with .tff,and run invert_font_size.py . And update char_freq.cp based on newsgroup.txt. And you should fix all chinese utf-8 coding problem both in OS and python...
from synthtext.
@JarveeLee is it possible for you to share your code / data with the changes you made for generating Chinese text? It would be very useful for a lot of users. Thanks!
from synthtext.
@ankush-me I can email to you my code next week when go back to company.
from synthtext.
@JarveeLee, would it be possible for you to share code and data with me ? It will be of great help for my ongoing project.
from synthtext.
@JarveeLee : Is it possible to share it openly, e.g. on GitHub?
from synthtext.
@ankush-me I will do this ....Busy with final exam these days...
from synthtext.
@ankush-me https://github.com/JarveeLee/SynthText_Chinese_version
from synthtext.
@JarveeLee Thanks a lot!
from synthtext.
Related Issues (20)
- Changing text render areas HOT 1
- Generator gives bad result HOT 4
- Ground truth file HOT 3
- results/SynthText.h5
- Text database
- Generating just one word HOT 1
- Saving masks in folder HOT 1
- Pizda shaatsan how to get generated picture with text but without border ? HOT 1
- AssertionError and text placement parameters misunderstanding
- Incorrect visualization of bboxes HOT 5
- Negative value of word-level bounding-boxes in gt.mat
- Mask and bounding boxes HOT 4
- Downloading of SynthText Pre-generated Dataset HOT 8
- Undefined functions in predict_depth.m in prep_scripts HOT 3
- Anyone know how to disable mirrored/backwards text? HOT 1
- zero-size array
- Some special characters are not generated HOT 3
- Can you generate a composite image consisting entirely of '+', '-', numbers, and decimal points?
- Do you have a non torrent download address? I would like to obtain the depth and seg of SynthText, as well as the original image file HOT 1
- Incorrect BBoxes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synthtext.