zju3dv / EasyVolcap

[SIGGRAPH Asia 2023 (Technical Communications)] EasyVolcap: Accelerating Neural Volumetric Video Research
Other
577 stars 41 forks source link

无法安装imgui-bundle #21

Closed rexainn closed 4 months ago

rexainn commented 5 months ago

无法安装imgui-bundle,里面有一些库必须通过github下载,而我的服务器无法翻墙。

不安装imgui-bundle的话有办法使用您的代码吗?

$cmake .. -DHELLOIMGUI_DOWNLOAD_FREETYPE_IF_NEEDED=ON

-- _him_check_if_no_backend_selected return OFF
-- HELLOIMGUI_WITH_TEST_ENGINE=ON
-- Library hello_imgui
-- _him_check_if_no_backend_selected return OFF
-- _him_check_if_no_backend_selected return [OFF]
-- HelloImGui: downloading and building freetype
[ 11%] Performing download step (git clone) for 'freetype-populate'
正克隆到 'freetype-src'...
remote: Enumerating objects: 88891, done.
remote: Counting objects: 100% (88891/88891), done.
remote: Compressing objects: 100% (15153/15153), done.
remote: Total 88891 (delta 73305), reused 88887 (delta 73304), pack-reused 0
接收对象中: 100% (88891/88891), 28.96 MiB | 2.13 MiB/s, 完成.
处理 delta 中: 100% (73305/73305), 完成.
HEAD 目前位于 920c5502c * Version 2.13.2 released. ==========================
子模组 'dlg'(https://github.com/nyorain/dlg.git)已对路径 'subprojects/dlg' 注册
正克隆到 '/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/_deps/freetype-src/subprojects/dlg'...
fatal: 无法访问 'https://github.com/nyorain/dlg.git/':Failed to connect to github.com port 443: 连接超时
fatal: 无法克隆 'https://github.com/nyorain/dlg.git' 到子模组路径 '/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/_deps/freetype-src/subprojects/dlg'
克隆 'subprojects/dlg' 失败。按计划重试
正克隆到 '/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/_deps/freetype-src/subprojects/dlg'...
fatal: 无法访问 'https://github.com/nyorain/dlg.git/':Failed to connect to github.com port 443: 连接超时
fatal: 无法克隆 'https://github.com/nyorain/dlg.git' 到子模组路径 '/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/_deps/freetype-src/subprojects/dlg'
第二次尝试克隆 'subprojects/dlg' 失败,退出
CMake Error at freetype-subbuild/freetype-populate-prefix/tmp/freetype-populate-gitclone.cmake:52 (message):
  Failed to update submodules in:
  '/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/_deps/freetype-src'

make[2]: *** [CMakeFiles/freetype-populate.dir/build.make:102:freetype-populate-prefix/src/freetype-populate-stamp/freetype-populate-download] 错误 1
make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/freetype-populate.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2

CMake Error at /home/gdp/cmake-3.21.7/Modules/FetchContent.cmake:1017 (message):
  Build step for freetype failed: 2
Call Stack (most recent call first):
  /home/gdp/cmake-3.21.7/Modules/FetchContent.cmake:1146:EVAL:2 (__FetchContent_directPopulate)
  /home/gdp/cmake-3.21.7/Modules/FetchContent.cmake:1146 (cmake_language)
  /home/gdp/cmake-3.21.7/Modules/FetchContent.cmake:1189 (FetchContent_Populate)
  external/hello_imgui/hello_imgui/hello_imgui_cmake/hello_imgui_build_lib.cmake:130 (FetchContent_MakeAvailable)
  external/hello_imgui/hello_imgui/hello_imgui_cmake/hello_imgui_build_lib.cmake:43 (_him_add_freetype_to_imgui)
  external/hello_imgui/hello_imgui/hello_imgui_cmake/hello_imgui_build_lib.cmake:819 (him_build_imgui)
  external/hello_imgui/hello_imgui/src/hello_imgui/CMakeLists.txt:26 (him_main_add_hello_imgui_library)

-- Configuring incomplete, errors occurred!
See also "/DATA/DATA1/rxy_code/projects/202312_demo/EasyVolcap/installed/imgui_bundle/build/CMakeFiles/CMakeOutput.log".
dendenxu commented 5 months ago

@rexainn imgui_bundle只有可视化gui时候会用到,如果只是在服务器上做training和test应该用不到。 如果需要在服务器上使用gui,建议先在正常环境下clone然后复制到服务器,再install from source

git clone https://github.com/pthom/imgui_bundle --recursive --depth 1
rexainn commented 5 months ago

我是按照教程进行train的时候报没有imgui-bundle,然后就一直暂停了。 evc -c configs/exps/l3mhet/l3mhet_${expname}.yaml

dendenxu commented 5 months ago

具体报错是啥呀

rexainn commented 5 months ago

No module named imgui-bundle.

然后一直pdbr,没有任何显示。好像程序也没停止。

dendenxu commented 5 months ago

可以截个图嘛,我有专门把imgui_bundle做lazy import的,讲道理用不到gui的话不会卡住。是最新的代码吗

rexainn commented 5 months ago

我忘记自己执行的是哪个命令了,我会再探索一下。因为我现在尝试执行的命令都遇到了更多的错误。所以现在不能证明是因为imgui_bundle导致的卡住。

我再执行evc -t test -c configs/exps/enerfi/enerfi_actor1_4_subseq.yaml,configs/specs/spiral.yaml,configs/specs/ibr.yaml runner_cfg.visualizer_cfg.save_tag=actor_1_4_subseq exp_name=enerfi_dtu的时候,遇到了'ImageBasedInferenceDataset' object has no attribute 'mks_bytes'这个报错。这个是为什么呢?看了之前的issue说inference enerfi是不会计算vhulls的。我使用的是您提供的数据集。 image

rexainn commented 5 months ago

By the way,请问怎么强制结束pdbr的进程。ctrl+c并不管用。

dendenxu commented 5 months ago

默认的配置文件是加载了visual hull的,因此会尝试自动加载它,加载失败会尝试从mask中重新生成,找不到mask,所以报错。command后面加上val_dataloader_cfg.dataset_cfg.use_vhulls=False可以禁用。

dendenxu commented 5 months ago

By the way,请问怎么强制结束pdbr的进程。ctrl+c并不管用。

pdbr进程是debugger界面(和ipdb,pdb一样),ctrl+d或者exit()可以退出debugger

rexainn commented 5 months ago
  1. 目前来看是不会因为imgui_bundle卡住进程的。所以使用gui与否,出来的test结果有什么区别呢?我理解的是使用gui可以自己进行视角拖动,那不使用gui出来的结果,怎么看不同视角呢?

  2. 请问您的代码是支持多gpu的吗,我在跑了85%的时候报oom了,看起来好像只用了gpu 0.

image

dendenxu commented 5 months ago
  1. 不使用gui就是通过指定intri.yml和extri.yml(也就是数据集本身的相机参数)选择用什么视角
  2. 训练代码支持多卡,渲染暂不支持。另外,渲染时候的batch size默认已经是1了。您看到的OOM应该是被别的程序挤掉了,您可以看一下volumetric_video_inference_dataset的参数,这些参数可以控制渲染分辨率以及1.中提及的视角选择。
rexainn commented 5 months ago

所以不使用gui的话是没办法看生成的新视角是吗,只能看几个本来就有的相机视角。那不使用gui,evc -t test 他的输出是什么呢?

dendenxu commented 5 months ago

所以不使用gui的话是没办法看生成的新视角是吗,只能看几个本来就有的相机视角。那不使用gui,evc -t test 他的输出是什么呢?

可以看生成的新视角,您上面的命令就是用输入视角插值获得的新视角。

rexainn commented 5 months ago

evc -t test -c configs/exps/enerfi/enerfi_actor1_4_subseq.yaml,configs/specs/spiral.yaml,configs/specs/ibr.yaml runner_cfg.visualizer_cfg.save_tag=actor_1_4_subseq exp_name=enerfi_dtu 这个嘛。噢我好像懂了,加入spiral的意思是,这行命令的输出会得到一个旋转的视频,类似于一个摄像头绕着场景拍摄。

rexainn commented 5 months ago

oom的问题,感觉可能是因为我用的cuda-11.3,我看到有warning说cuda11.6以下会有memory lead issue。

rexainn commented 5 months ago

您好,我在自己的数据上inference pretrained enerfi,效果非常差。我完全copy了actor1_4_subseq相关的yaml设置,包括config/datasets里的和config/exps里的,渲染出来的图片一片模糊。这是因为我的参数设置有问题吗?

渲染命令为:evc -t test -c configs/exps/enerfi/enerfi_rxy_demo.yaml,configs/specs/spiral.yaml,configs/specs/ibr.yaml runner_cfg.visualizer_cfg.save_tag=rxy_demo val_dataloader_cfg.dataset_cfg.use_vhulls=False exp_name=enerfi_dtu

image

rexainn commented 5 months ago

然后我尝试训练l3mnet,遇到了和https://github.com/zju3dv/EasyVolcap/issues/5 同样的问题,并且我使用的是最新的代码。

一些可能会有用的信息:

  1. 我使用的训练命令:evc -c configs/exps/l3mhet/l3mhet_rxy_demo_static.yaml
  2. 我在自己的数据集上使用,我的config如下: image image image
  3. 我的数据集组织如下: image
  4. 我使用EasyMocap官方教程完成校准,得到的extri.yml格式如下:
    %YAML:1.0
    ---
    names:
    - "0"
    - "1"
    - "2"
    - "3"
    R_0: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [1.185112, 2.048133, -1.168340]
    Rot_0: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [-0.497942, 0.867210, 0.000799, 0.440700, 0.253838, -0.861017, -0.746885, -0.428384, -0.508576]
    T_0: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [-0.776682, 0.411032, 2.955411]
    R_1: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [1.863565, 1.071371, -0.771462]
    Rot_1: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [0.447239, 0.888682, -0.101105, 0.377679, -0.290111, -0.879315, -0.810763, 0.355078, -0.465385]
    T_1: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [0.456838, 0.680403, 2.688882]
    R_2: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [1.878220, -0.945731, 0.604641]
    Rot_2: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [0.584495, -0.811098, 0.022045, -0.360424, -0.283879, -0.888542, 0.726952, 0.511403, -0.458265]
    T_2: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [-0.469080, 0.955739, 2.198139]
    R_3: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [1.066917, -2.014823, 1.178781]
    Rot_3: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [-0.521371, -0.849958, -0.075789, -0.350405, 0.294229, -0.889183, 0.778067, -0.437037, -0.451232]
    T_3: !!opencv-matrix
    rows: 3
    cols: 1
    dt: d
    data: [1.124348, 0.809849, 2.357620]

    得到的intri.yml格式如下:

    %YAML:1.0
    ---
    names:
    - "0"
    - "1"
    - "2"
    - "3"
    K_0: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [912.385071, 0.000000, 960.298584, 0.000000, 912.529724, 564.492615, 0.000000, 0.000000, 1.000000]
    dist_0: !!opencv-matrix
    rows: 1
    cols: 5
    dt: d
    data: [0.089500, -0.054108, -0.001764, 0.000978, 0.000000]
    K_1: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [905.930420, 0.000000, 956.919434, 0.000000, 905.693665, 548.938354, 0.000000, 0.000000, 1.000000]
    dist_1: !!opencv-matrix
    rows: 1
    cols: 5
    dt: d
    data: [0.060240, 0.099823, -0.003438, -0.000753, 0.000000]
    K_2: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [905.259583, 0.000000, 961.182373, 0.000000, 905.267517, 548.362976, 0.000000, 0.000000, 1.000000]
    dist_2: !!opencv-matrix
    rows: 1
    cols: 5
    dt: d
    data: [0.083334, 0.024231, 0.001883, 0.001516, 0.000000]
    K_3: !!opencv-matrix
    rows: 3
    cols: 3
    dt: d
    data: [909.149902, 0.000000, 963.841187, 0.000000, 908.906067, 545.407104, 0.000000, 0.000000, 1.000000]
    dist_3: !!opencv-matrix
    rows: 1
    cols: 5
    dt: d
    data: [0.081085, 0.029955, 0.001782, 0.000247, 0.000000]
dendenxu commented 5 months ago

您好,我在自己的数据上inference pretrained enerfi,效果非常差。我完全copy了actor1_4_subseq相关的yaml设置,包括config/datasets里的和config/exps里的,渲染出来的图片一片模糊。这是因为我的参数设置有问题吗?

渲染命令为:evc -t test -c configs/exps/enerfi/enerfi_rxy_demo.yaml,configs/specs/spiral.yaml,configs/specs/ibr.yaml runner_cfg.visualizer_cfg.save_tag=rxy_demo val_dataloader_cfg.dataset_cfg.use_vhulls=False exp_name=enerfi_dtu

image

看起来是bounding box或者near far设置的不太对,需要给定一个场景的差不多的bounding box(或者near-far,二选一)。config长这样:

dataloader_cfg:
    dataset_cfg:
        near: <YOUR_DATASET_NEAR_DISTANCE>
        far: <YOUR_DATASET_FAR_DISTANCE>
        bounds: <AABB_BOUNDING_BOX>
rexainn commented 5 months ago

可以请问一下bounds和near、far的定义吗?比如far是从校准的零点开始到画面中能拍摄到的最远地方的距离?

dendenxu commented 5 months ago

near和far就是相机到场景的最近和最远距离,nerf方法会根据这个值去sample,enerf会根据这个值去建立cost volume。

bounding box就是世界坐标系下的场景的aabb(axis-aligned bounding box),用最小和最大xyz两个位置值表示,看一下我们提供的其他config,例如neural3dv.yaml应该就能知道如何在config里写bounds和near far了。

rexainn commented 5 months ago

解决!谢谢您~看了下前几帧的结果还算合理,跑跑看看。

rexainn commented 5 months ago

想请问一下关于ratio和focal_ratio的设置,我注释掉 ratio: 0.5focal_ratio: 0.5这两行的话,渲染出来的画面是我原始画面的中间区域,而不是全部画面。我理解的ratio只是将画面降采样,导致画面缩小,但是现在为啥是类似于截取的样子。

rexainn commented 5 months ago

以及我重新测量了距离,现在对bounds的设置应该是比较合理的,在大部分角度出来的结果比较合理,但也有一些角度会出现很大的问题: image

并且用新的bounds train l3mnet,得到了和之前一模一样的数值结果,无论我怎么改bounds,l3mnet的结果都一模一样。并且result的结果图是空的,psnr_mean非常低:

{
                               'psnr_mean': 8.626252174377441,
                               'psnr_std': 0.6006441204296612,
                               'ssim_mean': 0.026457557,
                               'ssim_std': 0.0018645831,
                               'lpips_mean': 0.6900851279497147,
                               'lpips_std': 0.007156076813044536
                           }
dendenxu commented 5 months ago

enerfi的大角度可能是因为确实没有view能观测到那个位置,gui有bounding box的可视化功能,可以打开看看有没有啥异常。

l3mhet的问题可能得待我过几天(2号)debug一下,bound写对了还是不收敛的话看起来像是我哪里写了bug。敢问能否提供个单帧的sample数据集?可以通过邮件发我

rexainn commented 4 months ago

已邮件发送,麻烦了~

rexainn commented 4 months ago

请问有什么进展吗?

dendenxu commented 4 months ago

@rexainn 你好,看起来是是数据量太少了。4张图NGP训练不出来也是正常的(enerfi能输出一些合理的结果已经是奇迹了)。如果数据限制只能用4个视角,建议看一下利用human prior的工作(AniNeRF,AniSDF等)。