NVlabs / BundleSDF

[CVPR 2023] BundleSDF: Neural 6-DoF Tracking and 3D Reconstruction of Unknown Objects
https://bundlesdf.github.io/
Other
1.07k stars 118 forks source link

[Missing code] TypeError: extract_mesh() got an unexpected keyword argument 'mesh_savepath' + cp: cannot stat '/home/mona/BundleSDF/out_dir///nerf_with_bundletrack_online/image_step_*.png': No such file or directory #11

Closed monajalal closed 1 year ago

monajalal commented 1 year ago

I get this error after a very long time of running the command below:

(py38) root@ard-gpu-01:/home/mona/BundleSDF# python run_custom.py --mode run_video --video_dir /milk/2022-11-18-15-10-24_milk/ --out_folder  /home/mona/BundleSDF/out_dir/ --use_segmenter 1 --use_gui 0 --debug_level 2

[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20003996789455414 0.9956958889961243
[loftr_wrapper.py] pair_ids (3955,)
[loftr_wrapper.py] corres: (3955, 5)
[2023-06-22 21:42:48.881] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813029097767458 #inliers=362, #prev 478
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813030780872835 #inliers=260, #prev 363
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813031103320518 #inliers=213, #prev 348
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813031206709461 #inliers=135, #prev 286
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813031312962221 #inliers=96, #prev 212
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813031440876626 #inliers=72, #prev 167
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813096288462014 #inliers=99, #prev 233
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813096410030625 #inliers=177, #prev 311
[2023-06-22 21:42:48.903] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100776735992 1668813098026872389 #inliers=468, #prev 555
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096288462014 1668813096410030625 1668813098026872389 1668813100776735992
[2023-06-22 21:42:48.914] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=2951
global_corres=2951
maxNumResiduals / maxNumberOfImages = 218951 / 10 = 21895
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 1882 = 18820
m_solver->solve Time difference = 18.742[ms]
[2023-06-22 21:42:48.941] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:48.941] [warning] [Bundler.cpp:302] frame 1668813100776735992 not selected as keyframe since its rot diff with frame 1668813029401587544 is 3.97335 deg
[bundlesdf.py] processNewFrame done 1668813100776735992
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:48.943] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:48.987] [warning] [Bundler.cpp:1110] saveNewframeResult done
[bundlesdf.py] percentile denoise start
[bundlesdf.py] percentile denoise done
[bundlesdf.py] processNewFrame start 1668813100836743914
[bundlesdf.py] process frame 1668813100836743914
[bundlesdf.py] frame_pairs: 1
[loftr_wrapper.py] image0: torch.Size([1, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20095773041248322 0.992491602897644
[loftr_wrapper.py] pair_ids (959,)
[loftr_wrapper.py] corres: (959, 5)
[2023-06-22 21:42:49.061] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=1
[2023-06-22 21:42:49.063] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813100776735992 #inliers=458, #prev 681
[bundlesdf.py] frame 1668813100836743914 pose update before
[[ 0.489 -0.622  0.612 -0.378]
 [ 0.756  0.652  0.059 -0.184]
 [-0.436  0.434  0.789 -0.421]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:49.065] [warning] [FeatureManager.cpp:1095] procrustesByCorrespondence err per point between 1668813100836743914 and 1668813100776735992: 0.000207816
[bundlesdf.py] frame 1668813100836743914 pose update after
[[ 0.493 -0.648  0.581 -0.363]
 [ 0.757  0.648  0.08  -0.196]
 [-0.428  0.4    0.81  -0.433]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:49.066] [warning] [Bundler.cpp:67] forgetting frame 1668813100443517728
[2023-06-22 21:42:49.066] [warning] [FeatureManager.cpp:469] forgetting frame 1668813100443517728
[bundlesdf.py] exceed window size, forget frame 1668813100443517728
[2023-06-22 21:42:49.072] [warning] [Bundler.cpp:435] total keyframes=328, want to select 10
[2023-06-22 21:42:49.113] [warning] [Bundler.cpp:516] ids#=328, max_BA_frames-frames.size()=9
[2023-06-22 21:42:49.113] [warning] [Bundler.cpp:525] frames#=10
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813029097767458 visible=0.930067
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813029097767458) into pairs
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813030780872835 visible=0.96094
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813030780872835) into pairs
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813031103320518 visible=0.973557
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813031103320518) into pairs
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813031206709461 visible=0.971409
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813031206709461) into pairs
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813031312962221 visible=0.955168
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813031312962221) into pairs
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813031440876626 visible=0.918121
[2023-06-22 21:42:49.114] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813031440876626) into pairs
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813096410030625 visible=0.913691
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813096410030625) into pairs
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813097558079071 visible=0.914228
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813097558079071) into pairs
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:793] frame 1668813100836743914 and 1668813098026872389 visible=0.92953
[2023-06-22 21:42:49.115] [warning] [Bundler.cpp:802] add frame (1668813100836743914, 1668813098026872389) into pairs
[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.2000865936279297 0.9870913028717041
[loftr_wrapper.py] pair_ids (4228,)
[loftr_wrapper.py] corres: (4228, 5)
[2023-06-22 21:42:49.487] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813029097767458 #inliers=317, #prev 506
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813030780872835 #inliers=210, #prev 354
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813031103320518 #inliers=186, #prev 365
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813031206709461 #inliers=124, #prev 258
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813031312962221 #inliers=91, #prev 216
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813031440876626 #inliers=87, #prev 170
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813096410030625 #inliers=149, #prev 307
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813097558079071 #inliers=349, #prev 476
[2023-06-22 21:42:49.509] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100836743914 1668813098026872389 #inliers=395, #prev 556
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096410030625 1668813097558079071 1668813098026872389 1668813100836743914
[2023-06-22 21:42:49.519] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=2373
global_corres=2373
maxNumResiduals / maxNumberOfImages = 218373 / 10 = 21837
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 1908 = 19080
m_solver->solve Time difference = 19.08[ms]
[2023-06-22 21:42:49.546] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:49.546] [warning] [Bundler.cpp:302] frame 1668813100836743914 not selected as keyframe since its rot diff with frame 1668813029401587544 is 3.03215 deg
[bundlesdf.py] processNewFrame done 1668813100836743914
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:49.547] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:49.591] [warning] [Bundler.cpp:1110] saveNewframeResult done
[bundlesdf.py] percentile denoise start
[bundlesdf.py] percentile denoise done
[bundlesdf.py] processNewFrame start 1668813100906891623
[bundlesdf.py] process frame 1668813100906891623
[bundlesdf.py] frame_pairs: 1
[loftr_wrapper.py] image0: torch.Size([1, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20006510615348816 0.9989305138587952
[loftr_wrapper.py] pair_ids (983,)
[loftr_wrapper.py] corres: (983, 5)
[2023-06-22 21:42:49.674] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=1
[2023-06-22 21:42:49.676] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813100836743914 #inliers=568, #prev 692
[bundlesdf.py] frame 1668813100906891623 pose update before
[[ 0.494 -0.645  0.583 -0.364]
 [ 0.756  0.65   0.079 -0.195]
 [-0.43   0.401  0.808 -0.432]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:49.678] [warning] [FeatureManager.cpp:1095] procrustesByCorrespondence err per point between 1668813100906891623 and 1668813100836743914: 0.000163631
[bundlesdf.py] frame 1668813100906891623 pose update after
[[ 0.501 -0.636  0.587 -0.373]
 [ 0.75   0.658  0.072 -0.188]
 [-0.432  0.404  0.806 -0.429]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:49.679] [warning] [Bundler.cpp:67] forgetting frame 1668813100509473424
[2023-06-22 21:42:49.679] [warning] [FeatureManager.cpp:469] forgetting frame 1668813100509473424
[bundlesdf.py] exceed window size, forget frame 1668813100509473424
[2023-06-22 21:42:49.685] [warning] [Bundler.cpp:435] total keyframes=328, want to select 10
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:516] ids#=328, max_BA_frames-frames.size()=9
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:525] frames#=10
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813029097767458 visible=0.927597
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813029097767458) into pairs
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813030780872835 visible=0.960185
[2023-06-22 21:42:49.726] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813030780872835) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813031103320518 visible=0.972866
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813031103320518) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813031206709461 visible=0.967821
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813031206709461) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813031312962221 visible=0.952686
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813031312962221) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813031440876626 visible=0.920916
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813031440876626) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813096410030625 visible=0.912463
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813096410030625) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813097558079071 visible=0.90769
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813097558079071) into pairs
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:793] frame 1668813100906891623 and 1668813098026872389 visible=0.923643
[2023-06-22 21:42:49.727] [warning] [Bundler.cpp:802] add frame (1668813100906891623, 1668813098026872389) into pairs
[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.2000347226858139 0.9969505667686462
[loftr_wrapper.py] pair_ids (4435,)
[loftr_wrapper.py] corres: (4435, 5)
[2023-06-22 21:42:50.092] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813029097767458 #inliers=330, #prev 504
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813030780872835 #inliers=312, #prev 422
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813031103320518 #inliers=250, #prev 398
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813031206709461 #inliers=184, #prev 320
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813031312962221 #inliers=102, #prev 224
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813031440876626 #inliers=82, #prev 192
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813096410030625 #inliers=154, #prev 296
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813097558079071 #inliers=357, #prev 463
[2023-06-22 21:42:50.114] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100906891623 1668813098026872389 #inliers=400, #prev 516
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096410030625 1668813097558079071 1668813098026872389 1668813100906891623
[2023-06-22 21:42:50.125] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=2636
global_corres=2636
maxNumResiduals / maxNumberOfImages = 218636 / 10 = 21863
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 2171 = 21710
m_solver->solve Time difference = 18.317[ms]
[2023-06-22 21:42:50.151] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:50.151] [warning] [Bundler.cpp:302] frame 1668813100906891623 not selected as keyframe since its rot diff with frame 1668813029401587544 is 2.88785 deg
[bundlesdf.py] processNewFrame done 1668813100906891623
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:50.152] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:50.196] [warning] [Bundler.cpp:1110] saveNewframeResult done
[bundlesdf.py] percentile denoise start
[bundlesdf.py] percentile denoise done
[bundlesdf.py] processNewFrame start 1668813100979004863
[bundlesdf.py] process frame 1668813100979004863
[bundlesdf.py] frame_pairs: 1
[loftr_wrapper.py] image0: torch.Size([1, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20029717683792114 0.9911332726478577
[loftr_wrapper.py] pair_ids (866,)
[loftr_wrapper.py] corres: (866, 5)
[2023-06-22 21:42:50.270] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=1
[2023-06-22 21:42:50.271] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813100906891623 #inliers=521, #prev 624
[bundlesdf.py] frame 1668813100979004863 pose update before
[[ 0.496 -0.638  0.589 -0.373]
 [ 0.753  0.654  0.073 -0.189]
 [-0.431  0.408  0.805 -0.428]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:50.273] [warning] [FeatureManager.cpp:1095] procrustesByCorrespondence err per point between 1668813100979004863 and 1668813100906891623: 0.000167952
[bundlesdf.py] frame 1668813100979004863 pose update after
[[ 0.498 -0.648  0.576 -0.369]
 [ 0.754  0.651  0.08  -0.191]
 [-0.427  0.395  0.813 -0.432]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:50.274] [warning] [Bundler.cpp:67] forgetting frame 1668813100572221024
[2023-06-22 21:42:50.274] [warning] [FeatureManager.cpp:469] forgetting frame 1668813100572221024
[bundlesdf.py] exceed window size, forget frame 1668813100572221024
[2023-06-22 21:42:50.280] [warning] [Bundler.cpp:435] total keyframes=328, want to select 10
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:516] ids#=328, max_BA_frames-frames.size()=9
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:525] frames#=10
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813029097767458 visible=0.919226
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813029097767458) into pairs
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813030780872835 visible=0.953998
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813030780872835) into pairs
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813031103320518 visible=0.975917
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813031103320518) into pairs
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813031206709461 visible=0.973346
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813031206709461) into pairs
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813031312962221 visible=0.962522
[2023-06-22 21:42:50.321] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813031312962221) into pairs
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813031440876626 visible=0.925585
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813031440876626) into pairs
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813096410030625 visible=0.90759
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813096410030625) into pairs
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813097558079071 visible=0.901908
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813097558079071) into pairs
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:793] frame 1668813100979004863 and 1668813098026872389 visible=0.919497
[2023-06-22 21:42:50.322] [warning] [Bundler.cpp:802] add frame (1668813100979004863, 1668813098026872389) into pairs
[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.2001761794090271 0.9880563020706177
[loftr_wrapper.py] pair_ids (4093,)
[loftr_wrapper.py] corres: (4093, 5)
[2023-06-22 21:42:50.701] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813029097767458 #inliers=281, #prev 463
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813030780872835 #inliers=227, #prev 358
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813031103320518 #inliers=201, #prev 313
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813031206709461 #inliers=122, #prev 265
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813031312962221 #inliers=82, #prev 198
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813031440876626 #inliers=56, #prev 139
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813096410030625 #inliers=149, #prev 318
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813097558079071 #inliers=312, #prev 444
[2023-06-22 21:42:50.723] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813100979004863 1668813098026872389 #inliers=375, #prev 560
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096410030625 1668813097558079071 1668813098026872389 1668813100979004863
[2023-06-22 21:42:50.732] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=2270
global_corres=2270
maxNumResiduals / maxNumberOfImages = 218270 / 10 = 21827
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 1805 = 18050
m_solver->solve Time difference = 19.442[ms]
[2023-06-22 21:42:50.760] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:50.760] [warning] [Bundler.cpp:302] frame 1668813100979004863 not selected as keyframe since its rot diff with frame 1668813029401587544 is 2.61838 deg
[bundlesdf.py] processNewFrame done 1668813100979004863
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:50.761] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:50.807] [warning] [Bundler.cpp:1110] saveNewframeResult done
[bundlesdf.py] percentile denoise start
[bundlesdf.py] percentile denoise done
[bundlesdf.py] processNewFrame start 1668813101044386332
[bundlesdf.py] process frame 1668813101044386332
[bundlesdf.py] frame_pairs: 1
[loftr_wrapper.py] image0: torch.Size([1, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20004989206790924 0.952591061592102
[loftr_wrapper.py] pair_ids (732,)
[loftr_wrapper.py] corres: (732, 5)
[2023-06-22 21:42:50.879] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=1
[2023-06-22 21:42:50.881] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813100979004863 #inliers=441, #prev 544
[bundlesdf.py] frame 1668813101044386332 pose update before
[[ 0.501 -0.647  0.574 -0.369]
 [ 0.754  0.652  0.077 -0.189]
 [-0.424  0.395  0.815 -0.433]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:50.882] [warning] [FeatureManager.cpp:1095] procrustesByCorrespondence err per point between 1668813101044386332 and 1668813100979004863: 0.000219736
[bundlesdf.py] frame 1668813101044386332 pose update after
[[ 0.502 -0.636  0.586 -0.379]
 [ 0.752  0.656  0.068 -0.18 ]
 [-0.427  0.407  0.807 -0.426]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:50.883] [warning] [Bundler.cpp:67] forgetting frame 1668813100645056940
[2023-06-22 21:42:50.883] [warning] [FeatureManager.cpp:469] forgetting frame 1668813100645056940
[bundlesdf.py] exceed window size, forget frame 1668813100645056940
[2023-06-22 21:42:50.889] [warning] [Bundler.cpp:435] total keyframes=328, want to select 10
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:516] ids#=328, max_BA_frames-frames.size()=9
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:525] frames#=10
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813029097767458 visible=0.902596
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813029097767458) into pairs
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813030780872835 visible=0.939618
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813030780872835) into pairs
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813031103320518 visible=0.969126
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813031103320518) into pairs
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813031206709461 visible=0.972268
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813031206709461) into pairs
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813031312962221 visible=0.959973
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813031312962221) into pairs
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813031440876626 visible=0.926093
[2023-06-22 21:42:50.931] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813031440876626) into pairs
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813096288462014 visible=0.890574
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813096288462014) into pairs
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813096410030625 visible=0.891393
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813096410030625) into pairs
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:793] frame 1668813101044386332 and 1668813098026872389 visible=0.90041
[2023-06-22 21:42:50.932] [warning] [Bundler.cpp:802] add frame (1668813101044386332, 1668813098026872389) into pairs
[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20000287890434265 0.9935914278030396
[loftr_wrapper.py] pair_ids (3929,)
[loftr_wrapper.py] corres: (3929, 5)
[2023-06-22 21:42:51.308] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813029097767458 #inliers=365, #prev 506
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813030780872835 #inliers=330, #prev 415
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813031103320518 #inliers=245, #prev 349
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813031206709461 #inliers=161, #prev 308
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813031312962221 #inliers=137, #prev 255
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813031440876626 #inliers=74, #prev 154
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813096288462014 #inliers=111, #prev 228
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813096410030625 #inliers=141, #prev 282
[2023-06-22 21:42:51.330] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101044386332 1668813098026872389 #inliers=400, #prev 499
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096288462014 1668813096410030625 1668813098026872389 1668813101044386332
[2023-06-22 21:42:51.342] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=3033
global_corres=3033
maxNumResiduals / maxNumberOfImages = 219033 / 10 = 21903
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 1964 = 19640
m_solver->solve Time difference = 19.719[ms]
[2023-06-22 21:42:51.369] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:51.370] [warning] [Bundler.cpp:302] frame 1668813101044386332 not selected as keyframe since its rot diff with frame 1668813029401587544 is 2.70892 deg
[bundlesdf.py] processNewFrame done 1668813101044386332
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:51.371] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:51.415] [warning] [Bundler.cpp:1110] saveNewframeResult done
[bundlesdf.py] percentile denoise start
[bundlesdf.py] percentile denoise done
[bundlesdf.py] processNewFrame start 1668813101109772235
[bundlesdf.py] process frame 1668813101109772235
[bundlesdf.py] frame_pairs: 1
[loftr_wrapper.py] image0: torch.Size([1, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20034536719322205 0.9984253644943237
[loftr_wrapper.py] pair_ids (911,)
[loftr_wrapper.py] corres: (911, 5)
[2023-06-22 21:42:51.489] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=1
[2023-06-22 21:42:51.492] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813101044386332 #inliers=596, #prev 680
[bundlesdf.py] frame 1668813101109772235 pose update before
[[ 0.499 -0.64   0.584 -0.377]
 [ 0.755  0.652  0.07  -0.183]
 [-0.426  0.406  0.809 -0.427]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:51.494] [warning] [FeatureManager.cpp:1095] procrustesByCorrespondence err per point between 1668813101109772235 and 1668813101044386332: 0.000141906
[bundlesdf.py] frame 1668813101109772235 pose update after
[[ 0.499 -0.632  0.593 -0.383]
 [ 0.753  0.655  0.065 -0.18 ]
 [-0.429  0.414  0.803 -0.421]
 [ 0.     0.     0.     1.   ]]
[2023-06-22 21:42:51.495] [warning] [Bundler.cpp:67] forgetting frame 1668813100708052396
[2023-06-22 21:42:51.495] [warning] [FeatureManager.cpp:469] forgetting frame 1668813100708052396
[bundlesdf.py] exceed window size, forget frame 1668813100708052396
[2023-06-22 21:42:51.500] [warning] [Bundler.cpp:435] total keyframes=328, want to select 10
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:516] ids#=328, max_BA_frames-frames.size()=9
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:525] frames#=10
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813029097767458 visible=0.898641
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813029097767458) into pairs
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813030780872835 visible=0.936685
[2023-06-22 21:42:51.543] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813030780872835) into pairs
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813031103320518 visible=0.968478
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813031103320518) into pairs
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813031206709461 visible=0.96644
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813031206709461) into pairs
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813031312962221 visible=0.954891
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813031312962221) into pairs
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813031440876626 visible=0.9125
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813031440876626) into pairs
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813096288462014 visible=0.891033
[2023-06-22 21:42:51.544] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813096288462014) into pairs
[2023-06-22 21:42:51.545] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813096410030625 visible=0.891712
[2023-06-22 21:42:51.545] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813096410030625) into pairs
[2023-06-22 21:42:51.545] [warning] [Bundler.cpp:793] frame 1668813101109772235 and 1668813098026872389 visible=0.888451
[2023-06-22 21:42:51.545] [warning] [Bundler.cpp:802] add frame (1668813101109772235, 1668813098026872389) into pairs
[bundlesdf.py] frame_pairs: 9
[loftr_wrapper.py] image0: torch.Size([9, 1, 400, 400])
[loftr_wrapper.py] net forward
[loftr_wrapper.py] mconf, 0.20008862018585205 0.9952269792556763
[loftr_wrapper.py] pair_ids (3860,)
[loftr_wrapper.py] corres: (3860, 5)
[2023-06-22 21:42:51.922] [warning] [FeatureManager.cpp:1589] start multi pair ransac GPU, pairs#=9
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813029097767458 #inliers=375, #prev 511
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813030780872835 #inliers=270, #prev 360
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813031103320518 #inliers=243, #prev 335
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813031206709461 #inliers=182, #prev 342
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813031312962221 #inliers=123, #prev 241
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813031440876626 #inliers=90, #prev 180
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813096288462014 #inliers=96, #prev 237
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813096410030625 #inliers=184, #prev 326
[2023-06-22 21:42:51.944] [warning] [FeatureManager.cpp:1699] ransac makes match betwee frame 1668813101109772235 1668813098026872389 #inliers=330, #prev 427
#optimizeGPU frames=10, #keyframes=328, #_frames=334
1668813029097767458 1668813030780872835 1668813031103320518 1668813031206709461 1668813031312962221 1668813031440876626 1668813096288462014 1668813096410030625 1668813098026872389 1668813101109772235
[2023-06-22 21:42:51.955] [warning] [Bundler.cpp:920] OptimizerGPU begin, global_corres#=2962
global_corres=2962
maxNumResiduals / maxNumberOfImages = 218962 / 10 = 21896
m_maxNumberOfImages*m_maxCorrPerImage = 10 x 1893 = 18930
m_solver->solve Time difference = 20.157[ms]
[2023-06-22 21:42:51.984] [warning] [Bundler.cpp:924] OptimizerGPU finish
[2023-06-22 21:42:51.984] [warning] [Bundler.cpp:302] frame 1668813101109772235 not selected as keyframe since its rot diff with frame 1668813029401587544 is 2.95976 deg
[bundlesdf.py] processNewFrame done 1668813101109772235
[bundlesdf.py] rematch_after_nerf: True
[2023-06-22 21:42:51.985] [warning] [Bundler.cpp:961] Welcome saveNewframeResult
[2023-06-22 21:42:52.032] [warning] [Bundler.cpp:1110] saveNewframeResult done
[2023-06-22 21:42:55.695] [warning] [Bundler.cpp:49] Connected to nerf_port 9999
[2023-06-22 21:42:55.696] [warning] [FeatureManager.cpp:2084] Connected to port 5555
default_cfg {'backbone_type': 'ResNetFPN', 'resolution': (8, 2), 'fine_window_size': 5, 'fine_concat_coarse_feat': True, 'resnetfpn': {'initial_dim': 128, 'block_dims': [128, 196, 256]}, 'coarse': {'d_model': 256, 'd_ffn': 256, 'nhead': 8, 'layer_names': ['self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross'], 'attention': 'linear', 'temp_bug_fix': False}, 'match_coarse': {'thr': 0.2, 'border_rm': 2, 'match_type': 'dual_softmax', 'dsmax_temperature': 0.1, 'skh_iters': 3, 'skh_init_bin_score': 1.0, 'skh_prefilter': True, 'train_coarse_percent': 0.4, 'train_pad_num_gt_min': 200}, 'fine': {'d_model': 128, 'd_ffn': 128, 'nhead': 8, 'layer_names': ['self', 'cross'], 'attention': 'linear'}}
[bundlesdf.py] last_stamp 1668813101109772235
[bundlesdf.py] keyframes#: 328
[tool.py] compute_scene_bounds_worker start
[tool.py] compute_scene_bounds_worker done
[tool.py] merge pcd
[tool.py] compute_translation_scales done
translation_cvcam=[0.00942001 0.00477833 0.00672751], sc_factor=5.6659060594129675
[nerf_runner.py] Octree voxel dilate_radius:1
level 0, resolution: 16
level 1, resolution: 20
level 2, resolution: 24
level 3, resolution: 28
level 4, resolution: 34
level 5, resolution: 41
level 6, resolution: 49
level 7, resolution: 59
level 8, resolution: 71
level 9, resolution: 85
level 10, resolution: 102
level 11, resolution: 123
level 12, resolution: 148
level 13, resolution: 177
level 14, resolution: 213
level 15, resolution: 256
GridEncoder: input_dim=3 n_levels=16 level_dim=2 resolution=16 -> 256 per_level_scale=1.2030 params=(20411696, 2) gridtype=hash align_corners=False
sc_factor 5.6659060594129675
translation [0.00942001 0.00477833 0.00672751]
[nerf_runner.py] denoise cloud
[nerf_runner.py] Denoising rays based on octree cloud
[nerf_runner.py] bad_mask#=311206
rays torch.Size([30719056, 12])
Start training
[nerf_runner.py] train progress 0/2001
[nerf_runner.py] Iter: 0, valid_samples: 655021/655360, valid_rays: 2048/2048, loss: 14.3810930, rgb_loss: 12.4128227, rgb0_loss: 0.0000000, fs_rgb_loss: 0.0000000, depth_loss: 0.0000000, depth_loss0: 0.0000000, fs_loss: 0.0770879, point_cloud_loss: 0.0000000, point_cloud_normal_loss: 0.0000000, sdf_loss: 1.7854172, eikonal_loss: 0.0000000, variation_loss: 0.0000000, truncation(meter): 0.0100000, pose_reg: 0.0000000, reg_features: 0.1057650,

[nerf_runner.py] train progress 200/2001
[nerf_runner.py] train progress 400/2001
[nerf_runner.py] train progress 600/2001
[nerf_runner.py] train progress 800/2001
[nerf_runner.py] train progress 1000/2001
[nerf_runner.py] train progress 1200/2001
[nerf_runner.py] train progress 1400/2001
[nerf_runner.py] train progress 1600/2001
[nerf_runner.py] train progress 1800/2001
[nerf_runner.py] train progress 2000/2001
cp: cannot stat '/home/mona/BundleSDF/out_dir///nerf_with_bundletrack_online/image_step_*.png': No such file or directory
Traceback (most recent call last):
  File "run_custom.py", line 203, in <module>
    run_one_video(video_dir=args.video_dir, out_folder=args.out_folder, use_segmenter=args.use_segmenter, use_gui=args.use_gui)
  File "run_custom.py", line 107, in run_one_video
    run_one_video_global_nerf(out_folder=out_folder)
  File "run_custom.py", line 152, in run_one_video_global_nerf
    tracker.run_global_nerf(reader=reader, get_texture=True, tex_res=512)
  File "/home/mona/BundleSDF/bundlesdf.py", line 747, in run_global_nerf
    mesh,sigma,query_pts = nerf.extract_mesh(voxel_size=self.cfg_nerf['mesh_resolution'],isolevel=0, mesh_savepath='',return_sigma=True)
  File "/opt/conda/envs/py38/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
