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.
http://www.robots.ox.ac.uk/~vgg/data/scenetext/
Apache License 2.0
2.03k stars 622 forks source link

Difference between Collision_Mask and Text_Mask? #241

Closed ivand9 closed 2 years ago

ivand9 commented 2 years ago

Hi, can u tell me what's the purpose of Collision_Mask and Text_Mask and what's the difference between Collision_Mask and Text_Mask?

ankush-me commented 2 years ago

Can you link to these variables in the relevant context / code?

ivand9 commented 2 years ago

https://github.com/ankush-me/SynthText/blob/e694abf03f298ce0e362cfbc5f67cf0ce6cbf301/synthgen.py#L506 https://github.com/ankush-me/SynthText/blob/e694abf03f298ce0e362cfbc5f67cf0ce6cbf301/synthgen.py#L522

ankush-me commented 2 years ago

Collision mask is in the local coordinates space of respective segment in which the text is placed.

Text mask is in the image coordinates so it is closest to what a “mask” or “segmentation” should be for the synthetic text.

ankush-me commented 2 years ago

You can just plt.imshow the two to get a sense of what these are.