Skip to content

Possible bug in render_pipeline/render_model_views.py #5

@cache-tlb

Description

@cache-tlb

I'm trying to following the instructions in README.md and in section Off-the-shelf Viewpoint Estimator I can get the correct output as in ref_output/est-view.txt shows when I run run_demo.py, which is 228 11 8.

However, when I run run_visualize_3dview.py, the generated image aeroplane_in_estimated_view.png is different with the reference image, as shown below. The pitch angle differs a lot.
aeroplane_in_estimated_view

I'm using 64bit Linux and blender 2.71 as the instruction says. I execute the output command that calls blender, which looks like
/usr/local/blender/blender /home/ZZ/RenderForCNN-master/render_pipeline/blank.blend --background --python /home/ZZ/RenderForCNN-master/render_pipeline/render_model_views.py -- /home/ZZ/RenderForCNN-master/demo_render/sample_model2/model.obj xxx xxx ./view.txt .. This produces the same result. (Of course I make a fake view.txt in that folder whose content is 228.0 11.0 8.0 1.0.)
I think there may be something wrong with the blender file render_pipeline/render_model_views.py.
I notice in this file, line 209 writes
theta_deg = (-1*theta_deg)%360
and line 198 writes
q2 = camRotQuaternion(cx, cy, cz, theta_deg).
I change the line 198 to
q2 = camRotQuaternion(cx, cy, cz, -1*theta_deg)
and get the correct result. Could you please check it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions