On WSL2 run:run_nerf.py issue
My env is win11+wsl2-ubuntu24.04, I can run with model-based method, but to run: run_nerf.py, I meet a lot of problem.
Anyhow, each time when Using accelerated ArrayDatatype, there has issues, search on internet, someone say it is the wsl problem, can not run pyrender with egl, so I added the os.environ['PYOPENGL_PLATFORM'] = 'osmesa' in front of run_nerf.py, and still, have you have met and solved this. Thanks.
now, the error is AttributeError: 'NoneType' object has no attribute 'glGetError'
(foundationpose) goddard@Wen:/mnt/d/000project/mypose/FoundationPose_note$ python bundlesdf/run_nerf.py --ref_view_dir /mnt/d/000project/mypose/FoundationPose_note/model_free_ref_views/ycbv/ref_views_16 --dataset ycbv Warp 1.0.2 initialized: CUDA Toolkit 11.5, Driver 12.6 Devices: "cpu" : "x86_64" "cuda:0" : "NVIDIA GeForce RTX 4070 Ti SUPER" (16 GiB, sm_89, mempool enabled) Kernel cache: /home/goddard/.cache/warp/1.0.2 /mnt/d/000project/mypose/FoundationPose_note/bundlesdf/run_nerf.py:67: DeprecationWarning: Starting with ImageIO v3 the behavior of this function will switch to that of iio.v3.imread. To keep the current behavior (and make this warning disappear) use import imageio.v2 as imageioor callimageio.v2.imread` directly.
rgb = imageio.imread(color_file)
[compute_scene_bounds()] compute_scene_bounds_worker start
[compute_scene_bounds()] compute_scene_bounds_worker done
[compute_scene_bounds()] merge pcd
[compute_scene_bounds()] compute_translation_scales done
translation_cvcam=[ 0.00114478 0.00392944 -0.00655522], sc_factor=11.946805208886905
[build_octree()] Octree voxel dilate_radius:1
[init()] level:0, vox_pts:torch.Size([1, 3]), corner_pts:torch.Size([8, 3])
[init()] level:1, vox_pts:torch.Size([8, 3]), corner_pts:torch.Size([27, 3])
[init()] level:2, vox_pts:torch.Size([64, 3]), corner_pts:torch.Size([125, 3])
[init()] level:3, vox_pts:torch.Size([480, 3]), corner_pts:torch.Size([693, 3])
[draw()] level:3
[draw()] level:3
level 0, resolution: 32
level 1, resolution: 39
level 2, resolution: 47
level 3, resolution: 56
level 4, resolution: 68
level 5, resolution: 81
level 6, resolution: 98
level 7, resolution: 117
level 8, resolution: 141
level 9, resolution: 169
level 10, resolution: 204
level 11, resolution: 245
level 12, resolution: 295
level 13, resolution: 354
level 14, resolution: 426
level 15, resolution: 512
GridEncoder: input_dim=3 n_levels=16 level_dim=2 resolution=32 -> 512 per_level_scale=1.2030 params=(36112368, 2) gridtype=hash align_corners=False
sc_factor 11.946805208886905
translation [ 0.00114478 0.00392944 -0.00655522]
[init()] denoise cloud
[init()] Denoising rays based on octree cloud
[init()] bad_mask#=0
rays torch.Size([815338, 12])
[train()] train progress 0/1001
[train_loop()] Iter: 0, valid_samples: 524288/524288, valid_rays: 2048/2048, loss: 31.9741154, rgb_loss: 6.7816586, rgb0_loss: 0.0000000, fs_rgb_loss: 0.0000000, depth_loss: 0.0000000, depth_loss0: 0.0000000, fs_loss: 19.8721848, point_cloud_loss: 0.0000000, point_cloud_normal_loss: 0.0000000, sdf_loss: 5.0730171, eikonal_loss: 0.0000000, variation_loss: 0.0000000, truncation(meter): 0.0100000, pose_reg: 0.0000000, reg_features: 0.0995187,
[train()] train progress 100/1001 [train()] train progress 200/1001 [train()] train progress 300/1001 [train()] train progress 400/1001 [train()] train progress 500/1001 Saved checkpoints at /mnt/d/000project/mypose/FoundationPose_note/model_free_ref_views/ycbv/ref_views_16/ob_0000001/nerf/model_latest.pth [train_loop()] Iter: 500, valid_samples: 524032/524288, valid_rays: 2047/2048, loss: 1.6859456, rgb_loss: 0.5624812, rgb0_loss: 0.0000000, fs_rgb_loss: 0.0000000, depth_loss: 0.0000000, depth_loss0: 0.0000000, fs_loss: 0.2592853, point_cloud_loss: 0.0000000, point_cloud_normal_loss: 0.0000000, sdf_loss: 0.8382474, eikonal_loss: 0.0000000, variation_loss: 0.0000000, truncation(meter): 0.0100000, pose_reg: 0.0000000, reg_features: 0.0236973,
[extract_mesh()] query_pts:torch.Size([175616, 3]), valid:164640 [extract_mesh()] Running Marching Cubes [extract_mesh()] done V:(12948, 3), F:(25892, 3) [train()] train progress 600/1001 [train()] train progress 700/1001 [train()] train progress 800/1001 [train()] train progress 900/1001 [train()] train progress 1000/1001 Saved checkpoints at /mnt/d/000project/mypose/FoundationPose_note/model_free_ref_views/ycbv/ref_views_16/ob_0000001/nerf/model_latest.pth [train_loop()] Iter: 1000, valid_samples: 523520/524288, valid_rays: 2045/2048, loss: 1.4862849, rgb_loss: 0.3132568, rgb0_loss: 0.0000000, fs_rgb_loss: 0.0000000, depth_loss: 0.0000000, depth_loss0: 0.0000000, fs_loss: 0.3501890, point_cloud_loss: 0.0000000, point_cloud_normal_loss: 0.0000000, sdf_loss: 0.8018618, eikonal_loss: 0.0000000, variation_loss: 0.0000000, truncation(meter): 0.0100000, pose_reg: 0.0000000, reg_features: 0.0185096,
[extract_mesh()] query_pts:torch.Size([175616, 3]), valid:164640
[extract_mesh()] Running Marching Cubes
[extract_mesh()] done V:(12900, 3), F:(25796, 3)
[extract_mesh()] query_pts:torch.Size([175616, 3]), valid:164640
[extract_mesh()] Running Marching Cubes
[extract_mesh()] done V:(12900, 3), F:(25796, 3)
[
libEGL warning: failed to open /dev/dri/card0: Permission denied
libEGL warning: failed to open /dev/dri/card0: Permission denied
The XKEYBOARD keymap compiler (xkbcomp) reports:
Warning: Could not resolve keysym XF86CameraAccessEnable Warning: Could not resolve keysym XF86CameraAccessDisable Warning: Could not resolve keysym XF86CameraAccessToggle Warning: Could not resolve keysym XF86NextElement Warning: Could not resolve keysym XF86PreviousElement Warning: Could not resolve keysym XF86AutopilotEngageToggle Warning: Could not resolve keysym XF86MarkWaypoint Warning: Could not resolve keysym XF86Sos Warning: Could not resolve keysym XF86NavChart Warning: Could not resolve keysym XF86FishingChart Warning: Could not resolve keysym XF86SingleRangeRadar Warning: Could not resolve keysym XF86DualRangeRadar Warning: Could not resolve keysym XF86RadarOverlay Warning: Could not resolve keysym XF86TraditionalSonar Warning: Could not resolve keysym XF86ClearvuSonar Warning: Could not resolve keysym XF86SidevuSonar Warning: Could not resolve keysym XF86NavInfo Errors from xkbcomp are not fatal to the X server Aborted (core dumped)`
Hey, I think I solved this, I had the same issue Try installing this first pip install pyopengl==3.1.7 pyopengl-accelerate==3.1.7 Then run your script with something like PYOPENGL_PLATFORM=osmesa python bundlesdf/run_nerf.py --ref_view_dir <your_directory>/ref_views --dataset linemod
Let me know if it works for you!