Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download link in gen.py not working #1

Closed
ihph opened this issue Oct 7, 2016 · 7 comments
Closed

Download link in gen.py not working #1

ihph opened this issue Oct 7, 2016 · 7 comments

Comments

@ihph
Copy link

ihph commented Oct 7, 2016

  1. Hello, I am having trouble creating my own data set. The link to example data seems to be no longer working...
    DATA_URL = 'http://www.robots.ox.ac.uk/~ankush/data.tar.gz'

  2. Question related to the textspotter demo http://zeus.robots.ox.ac.uk/textspot/
    Is this demo using your "FCRNall + multi-filt" model ? Is the code for this model available ?

Thank you

@ankush-me
Copy link
Owner

ankush-me commented Oct 7, 2016

  1. I'm able to download the file locally. It could be that the server is blocking your requests.
    I've uploaded it to Google Drive here:
    https://drive.google.com/open?id=0B6vslVxoQlvIZXZqYWFSc0htMVU
  2. The demo is using a variant. The code is not available yet.

@ihph
Copy link
Author

ihph commented Oct 7, 2016

OK The link you posted in your reply works - I got the data...
Nice work by the way and thank you for open-sourcing !

( another off-topic question: Have you compared your approach to (Text Flow: A Unified Text Detection System in Natural Scene Images : Shangxuan Tian, Yifeng Pan, Chang Huang, Shijian Lu, Kai Yu, Chew Lim Tan
https://arxiv.org/abs/1604.06877 - I'm trying to choose which one to reproduce... )

Re-read the papers..you get better recall and they get better precision, but end up with f = 80.25 in icdar2013 - I'll try to reproduce your approach thx

@ankush-me
Copy link
Owner

Great. Thank you!

@JcmeLs
Copy link

JcmeLs commented Mar 7, 2017

@ankush-me Hello,I download data from Google Drive.But when i run gen.py,it have TypeError:

2017-03-07 15:37:11.706 Python[71212:46633970] 15:37:11.706 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
0 of 4
Traceback (most recent call last):
  File "/Users/liba/Downloads/SynthText-master/synthgen.py", line 616, in render_text
    regions = self.filter_for_placement(xyz,seg,regions)
  File "/Users/liba/Downloads/SynthText-master/synthgen.py", line 392, in filter_for_placement
    res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
  File "/Users/liba/Downloads/SynthText-master/synthgen.py", line 259, in get_text_placement_mask
    place_mask = 255*np.ones((np.ceil(COL)+pad,np.ceil(ROW)+pad),'uint8')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/numeric.py", line 192, in ones
    a = empty(shape, dtype, order)
TypeError: 'numpy.float64' object cannot be interpreted as an index  

I don't know how to fix it.Can you help me ?
Thanke you

@ankush-me
Copy link
Owner

It seems that the update to NumPy breaks indexing by floats.
You just need to cast the floats (change line 259 in synthgen.py to the following):

place_mask = 255*np.ones((int(np.ceil(COL))+pad,int(np.ceil(ROW))+pad),'uint8')

@JcmeLs
Copy link

JcmeLs commented Mar 8, 2017

@ankush-me Thanks,it can work now.And if want to create my own data set,I must do that:

  1. Use depth-from-single image ConvNets to create depth image
  2. Use Holistic Edge Detection to create segmentation image
  3. Use h5py to save to dset.h5

is it?

@ankush-me
Copy link
Owner

Yes, correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants