KeyuWu-CS / MonoHair

Code of MonoHair: High-Fidelity Hair Modeling from a Monocular Video
Other
100 stars 4 forks source link

Unable to load material #3

Open KreBicycle opened 4 months ago

KreBicycle commented 4 months ago

Found error while running prepare_data.py

unable to load materials from: ./bust_long_c.obj.mtl unable to load materials from: ./bust_long_c.obj.mtl unable to load materials from: material.mtl unable to load materials from: ./bust_long_c.obj.mtl Traceback (most recent call last): File "/opt/data/private/chy/workspace/MonoHair/prepare_data.py", line 169, in <module> render_bust_hair_depth(os.path.join(root,'ours/colmap_points.obj'), camera_path, save_root,bust_path=bust_path,Headless=Headless) File "/opt/data/private/chy/workspace/MonoHair/Utils/Render_utils.py", line 321, in render_bust_hair_depth Render = Renderer(camera, Width=image_size[1], Height=image_size[0], Headless=Headless) File "/opt/data/private/chy/workspace/MonoHair/Utils/Render_utils.py", line 217, in init self.ctx = moderngl.create_context(standalone=True, backend='egl', libgl='libGL.so.1', File "/root/miniconda3/envs/MonoHair/lib/python3.10/site-packages/moderngl/init.py", line 1936, in create_context ctx.mglo, ctx.version_code = mgl.create_context(glversion=require, mode=mode, **settings) File "/root/miniconda3/envs/MonoHair/lib/python3.10/site-packages/glcontext/init.py", line 120, in create return egl.create_context(**kwargs) Exception: requested device index 0, but found 0 devices

I thought it may be short of GPU, but I found nothing wrong. So I think maybe the error came from bust_long_c.obj.mtl, and I didn't find this file. There is only a similar bust_long.obj in directory Bust. I followed readme to install the repository, but I only downloaded processed_data. Did I miss anyting?

s58vshar commented 4 months ago

I ran into same issue but I copied the files from provided data in One Drive folder.

KreBicycle commented 4 months ago

I ran into same issue but I copied the files from provided data in One Drive folder.

You mean I should download the "full" folder?

KeyuWu-CS commented 4 months ago

We don't use .tml file. And this issue maybe because the headless rendering. If you use windows with a display, you shouldn't have this problem. If you use Linux, you should refer to the headless rendering with moderngl. @KreBicycle

KreBicycle commented 4 months ago

We don't use .tml file. And this issue maybe because the headless rendering. If you use windows with a display, you shouldn't have this problem. If you use Linux, you should refer to the headless rendering with moderngl. @KreBicycle

But I didn't launch any headless rendering, just executed the script of prepare_data which is on your provided data. I don't think there is anything to do with headless rendering in my view. Is there anything wrong?

KeyuWu-CS commented 4 months ago

In prepare_data.py. We render depth using moderngl. It's a kind of headless rendering. If you download our full data, you can skip data prepare stage, just using our rendered depth maps.

KeyuWu-CS commented 4 months ago

@KreBicycle You also can try to use Windows with display to render depth, and execute the rest steps with Linux

0mil commented 4 months ago

We don't use .tml file. And this issue maybe because the headless rendering. If you use windows with a display, you shouldn't have this problem. If you use Linux, you should refer to the headless rendering with moderngl. @KreBicycle

@KreBicycle This way works well for me. I also ran this project on Linux(specifically docker with cuda:11.3.1-cudnn8-devel-ubuntu20.04 image).