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

Test Pretrained model: Example Error #3

Open
tianyaoZhang opened this issue Oct 7, 2020 · 6 comments
Open

Test Pretrained model: Example Error #3

tianyaoZhang opened this issue Oct 7, 2020 · 6 comments

Comments

@tianyaoZhang
Copy link

I have followed the instruction and established the environment successfully.
When I run the command PYOPENGL_PLATFORM=egl PYTHONPATH='.' python executables/rgb/resnet50/rgb_waypoint_trainer.py test --job-dir reproduce_LB_WayptNavResults --params params/rgb_trainer/reproduce_LB_WayPtNav_results/rgb_waypoint_trainer_finetune_params.py -d 0
I got an Error:

ERROR:root:Loading building from obj file: /media/omnisky/zty_Passport/Data/LB-WayPtNav/LB_WayPtNav_Data_Public/stanford_building_parser_dataset/mesh/area1/5acd38aa86ea42028a265d20947754f5.obj
ERROR:root:#Meshes: 195
WARNING:OpenGL.arrays.numpymodule:Unable to load numpy_formathandler accelerator from OpenGL_accelerate
Terminated

some times I also got results:

ERROR:root:Loading building from obj file: /media/omnisky/zty_Passport/Data/LB-WayPtNav/LB_WayPtNav_Data_Public/stanford_building_parser_dataset/mesh/area1/5acd38aa86ea42028a265d20947754f5.obj
ERROR:root:#Meshes: 195
WARNING:OpenGL.arrays.numpymodule:Unable to load numpy_formathandler accelerator from OpenGL_accelerate
Exception ignored in: <bound method SwiftshaderRenderer.del of <mp_env.render.swiftshader_renderer.SwiftshaderRenderer object at 0x7f30c01b7b38>>
Traceback (most recent call last):
File "/media/omnisky/zty_Passport/Data/LB-WayPtNav/Visual-Navigation-Release/mp_env/render/swiftshader_renderer.py", line 499, in del
File "/media/omnisky/zty_Passport/Data/LB-WayPtNav/Visual-Navigation-Release/mp_env/render/swiftshader_renderer.py", line 495, in clear_scene
File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.call (src/latebind.c:989)
File "wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.call (src/wrapper.c:6439)
File "/home/omnisky/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 401, in call
File "/home/omnisky/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 381, in load
ImportError: sys.meta_path is None, Python is likely shutting down

environment :

  • Ubuntu 16.04
  • tensorflow-gpu 1.10.1
  • cuda 9.0
  • cudnn 7.6.5
  • other requirement is satisfied with the environment.yml.

I have tried running under CPU only mode, but failed.
What should I do next?

@Summerdown111
Copy link

So do I, and when I execute the following command: [PYOPENGL_PLATFORM=egl PYTHONPATH='.' python executables/run_all_tests.py.] for testing, the above error also appears.
The configuration environment is the same as yours.

@vtolani95
Copy link
Collaborator

Thank you for your interest in our work!

As discussed in this resolved GitHub issue the "error" you mentioned is expected to print (we have the same error message print on our end as well). It is a sign of the code working correctly- if you navigate to the session directory for the test you ran, you should see a complete set of plots, metrics, etc. from the test running successfully.

With regards to running your code on CPU, this codebase must be run on a machine with a GPU for the image rendering engine to work.

@Summerdown111
Copy link

Thank you for your reply.

I know that the error is a sign that code works correctly.But when I run your test file executables/run_all_tests.py, every time I use the Visual-Navigation-Release-master/mp_env/render/swiftshader_renderer.py script, I get this result,such as:

Running test test_obstacle_map.py ERROR:root:Loading building from obj file: PATH/TO/LB_WayPtNav_Data/stanford_building_parser_dataset/mesh/area3/41a8012778ff4fc1800a7794bd15d81e.obj ERROR:root:#Meshes: 90 Exception ignored in: <bound method Shape.__del__ of <mp_env.render.swiftshader_renderer.Shape object at 0x7fa83855e550>> Traceback (most recent call last): File "/home/lzf/文档/Visual-Navigation-Release-master/mp_env/render/swiftshader_renderer.py", line 157, in __del__ File "/home/lzf/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/pyassimp/core.py", line 351, in release ImportError: sys.meta_path is None, Python is likely shutting down Execution time for test test_obstacle_map.py is 15 seconds.
This ImportError bothers me.So I think it may be that there is something wrong with the dataset itself during the download process. In fact, I don't know exactly why.

@vtolani95
Copy link
Collaborator

Hello,

These lines print out on our end as well, when the script executes as expected. It is an issue that occurs at the end of script execution (after all tests, plots are created, metrics are computed, etc.). If you run "run_all_tests.py" and receive no assertion errors that means your code is working correctly.

You can try running this particular test "PYTHONPATH='.' python tests/test_obstacle_map.py" and change visualize=True in this line. If you see a plot, your code has certainly worked.

@Summerdown111
Copy link

I have changed visualize=True in this line,but I get such errors:

Running test test_obstacle_map.py
ERROR:root:Loading building from obj file: PATH/TO/LB_WayPtNav_Data/stanford_building_parser_dataset/mesh/area3/41a8012778ff4fc1800a7794bd15d81e.obj
ERROR:root:#Meshes: 90
Traceback (most recent call last):
File "/home/lzf/文档/Visual-Navigation-Release-master/tests/test_obstacle_map.py", line 91, in
test_sbpd_map(visualize=True)
File "/home/lzf/文档/Visual-Navigation-Release-master/tests/test_obstacle_map.py", line 77, in test_sbpd_map
occupancy_grid_nn = obstacle_map.create_occupancy_grid()
**_TypeError: create_occupancy_grid() missing 1 required positional argument: 'pos_n3'_**

Exception ignored in: <bound method Shape.del of <mp_env.render.swiftshader_renderer.Shape object at 0x7f912559a5c0>>
Traceback (most recent call last):
File "/home/lzf/文档/Visual-Navigation-Release-master/mp_env/render/swiftshader_renderer.py", line 157, in del
File "/home/lzf/anaconda3/envs/venv-mpc/lib/python3.6/site-packages/pyassimp/core.py", line 351, in release
ImportError: sys.meta_path is None, Python is likely shutting down
Execution time for test test_obstacle_map.py is 14 seconds.

@kevin-thankyou-lin
Copy link

Hi Varun! I'm getting the same error here and it looks like the thing we're trying to visualize isn't implemented?

Setting visualize to true, I get here:

 `if visualize:
    occupancy_grid_nn = obstacle_map.create_occupancy_grid()

    fig = plt.figure()
    ax = fig.add_subplot(121)
    obstacle_map.render(ax)

    ax = fig.add_subplot(122)
    ax.imshow(occupancy_grid_nn, cmap='gray', origin='lower')
    ax.set_axis_off()
    plt.show()`

Then, if I arbitrarily pass in an argument, I get to this function:

`@staticmethod
def create_occupancy_grid(pos_n3, **kwargs):
    """
    Create egocentric occupancy grids at the positions
    in pos_n3.
    """
    raise NotImplementedError`

Do you know what occupancy_grid_nn was meant to be for visualization purposes?

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

4 participants