facebookresearch / banmo

BANMo Building Animatable 3D Neural Models from Many Casual Videos
Other
537 stars 59 forks source link

issue of "tmp/nvs-5-0-traj-all.mp4: No such file or directory" when trying pre-optimized models #54

Open zhuqr1996 opened 1 year ago

zhuqr1996 commented 1 year ago

Thank you for bringing the fascinating work! I am trying it with CUDA 113, torch 1.10 and and met some problems:

The situation arises when I tried to render novel views with the command for trying pre-optimized model: "bash scripts/render_nvs.sh 0 $seqname tmp/cat-pikachiu.pth 5 0"

It looks super similar to #16 (seen in attached figure) but the error is different . Mine is IndexError: index 0 is out of bounds for axis 0 with size 0 (also attached) which I think might be not the same reason so I have not tried to create the Version B with torch 1.7 yet.

Another situation is it said "tmp/cat-pikachiu-{5}-vgray.mp4: No such file or directory" while it exists in the doc file. But the all.mp4 is not there.

The log file is also attached.

error error2 doc file log.txt

gengshan-y commented 1 year ago

Hi, from the log you posted, the first error is

Traceback (most recent call last):
  File "/root/banmo/scripts/visualize/render_vis.py", line 538, in <module>
    main()
  File "/root/banmo/scripts/visualize/render_vis.py", line 330, in main
    r = OffscreenRenderer(img_size, img_size)
  File "/opt/conda/envs/banmo-cu113/lib/python3.9/site-packages/pyrender/offscreen.py", line 31, in __init__
    self._create()
  File "/opt/conda/envs/banmo-cu113/lib/python3.9/site-packages/pyrender/offscreen.py", line 149, in _create
    self._platform.init_context()
  File "/opt/conda/envs/banmo-cu113/lib/python3.9/site-packages/pyrender/platforms/egl.py", line 186, in init_context
    self._egl_context = eglCreateContext(
  File "/opt/conda/envs/banmo-cu113/lib/python3.9/site-packages/OpenGL/platform/baseplatform.py", line 402, in __call__
    return self( *args, **named )
  File "/opt/conda/envs/banmo-cu113/lib/python3.9/site-packages/OpenGL/error.py", line 228, in glCheckError
    raise GLError(
OpenGL.error.GLError: GLError(
        err = 12297,
        baseOperation = eglCreateContext,
        cArguments = (
                <OpenGL._opaque.EGLDisplay_pointer object at 0x7fc38720d3c0>,
                <OpenGL._opaque.EGLConfig_pointer object at 0x7fc38720d440>,
                <OpenGL._opaque.EGLContext_pointer object at 0x7fc4a2b83b40>,
                <OpenGL.arrays.lists.c_int_Array_7 object at 0x7fc4a2ca8940>,
        ),
        result = <OpenGL._opaque.EGLContext_pointer object at 0x7fc38720d9c0>
)

which is related to pyrender package. The error code is the same as this issue. You might want to try their solution and make sure

import pyrender
from pyrender import OffscreenRenderer
r = OffscreenRenderer(img_size, img_size)

runs.

zhuqr1996 commented 1 year ago

Thank you for the reply but sadly it still not work. When I tried the line of "bash scripts/render_nvs.sh 0 $seqname tmp/cat-pikachiu.pth 5 0", the mesh is not found. I checked the render_vis.py document, but the used obj files exist in the folder and I could understand why the mesh is not created. The log for this time is attached again. log2.txt

gengshan-y commented 1 year ago

Hi, the log suggests it cannot find tmp/cat-pikachiu00-mesh-00000.obj file. However, the mesh should be export to that location at this line.

I was not able to reproduce it. Perhaps you want to check whether the path matches by printing it.

zhuqr1996 commented 1 year ago

Thank you for the response. my own animal model can be perfectly generated thanks to your great work. And I wonder is the generated model able to be saved in specific document forms(namely .obj) which can later show in 3D software like Blender or Maya?

gengshan-y commented 1 year ago

Hi, I wrote some code in the past to convert banmo output (rest mesh, bone transforms and skinning weights) to .gltf/.glb format, which can be visualized in Blender or on a web viewer. Ideally, I can release it if I get some time to clean it up in the next couple of weeks.

LyndzP commented 1 year ago

@gengshan-y Hello, I appreciate you taking the time for this project. If possible, could you spare a moment to create a clean code that converts to the glTF format? This project is truly outstanding! Once again, thank you for your effort.