Home

Awesome

<div><div>###################################################################</div><div># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#</div><div># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Symmetry-based text detection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #</div><div># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #</div><div># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #</div><div>###################################################################</div><div><br /></div><div>1. Introduction.</div><div><br /></div><div>The source code of symmetry-based text detection algorithm. We adopt approximate calculation technology and parallel technology to speed up the proposed algorithm.</div><div>For this reason, the probability output has a slightly difference but very close result on ICDAR dataset, compared to the CVPR'15 version.</div><div><br /></div><div>###################################################################</div><div><br /></div><div>2. Installation.</div><div><br /></div><div>a) This code is written for the Windows x64 and Visual Studio 2012, and you may needs OpenCV 2.4.10 and VL-feat.&nbsp;</div><div><br /></div><div>b) You should check the config.txt for parameter setting.</div><div>&nbsp; &nbsp;The config.txt is consists of several lines:</div><div>&nbsp; &nbsp;line #1: Dataset Path</div><div>&nbsp; &nbsp;line #2: Mode flag(0 or 1), 0 is testing mode and 1 is training mode</div><div>&nbsp; &nbsp;line #3: The normalized height of input image</div><div>&nbsp; &nbsp;line #4: number of sliding window scales for each octave</div><div>&nbsp; &nbsp;line #5: the minimum sliding window scale, it would be 2^min_scale</div><div>&nbsp; &nbsp;line #6: the maximum sliding window scale, it would be 2^min_scale</div><div>&nbsp; &nbsp;line #7: Only for training stage. This parameter indicate an absolute distance.&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> &nbsp; &nbsp;Pixels whose distance greater than this distance are regard as negative samples.</div><div>&nbsp; &nbsp;line #8: Only for training stage. This parameter indicate an relative distance(relative to the height of ground truth, Eg: if the height of ground truth is 10 and the paprameter is 0.2, the distance is 2).&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> &nbsp; &nbsp;Pixels whose distance less than this distance are regard as positive samples</div><div>&nbsp; &nbsp;line #9: Only for training stage. The maximum negative samples in training stage.</div><div>&nbsp; &nbsp;line #10: Only for training stage. The maximum positive samples in training stage.</div><div>&nbsp; &nbsp;line #11: the bin number of lab channel</div><div>&nbsp; &nbsp;line #12: the bin number of gradient channel</div><div>&nbsp; &nbsp;line #13: the bin number of texture channel. In current version, this parameter is fixed by 58</div><div>&nbsp; &nbsp;line #14: the angle threshold for symmetry line linkage</div><div>&nbsp; &nbsp;line #15: the core number for parallel</div><div>&nbsp; &nbsp;line #16: the shrink step, it should be 2^n</div><div><br /></div><div>&nbsp; &nbsp;and We support an example in the package. Note that the setting of config.txt(line #11 ~ line#13) should be keep consistent during training and testing.</div><div><br /></div><div>c) Prepare the dataset and create folders.</div><div>&nbsp; &nbsp;The directory structure is described as bellow:</div><div>&nbsp; &nbsp;-&gt;Dataset\</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;Annotation\&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;train\</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;Feature</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;train\</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;Images</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;train\</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;test\</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;Model</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-&gt;Result</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div>&nbsp; &nbsp; And for annotation files, each of them should contains several lines, and each line should contain 4 numbers: x, y, width, height.</div><div>&nbsp; &nbsp; For more details, please refer to the sample in the package.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div>###################################################################</div><div><br /></div><div>3. Getting Started.</div><div><br /></div><div>&nbsp;- Make sure to carefully follow the installation instructions above.</div><div>&nbsp;- Set config.txt.</div><div>&nbsp;- Run TextlineDetection.exe config.txt in command line.</div><div><br /></div><div>###################################################################</div></div><div><br /></div>