liuyuan-pal / NeRO

[SIGGRAPH2023] NeRO: Neural Geometry and BRDF Reconstruction of Reflective Objects from Multiview Images
MIT License
551 stars 37 forks source link

subprocess.CalledProcessError: Command '['/usr/local/bin/colmap', 'patch_match_stereo', '--workspace_path', 'data/custom/kettle/dense']' died with <Signals.SIGABRT: 6>. #9

Closed monajalal closed 1 year ago

monajalal commented 1 year ago

Hi thanks for great and promising work. Could you please let me know if this is an error you encountered and what you suggest? I ran this command:

(nero) mona@ard-gpu-01:~/NeRO$ python run_colmap.py --project_dir data/custom/kettle --colmap /usr/local/bin/colmap --same_camera

and I got this error:

==============================================================================
Processing view 127 / 159 for 127.jpg
==============================================================================

Reading inputs...

PatchMatch::Problem
-------------------
ref_image_idx: 158
src_image_idxs: 142 26 121 149 155 10 147 31 148 122 139 157 138 9 125 7 123 30 11 156

PatchMatchOptions
-----------------
max_image_size: -1
gpu_index: 0
depth_min: 2.40671
depth_max: 42.2358
window_radius: 5
window_step: 1
sigma_spatial: 5
sigma_color: 0.2
num_samples: 15
ncc_sigma: 0.6
min_triangulation_angle: 1
incident_angle_sigma: 0.9
num_iterations: 5
geom_consistency: 0
geom_consistency_regularizer: 0.3
geom_consistency_max_cost: 3
filter: 0
filter_min_ncc: 0.1
filter_min_triangulation_angle: 3
filter_min_num_consistent: 2
filter_geom_consistency_max_cost: 1
write_consistency_graph: 0
allow_missing_files: 0

PatchMatch::Run
---------------
Initialization: 0.7703s
 Sweep 1: 3.7278s
 Sweep 2: 2.7900s
 Sweep 3: 3.6135s
 Sweep 4: 2.8760s
Iteration 1: 13.0075s
 Sweep 1: 3.4680s
 Sweep 2: 2.8087s
 Sweep 3: 3.5303s
 Sweep 4: 2.9889s
Iteration 2: 12.7960s
 Sweep 1: 3.3856s
 Sweep 2: 2.8281s
 Sweep 3: 3.4867s
 Sweep 4: 2.9949s
Iteration 3: 12.6954s
 Sweep 1: 3.3508s
 Sweep 2: 2.8133s
 Sweep 3: 3.3601s
 Sweep 4: 2.8119s
Iteration 4: 12.3361s
 Sweep 1: 3.3187s
 Sweep 2: 2.7606s
 Sweep 3: 3.2838s
 Sweep 4: 2.7604s
Iteration 5: 12.1236s
Total: 63.7291s

Writing photometric output for 127.jpg
F0613 18:41:51.918551 49101 mat.h:176] Check failed: file.is_open() data/custom/kettle/dense/stereo/depth_maps/127.jpg.photometric.bin
*** Check failure stack trace: ***
    @     0x7f0d00a8bb03  google::LogMessage::Fail()
    @     0x7f0d00a939d1  google::LogMessage::SendToLog()
    @     0x7f0d00a8b7c2  google::LogMessage::Flush()
    @     0x7f0d00a8d78f  google::LogMessageFatal::~LogMessageFatal()
    @     0x564b345cc461  colmap::mvs::Mat<>::Write()
    @     0x564b345c7a47  colmap::mvs::PatchMatchController::ProcessProblem()
    @     0x564b345cae0d  _ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultIvEES3_EZNS1_11_Task_stateISt5_BindIFMN6colmap3mvs20PatchMatchControllerEFvRKNSD_17PatchMatchOptionsEmEPSE_SF_mEESaIiEFvvEE6_M_runEvEUlvE_vEEE9_M_invokeERKSt9_Any_data
    @     0x564b341b575d  std::__future_base::_State_baseV2::_M_do_set()
    @     0x7f0cfe099f68  (unknown)
    @     0x564b345cb883  _ZNSt17_Function_handlerIFvvEZN6colmap10ThreadPool7AddTaskIMNS1_3mvs20PatchMatchControllerEFvRKNS4_17PatchMatchOptionsEmEJPS5_RS6_RmEEESt6futureINSt9result_ofIFT_DpT0_EE4typeEEOSG_DpOSH_EUlvE_E9_M_invokeERKSt9_Any_data
    @     0x564b3446ea37  colmap::ThreadPool::WorkerFunc()
    @     0x7f0cfe4dc2b3  (unknown)
    @     0x7f0cfe094b43  (unknown)
    @     0x7f0cfe126a00  (unknown)
Traceback (most recent call last):
  File "/home/mona/NeRO/run_colmap.py", line 101, in <module>
    main()
  File "/home/mona/NeRO/run_colmap.py", line 98, in main
    run_sfm(image_dir, args.project_dir, args.same_camera, colmap_path=args.colmap)
  File "/home/mona/NeRO/run_colmap.py", line 75, in run_sfm
    subprocess.run(cmd,check=True)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/colmap', 'patch_match_stereo', '--workspace_path', 'data/custom/kettle/dense']' died with <Signals.SIGABRT: 6>.

some sys info:

$ uname -a
Linux ard-gpu-01 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
LSB Version:    core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy

Also, what is the space requirement of running this step and overall your inference code? I got this message and I guess it may be related to run_colmap.

Low Disk Space on "Filesystem root" The volume "Filesystem root" has only 1.1GB disk space remaining. You may free up some space by emptying the trash.

However, looking at du -h I see this which isn't much GB.

(nero) mona@ard-gpu-01:~/NeRO$ du -h
40K ./raytracing_git/src
9.5M    ./raytracing_git/build/lib.linux-x86_64-3.10
4.0K    ./raytracing_git/build/bdist.linux-x86_64
15M ./raytracing_git/build/temp.linux-x86_64-3.10/home/mona/NeRO/raytracing_git/src
15M ./raytracing_git/build/temp.linux-x86_64-3.10/home/mona/NeRO/raytracing_git
15M ./raytracing_git/build/temp.linux-x86_64-3.10/home/mona/NeRO
15M ./raytracing_git/build/temp.linux-x86_64-3.10/home/mona
15M ./raytracing_git/build/temp.linux-x86_64-3.10/home
16M ./raytracing_git/build/temp.linux-x86_64-3.10
25M ./raytracing_git/build
24K ./raytracing_git/raytracing.egg-info
12K ./raytracing_git/raytracing/__pycache__
24K ./raytracing_git/raytracing
64K ./raytracing_git/.git/hooks
4.0K    ./raytracing_git/.git/branches
8.0K    ./raytracing_git/.git/info
8.0K    ./raytracing_git/.git/logs/refs/remotes/origin
12K ./raytracing_git/.git/logs/refs/remotes
8.0K    ./raytracing_git/.git/logs/refs/heads
24K ./raytracing_git/.git/logs/refs
32K ./raytracing_git/.git/logs
4.0K    ./raytracing_git/.git/objects/info
52K ./raytracing_git/.git/objects/pack
60K ./raytracing_git/.git/objects
8.0K    ./raytracing_git/.git/refs/remotes/origin
12K ./raytracing_git/.git/refs/remotes
8.0K    ./raytracing_git/.git/refs/heads
4.0K    ./raytracing_git/.git/refs/tags
28K ./raytracing_git/.git/refs
220K    ./raytracing_git/.git
48K ./raytracing_git/include/raytracing
52K ./raytracing_git/include
43M ./raytracing_git
20K ./blender_backend
44M ./data/custom/kettle/sparse/0
44M ./data/custom/kettle/sparse
407M    ./data/custom/kettle/images
44M ./data/custom/kettle/dense/sparse
1.5G    ./data/custom/kettle/dense/stereo/depth_maps
4.3G    ./data/custom/kettle/dense/stereo/normal_maps
4.0K    ./data/custom/kettle/dense/stereo/consistency_graphs
5.8G    ./data/custom/kettle/dense/stereo
407M    ./data/custom/kettle/dense/images
6.2G    ./data/custom/kettle/dense
6.9G    ./data/custom/kettle
7.3G    ./data/custom
7.3G    ./data
112K    ./network
80K ./utils
13M ./assets
32K ./colmap/__pycache__
236K    ./colmap
24K ./nvdiffrast/nvdiffrast.egg-info
64K ./nvdiffrast/samples/tensorflow
8.0K    ./nvdiffrast/samples/torch/__pycache__
76K ./nvdiffrast/samples/torch
7.4M    ./nvdiffrast/samples/data
7.6M    ./nvdiffrast/samples
12K ./nvdiffrast/docker
8.0K    ./nvdiffrast/nvdiffrast/__pycache__
108K    ./nvdiffrast/nvdiffrast/tensorflow
144K    ./nvdiffrast/nvdiffrast/torch
168K    ./nvdiffrast/nvdiffrast/common/cudaraster/impl
176K    ./nvdiffrast/nvdiffrast/common/cudaraster
392K    ./nvdiffrast/nvdiffrast/common
12K ./nvdiffrast/nvdiffrast/lib
672K    ./nvdiffrast/nvdiffrast
4.0K    ./nvdiffrast/build/bdist.linux-x86_64
108K    ./nvdiffrast/build/lib/nvdiffrast/tensorflow
144K    ./nvdiffrast/build/lib/nvdiffrast/torch
168K    ./nvdiffrast/build/lib/nvdiffrast/common/cudaraster/impl
176K    ./nvdiffrast/build/lib/nvdiffrast/common/cudaraster
392K    ./nvdiffrast/build/lib/nvdiffrast/common
652K    ./nvdiffrast/build/lib/nvdiffrast
656K    ./nvdiffrast/build/lib
664K    ./nvdiffrast/build
3.0M    ./nvdiffrast/docs/img
3.1M    ./nvdiffrast/docs
64K ./nvdiffrast/.git/hooks
4.0K    ./nvdiffrast/.git/branches
8.0K    ./nvdiffrast/.git/info
8.0K    ./nvdiffrast/.git/logs/refs/remotes/origin
12K ./nvdiffrast/.git/logs/refs/remotes
8.0K    ./nvdiffrast/.git/logs/refs/heads
24K ./nvdiffrast/.git/logs/refs
32K ./nvdiffrast/.git/logs
4.0K    ./nvdiffrast/.git/objects/info
12M ./nvdiffrast/.git/objects/pack
12M ./nvdiffrast/.git/objects
8.0K    ./nvdiffrast/.git/refs/remotes/origin
12K ./nvdiffrast/.git/refs/remotes
8.0K    ./nvdiffrast/.git/refs/heads
4.0K    ./nvdiffrast/.git/refs/tags
28K ./nvdiffrast/.git/refs
12M ./nvdiffrast/.git
24M ./nvdiffrast
28K ./train
12K ./raytracing
32K ./dataset
36K ./configs/shape/syn
24K ./configs/shape/real
64K ./configs/shape
36K ./configs/material/syn
24K ./configs/material/real
64K ./configs/material
12K ./configs/custom
144K    ./configs
64K ./.git/hooks
4.0K    ./.git/branches
8.0K    ./.git/info
8.0K    ./.git/logs/refs/remotes/origin
12K ./.git/logs/refs/remotes
8.0K    ./.git/logs/refs/heads
24K ./.git/logs/refs
32K ./.git/logs
4.0K    ./.git/objects/info
64M ./.git/objects/pack
64M ./.git/objects
8.0K    ./.git/refs/remotes/origin
12K ./.git/refs/remotes
8.0K    ./.git/refs/heads
4.0K    ./.git/refs/tags
28K ./.git/refs
64M ./.git
7.4G    .
monajalal commented 1 year ago

Also, now that I am running it again, I am getting this error:

(nero) mona@ard-gpu-01:~/NeRO$ time python run_colmap.py --project_dir data/custom/kettle --colmap /usr/local/bin/colmap --same_camera
Traceback (most recent call last):
  File "/home/mona/NeRO/run_colmap.py", line 101, in <module>
    main()
  File "/home/mona/NeRO/run_colmap.py", line 98, in main
    run_sfm(image_dir, args.project_dir, args.same_camera, colmap_path=args.colmap)
  File "/home/mona/NeRO/run_colmap.py", line 32, in run_sfm
    db.add_image(img_fn.name, global_cam_id)
  File "/home/mona/NeRO/colmap/database.py", line 177, in add_image
    cursor = self.execute(
sqlite3.IntegrityError: UNIQUE constraint failed: images.name

real    0m0.497s
user    0m0.689s
sys 0m1.425s

^^ solution:

$ rm -rf kettle
$ unzip kettle.zip

^^ run the command again I emptied a lot of space on my disk just in case I got the error because I may have run out of space. I'll update.

liuyuan-pal commented 1 year ago

Hi, kettle.zip contains processed files. COLMAP would save some intermediate results during dense reconstruction which occupy lots of disk storage. These intermediate results can be deleted such as the depth maps and normal maps and we only need the fused point.ply.

monajalal commented 1 year ago

I think it took around 20hrs but I was able to produce the kettle.ply. Thanks a lot for your response.