YuliangXiu/ICON

A question about data-processing

Closed this issue · 4 comments

Hello, authors! Thanks for your excellent work.
I met a problem when I follow the dataset.md.(the old version)
When I run "bash scripts/render_batch.sh debug all", I succeed. But then I run "bash scripts/vis_batch.sh debug all" and I meet error as follows:
thuman2 START----------
Debug visibility
Visibility thuman2 0499
Traceback (most recent call last):
File "scripts/vis_single.py", line 1, in
from lib.dataset.mesh_util import projection, load_calib, get_visibility
ModuleNotFoundError: No module named 'lib'
thuman2 [END----------]

I met similar error when running "bash scripts/render_batch.sh debug all" before and solve it through issue60

Then I skip it and turn to run "bash scripts/render_batch.sh gen all". But I met "out of memory" error as follows:

**thuman2 START----------
processing all the subjects
D3D12: Removing Device.
Traceback (most recent call last):
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ciciyang/code/ICON/scripts/render_single.py", line 187, in <module>
    opengl_util.render_result(rndr, 0, os.path.join(save_folder, subject, 'render', f'{y:03d}.png'))
  File "/home/ciciyang/code/ICON/lib/renderer/opengl_util.py", line 30, in render_result
    cam_render = rndr.get_color(shader_id)
  File "/home/ciciyang/code/ICON/lib/renderer/gl/render.py", line 301, in get_color
    data = glReadPixels(0, 0, self.width, self.height, GL_RGBA, GL_FLOAT, outputType=None)
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/site-packages/OpenGL/GL/images.py", line 370, in glReadPixels
    GL_1_1.glReadPixels(
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
        err = 1285,
        description = b'out of memory',
        baseOperation = glReadPixels,
        cArguments = (
                0,
                0,
                512,
                512,
                GL_RGBA,
                GL_FLOAT,
                array([[[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.],
        ...,
        [0., 0., 0., 0.],
...,
        )
)
D3D12: Removing Device.
Traceback (most recent call last):
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ciciyang/code/ICON/scripts/render_single.py", line 187, in <module>
    opengl_util.render_result(rndr, 0, os.path.join(save_folder, subject, 'render', f'{y:03d}.png'))
  File "/home/ciciyang/code/ICON/lib/renderer/opengl_util.py", line 30, in render_result
    cam_render = rndr.get_color(shader_id)
  File "/home/ciciyang/code/ICON/lib/renderer/gl/render.py", line 301, in get_color
    data = glReadPixels(0, 0, self.width, self.height, GL_RGBA, GL_FLOAT, outputType=None)
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/site-packages/OpenGL/GL/images.py", line 370, in glReadPixels
    GL_1_1.glReadPixels(
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
        err = 1285,
        description = b'out of memory',
        baseOperation = glReadPixels,
        cArguments = (
                0,
                0,
                512,
                512,
                GL_RGBA,
                GL_FLOAT,
                array([[[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.],
        ...,
        [0., 0., 0., 0.],
...,
        )
)
D3D12: Removing Device.
Traceback (most recent call last):
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ciciyang/code/ICON/scripts/render_single.py", line 187, in <module>
    opengl_util.render_result(rndr, 0, os.path.join(save_folder, subject, 'render', f'{y:03d}.png'))
  File "/home/ciciyang/code/ICON/lib/renderer/opengl_util.py", line 30, in render_result
    cam_render = rndr.get_color(shader_id)
  File "/home/ciciyang/code/ICON/lib/renderer/gl/render.py", line 301, in get_color
    data = glReadPixels(0, 0, self.width, self.height, GL_RGBA, GL_FLOAT, outputType=None)
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/site-packages/OpenGL/GL/images.py", line 370, in glReadPixels
    GL_1_1.glReadPixels(
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
D3D12: Removing Device.
OpenGL.error.GLError: GLError(
        err = 1285,
        description = b'out of memory',
        baseOperation = glReadPixels,
        cArguments = (
                0,
                0,
                512,
                512,
                GL_RGBA,
                GL_FLOAT,
                array([[[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.],
        ...,
        [0., 0., 0., 0.],
...,
        )
)
Traceback (most recent call last):
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ciciyang/code/ICON/scripts/render_single.py", line 219, in <module>
    opengl_util.render_result(
  File "/home/ciciyang/code/ICON/lib/renderer/opengl_util.py", line 30, in render_result
    cam_render = rndr.get_color(shader_id)
  File "/home/ciciyang/code/ICON/lib/renderer/gl/render.py", line 301, in get_color
    data = glReadPixels(0, 0, self.width, self.height, GL_RGBA, GL_FLOAT, outputType=None)
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/site-packages/OpenGL/GL/images.py", line 370, in glReadPixels
    GL_1_1.glReadPixels(
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
        err = 1285,
        description = b'out of memory',
        baseOperation = glReadPixels,
        cArguments = (
                0,
                0,
                512,
                512,
                GL_RGBA,
                GL_FLOAT,
                array([[[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.],
        ...,
        [0., 0., 0., 0.],
...,
        )
)
D3D12: Removing Device.
Traceback (most recent call last):
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ciciyang/code/ICON/scripts/render_single.py", line 219, in <module>
    opengl_util.render_result(
  File "/home/ciciyang/code/ICON/lib/renderer/opengl_util.py", line 30, in render_result
    cam_render = rndr.get_color(shader_id)
  File "/home/ciciyang/code/ICON/lib/renderer/gl/render.py", line 301, in get_color
    data = glReadPixels(0, 0, self.width, self.height, GL_RGBA, GL_FLOAT, outputType=None)
  File "/home/ciciyang/miniconda3/envs/icon/lib/python3.8/site-packages/OpenGL/GL/images.py", line 370, in glReadPixels
    GL_1_1.glReadPixels(
  File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
        err = 1285,
        description = b'out of memory',
        baseOperation = glReadPixels,
        cArguments = (
                0,
                0,
                512,
                512,
                GL_RGBA,
                GL_FLOAT,
                array([[[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.],
        ...,
        [0., 0., 0., 0.],
...,
        )
)
xargs: python: terminated by signal 11
xargs: python: terminated by signal 11
thuman2 END----------**

I follow issue137 and change NUM_THREADS to 4,it seems doesn't work and the error is as follows:

**thuman2 START----------
processing all the subjects
xargs: python: terminated by signal 9
xargs: python: terminated by signal 9
thuman2 END----------**

Then I checked "log/render/thuman2-{num_views}-{size}-{part}.txt". It seems it is stuck.
image

@yangqinhui0423 It would be helpful if you could share some hints here, thanks :)