-
Notifications
You must be signed in to change notification settings - Fork 32
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
Problem with ColoredRenderer and TexturedRenderer #1
Comments
Hi Ben, Can you try the script demo_fit_cube.py or demo_fit_teapot.py, instead? |
I can see in utils.py there is some more complicated code for setting up a TexturedRenderer which I overlooked before. Actually, I want a ColoredRenderer for my purposes but I will see if I can manipulate your existing code to work for me. Now, I'm trying the two demos you have identified. The demo_fit_cube.py example runs fine, showing three windows ("Init Cube", "GT object" and "Fitted Object") with the GT & Fitted looking pretty similar. However, with the teapot demo I obtain lots of scary error messages:
Perhaps this is Python3.6 expecting integer array sizes for the reshape rather than a float64? |
Glad the cube demo works for you. |
I have met the same error: Are there any solutions to fix this?Thansk a lot |
@benjiebob were you able to fix the error? |
@AdityaAS I ran into similar issues. This is because the newer versions of numpy does not allow the data type of indices and size arguments to be float. I don't have a permanent fix but in my case, I changed some scipy code that was calling numpy functions with indices and size arguments of float type to use int type. This is not a clean solution but serves a quick workaround. |
I have meet with the same error. File "/home/rongyu/work/smpl_dp/DCT/py3_opendr/utils/renderer.py", line 228, in render_model @benjiebob Have you fixed this bug? |
Me too, looking into it now |
I've found a solution to this bug. If you look inside the renderer.py code trying to find out why does renderer.py (1080-1088) use vbo_verts_face inside the class ColoredRenderer(BaseRenderer) if "'ColoredRenderer' object has no attribute 'vbo_verts_face'", you'll find out that it only initializes vbo_verts_face inside initGL() for BaseRenderer class. You'll also get the message "Necessary variables have not been set (frustum, f, v, or vc)." in initGL() if you don't set glMode. Also unlike mesa glfw code uses sharedWin variable before setting it, so you need to set it to None. So the solution is to set glMode, sharedWin, camera.openglMat do renderer.initGL() prior to any renderer.r calls. So you'll need lines like these prior to renderer.r:
polmorenoc, please keep this version of opendr compatible with widely used one, especially because it's not that hard to do and it's why we need your version in the first place. |
@azelk thanks for the solution! Although I'm still unable to perform the rendering on a headless server (remote ssh) via OpenGL. Tried looking up on stackoverflow with no luck. With matt loper's opendr version I was able to render easily and produce images in a jupyter notebook on the remote server. I'm unable to do that with this one. Any thoughts on this? |
@azelk could you share a working snippet of the render code that works?
|
Nice solution. Thanks. I make it work with your steps and some modification as follows.
otherwise there will be error "AttributeError: 'ColoredRenderer' object has no attribute 'vn'". |
I'm struggling with this for days and would like your help: where should I insert your code? I'm confused about renderer.r calls - I don't see any of them. If I try to insert your script at the start of opendr/renderer.py, it will return
Thank you! |
Same question, have you figured out? |
@dariogentiletti , @willie1997 , I suppose this |
I've tried the above solution but now It crashes in draw_color_image function in opendr\renderer.py
|
@erezposner |
Same question I have on Win10. Anyone can fix it? |
Hello. I have tried your solution, but it did not solve the issue. Anyone else here who was able to fix it? P.S. The demo code is failing for me as well, but with completely other error ( |
@charliememory I want to know this code need what files where line? |
The same problem |
Totally the same problem, i wonder if you have found the solution for it. |
I found 1 clue.
480 x 480 x 3 is 691,200 not equal 921600 byte That might be 2 candidate causes. |
It is clearly issue on opendr:v 0.73 |
Hi,
I've just downloaded the modern opendr library as I'm hoping to accelerate fitting SMPL to some data points. However, I'm having trouble getting the ColoredRenderer and TexturedRenderer to work properly.
For me, the demo code found in this repo at 'opendr/opendr/init.py' results in an error:
Error message:
A simpler variant of this with the ColoredRenderer also results in an error. I'm happy to post this too if needed.
Would be grateful if you could advise here.
Thanks,
Ben
The text was updated successfully, but these errors were encountered: