gaussian-splatting icon indicating copy to clipboard operation
gaussian-splatting copied to clipboard

Unable to compute metrics for model output/lego

Open yangqinhui0423 opened this issue 1 year ago • 9 comments

Hello,everyone! I trained it on the NeRF-synthetic dataset, and it worked, and it rendered. But when I run python metrics.py -m output/lego, I get an error saying Unable to compute metrics for model output/lego. 1 2

Has anyone encountered a similar problem and knew how to solve it? PS:I was able to compute metrics on the Mip-NeRF360 dataset after colmap.

yangqinhui0423 avatar Nov 18 '23 10:11 yangqinhui0423

same issue.

RetroFuturism7 avatar Jan 05 '24 07:01 RetroFuturism7

I made a simple change, please see #632.

curious-energy avatar Jan 24 '24 08:01 curious-energy

I made a simple change, please see #632.

and another reason is VRAM OOM when the progress bar is interrupted.

curious-energy avatar Jan 24 '24 12:01 curious-energy

I made a simple change, please see #632.

I have solved the problem of 'Unable to compute metrics for model ' by 'pip install torchmetrics', although don't know why, but it does work well. Now I can obtain the metrics.

LakeofRain avatar Jan 25 '24 07:01 LakeofRain

Same problem here metrics.py does not work. Tried to install torchmetrics but:

  • No improvements with pip install
  • And the conda install of torchmetrics is messing with my conda environment

This is what I have after a full metrics evaluation : image All of the metrics are NaN ...

Sometimes it also crashes :

Traceback (most recent call last):
  File "/home/hleblond/Bureau/PhD/Depth_3DGS/metrics.py", line 150, in <module>
    evaluate(args.model_paths)
  File "/home/hleblond/Bureau/PhD/Depth_3DGS/metrics.py", line 116, in evaluate
    lpipss.append(lpips(renders[idx], gts[idx], net_type='vgg'))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/Bureau/PhD/Depth_3DGS/lpipsPyTorch/__init__.py", line 20, in lpips
    criterion = LPIPS(net_type, version).to(device)
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/Bureau/PhD/Depth_3DGS/lpipsPyTorch/modules/lpips.py", line 28, in __init__
    self.lin.load_state_dict(get_state_dict(net_type, version))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/Bureau/PhD/Depth_3DGS/lpipsPyTorch/modules/utils.py", line 17, in get_state_dict
    old_state_dict = torch.hub.load_state_dict_from_url(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/anaconda3/envs/GS/lib/python3.11/site-packages/torch/hub.py", line 770, in load_state_dict_from_url
    return torch.load(cached_file, map_location=map_location, weights_only=weights_only)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/anaconda3/envs/GS/lib/python3.11/site-packages/torch/serialization.py", line 1028, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hleblond/anaconda3/envs/GS/lib/python3.11/site-packages/torch/serialization.py", line 1264, in _legacy_load
    typed_storage._untyped_storage._set_from_file(
RuntimeError: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

leblond14u avatar Mar 25 '24 14:03 leblond14u

我做了一个简单的更改,请参阅#632。

你好请问你是怎么解决的

shenqianxiang avatar Jun 26 '24 14:06 shenqianxiang

同样的问题。

你解决了吗

shenqianxiang avatar Jun 26 '24 15:06 shenqianxiang

我是因为torchvision版本不对,算lpips时vgg网络没下载下来。发自我的荣耀手机-------- 原始邮件 --------发件人: shenqianxiang @.>日期: 2024年6月26日周三 23:07收件人: graphdeco-inria/gaussian-splatting @.>抄送: LakeofRain @.>, Comment @.>主 题: Re: [graphdeco-inria/gaussian-splatting] Unable to compute metrics for model output/lego (Issue #481)

同样的问题。

你解决了吗

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

LakeofRain avatar Jun 26 '24 15:06 LakeofRain

I re-found a new environment on my computer with the torch package, ran pip install torchmetrics and re-executed python metrics.py -m “/home/xiu/Learning/gaussian-splatting/output/train” and was able to output the following results:

# Metric evaluation progress: 100%|█████████████████████████████████████████████████████████████████████████| 38/38 [00:39<00:00, 1.05 s/it]
# here
# SSIM : 0.8076466
# PSNR : 21.7869835
# LPIPS: 0.2143032

biter0088 avatar Sep 05 '24 17:09 biter0088