TypeError: extract_mesh() got an unexpected keyword argument 'mesh_savepath'
Process Process-4:
Traceback (most recent call last):
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mona/BundleSDF/bundlesdf.py", line 89, in run_nerf
    join = p_dict['join']
  File "<string>", line 2, in __getitem__
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/managers.py", line 835, in _callmethod
    kind, result = conn.recv()
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/opt/conda/envs/py38/lib/python3.8/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
[2023-06-22 21:46:16.083] [warning] [Bundler.cpp:59] Destructor
[2023-06-22 21:46:16.086] [warning] [Bundler.cpp:59] Destructor

Basically, nothing has been written at all into this folder:

(py38) root@ard-gpu-01:/home/mona/BundleSDF# ls /home/mona/BundleSDF/out_dir///nerf_with_bundletrack_online
total 76K
drwxr-xr-x 1946 root root  68K Jun 22 21:42 ..
drwxr-xr-x    2 root root 4.0K Jun 22 21:46 .

du -h out_dir shows 2.6G of storage. You know why nothing was written?

Number of level 1 directories in out_dir:

(py38) root@ard-gpu-01:/home/mona/BundleSDF/out_dir# find . -mindepth 1 -maxdepth 1 -type d -not -name '.*' -print | wc -l
1944

Which is in relation to number of RGB frames in milk:

(base) mona@ard-gpu-01:~/milk/2022-11-18-15-10-24_milk/rgb$ ls | wc -l
1935
monajalal commented 1 year ago

the method extract_mesh in nerf_runner.py has no mesh_savepath arg. Could you please provide the complete code? It seems the current version of code/doc has a bunch of missing items.

Thank you.

@torch.no_grad()
  def extract_mesh(self, level=None, voxel_size=0.003, isolevel=0.0, return_sigma=False):
    # Query network on dense 3d grid of points
    voxel_size *= self.cfg['sc_factor']  # in "network space"

    bounds = np.array(self.cfg['bounding_box']).reshape(2,3)
    x_min, x_max = bounds[0,0], bounds[1,0]
    y_min, y_max = bounds[0,1], bounds[1,1]
    z_min, z_max = bounds[0,2], bounds[1,2]
    tx = np.arange(x_min+0.5*voxel_size, x_max, voxel_size)
    ty = np.arange(y_min+0.5*voxel_size, y_max, voxel_size)
    tz = np.arange(z_min+0.5*voxel_size, z_max, voxel_size)
    N = len(tx)
    query_pts = torch.tensor(np.stack(np.meshgrid(tx, ty, tz, indexing='ij'), -1).astype(np.float32).reshape(-1,3)).float().cuda()

    if self.octree_m is not None:
      vox_size = self.cfg['octree_raytracing_voxel_size']*self.cfg['sc_factor']
      level = int(np.floor(np.log2(2.0/vox_size)))
      center_ids = self.octree_m.get_center_ids(query_pts, level)
      valid = center_ids>=0
    else:
      valid = torch.ones(len(query_pts), dtype=bool).cuda()

    logging.info(f'query_pts:{query_pts.shape}, valid:{valid.sum()}')
    flat = query_pts[valid]

    sigma = []
    chunk = self.cfg['netchunk']
    for i in range(0,flat.shape[0],chunk):
      inputs = flat[i:i+chunk]
      with torch.no_grad():
        outputs,valid_samples = self.run_network_density(inputs=inputs)
      sigma.append(outputs)
    sigma = torch.cat(sigma, dim=0)
    sigma_ = torch.ones((N**3)).float().cuda()
    sigma_[valid] = sigma.reshape(-1)
    sigma = sigma_.reshape(N,N,N).data.cpu().numpy()

    logging.info('Running Marching Cubes')
    from skimage import measure
    try:
      vertices, triangles, normals, values = measure.marching_cubes(sigma, isolevel)
    except Exception as e:
      logging.info(f"ERROR Marching Cubes {e}")
      return None

    logging.info(f'done V:{vertices.shape}, F:{triangles.shape}')

    # Rescale and translate
    voxel_size_ndc = np.array([tx[-1] - tx[0], ty[-1] - ty[0], tz[-1] - tz[0]]) / np.array([[tx.shape[0] - 1, ty.shape[0] - 1, tz.shape[0] - 1]])
    offset = np.array([tx[0], ty[0], tz[0]])
    vertices[:, :3] = voxel_size_ndc.reshape(1,3) * vertices[:, :3] + offset.reshape(1,3)

    # Create mesh
    mesh = trimesh.Trimesh(vertices, triangles, process=False)

    if return_sigma:
      return mesh,sigma,query_pts

    return mesh

while:

(base) mona@ard-gpu-01:~/BundleSDF$ rg extract_m
bundlesdf.py
234:    mesh = nerf.extract_mesh(isolevel=0,voxel_size=cfg_nerf['mesh_resolution'])
747:    mesh,sigma,query_pts = nerf.extract_mesh(voxel_size=self.cfg_nerf['mesh_resolution'],isolevel=0, mesh_savepath='',return_sigma=True)

nerf_runner.py
827:        mesh = self.extract_mesh(isolevel=0, voxel_size=self.cfg['mesh_resolution'])
1351:  def extract_mesh(self, level=None, voxel_size=0.003, isolevel=0.0, return_sigma=False):
monajalal commented 1 year ago

I found this piece of code: https://github.com/dazinovic/neural-rgbd-surface-reconstruction/blob/main/extract_mesh.py#L72

    # Create mesh
    mesh = trimesh.Trimesh(vertices, triangles, process=False)

    if mesh_savepath == '':
      mesh_savepath = os.path.join(os.getcwd, f"mesh_vs{voxel_size / self.sc_factor.ply}")
    mesh.export(mesh_savepath)

However, I am not fully sure of your intentions and where you want to save them, that's why I have used os.getcwd() as a filler.

wenbowen123 commented 1 year ago

Thanks for reporting the bug. Pushed a fix. Please try again.