GithubHelp home page GithubHelp logo

Comments (9)

jasonyux avatar jasonyux commented on July 17, 2024

what exactly did you run?

from synthtext_chinese_version.

Bourne-M avatar Bourne-M commented on July 17, 2024

感谢回复,我的环境是这样的:
certifi 2016.9.26
cycler 0.10.0
h5py 2.7.1
matplotlib 2.1.1
numpy 1.11.1
opencv-python 3.1.0.0
Pillow 5.0.0
pip 20.0.2
pygame 1.9.3
pyparsing 2.2.0
python-dateutil 2.6.1
pytz 2017.3
scipy 1.0.0
setuptools 36.4.0
six 1.11.0
subprocess32 3.5.4
wget 3.2
wheel 0.37.0

然后直接运行的:python gen.py --viz

from synthtext_chinese_version.

jasonyux avatar jasonyux commented on July 17, 2024

I think the issue is with the shape. Upon checking the code center and ij comes from:

contour,hier = cv2.findContours(mask.copy().astype('uint8'),
                                    mode=cv2.RETR_CCOMP, 
                                    method=cv2.CHAIN_APPROX_SIMPLE)
contour = [np.squeeze(c).astype('float') for c in contour]
# blablabla
center = np.array([W,H])/2
n_front = np.array([0.0,0.0,-1.0])
for i in xrange(len(contour)):
     cnt_ij = contour[i]
     xyz = su.DepthCamera.plane2xyz(center, cnt_ij, plane)

Output to those steps should be checked.

Just a brief glimpse, you are using opencv-python 3.1.0.0, but I think it needed opencv2.*. Perhaps thats where it got wrong.

Maybe try using the opencv3 branch of my forked repo. Does the same issue come up?

from synthtext_chinese_version.

Bourne-M avatar Bourne-M commented on July 17, 2024

I think the issue is with the shape. Upon checking the code center and ij comes from:

contour,hier = cv2.findContours(mask.copy().astype('uint8'),
                                    mode=cv2.RETR_CCOMP, 
                                    method=cv2.CHAIN_APPROX_SIMPLE)
contour = [np.squeeze(c).astype('float') for c in contour]
# blablabla
center = np.array([W,H])/2
n_front = np.array([0.0,0.0,-1.0])
for i in xrange(len(contour)):
     cnt_ij = contour[i]
     xyz = su.DepthCamera.plane2xyz(center, cnt_ij, plane)

Output to those steps should be checked.

Just a brief glimpse, you are using opencv-python 3.1.0.0, but I think it needed opencv2.*. Perhaps thats where it got wrong.

Maybe try using the opencv3 branch of my forked repo. Does the same issue come up?

yes ,i am using opencv3 branch

from synthtext_chinese_version.

Bourne-M avatar Bourne-M commented on July 17, 2024

may i asking how should i get pictures generated out?

from synthtext_chinese_version.

Bourne-M avatar Bourne-M commented on July 17, 2024

i have got the problem,just modify contour,hier = ... to _,contour,hier = , then it will work.
but i wondering why its always timeout while generating pictures

from synthtext_chinese_version.

jasonyux avatar jasonyux commented on July 17, 2024

Good catch. Somehow I did not specify which opencv3 version to use. I got it working previously but obviously that was also version dependent.

Upon testing I also got a signal error. I think it was a Windows thing.

Is there any specific reason why singal.SIGALRM is not working on windows? Yes, Windows OS doesn't implement that signal.

https://stackoverflow.com/questions/52779920/why-is-signal-sigalrm-not-working-in-python-on-windows

from synthtext_chinese_version.

jasonyux avatar jasonyux commented on July 17, 2024

I think at some point I switched to using CentOS 7 because some of the preprocessing also has a Linux dependency. If we want a more detailed steps on how to do preprocessing for some of your images for this repo, checkout the learning branch.

from synthtext_chinese_version.

Bourne-M avatar Bourne-M commented on July 17, 2024

I think at some point I switched to using CentOS 7 because some of the preprocessing also has a Linux dependency. If we want a more detailed steps on how to do preprocessing for some of your images for this repo, checkout the learning branch.

your repo helps a lot, thanks for your work

from synthtext_chinese_version.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.