Closed ThomasParistech closed 2 years ago
Thanks for reporting this. The segfault happens during the featuremetric BA but the featuremetric KA and the triangulation seem to succeed. Some pointers:
low_memory
config: PixSfM(conf={"dense_features": {"use_cache": True}})
hloc.triangulation.main(sfm_dir, input_model, images, sfm_pairs, features, matches)
pairs_from_covisibility
? e.g. to 20.Thanks for your quick reply to my issue
1) I run it on my local DELL-G15 laptop inside a docker.
ARG CUDA_VERSION=11.1
ARG UBUNTU_VERSION=20.04
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
python3.9 gcc-9
torch==1.10.0+cu111 NVIDIA-SMI 470.86
RAM 15GB NVIDIA GeForce RTX 3060 Laptop GPU, 6GB
2) Without the low memory config, the laptop starts freezing since both the 15GB RAM and the 2GB swap are used at 100%.
I used PixSfM(conf={"dense_features": {"use_cache": True}})
as you suggested, and it worked well!
The memory consumption reached a plateau instead of keeping to linearly increase like before.
Here's the resulting output
[2022/01/27 13:34:45 hloc INFO] Finished the triangulation with statistics:
Reconstruction:
num_reg_images = 305
num_cameras = 305
num_points3D = 1565
num_observations = 3351
mean_track_length = 2.14121
mean_observations_per_image = 10.9869
mean_reprojection_error = 1.82589
[2022/01/27 13:34:45 pixsfm INFO] Loading patches from H5 File.
100%[████████████████████] 3351/3351 [00:00, 74466.6it/s]
[2022/01/27 13:34:45 pixsfm INFO] Extracting references.
100%[████████████████████] 1565/1565 [00:00, 7634.14it/s]
[2022/01/27 13:34:45 pixsfm INFO] Reference Extraction Time: 0.205549s
[2022/01/27 13:34:45 pixsfm INFO] Start feature-reference bundle adjustment.
100%[████████████████████] 101/101 [00:03, 25.2689it/s]
[2022/01/27 13:34:49 pixsfm INFO] BA Time: 3.9979s, cost change: 0.0187013 --> 0.0140651
A warning about the use of the low memory conf could be added in the README.
3) Thanks for your tips, I'll try them
Are you able to share the images and the empty COLMAP model? We likely have a bug somewhere in the costmap computation (used by low_memory), having the data would help us fix this.
Of course Let me quickly record another small scene that I can share with you. What's the best way to share the data with you? I can also provide the docker file
Great. We will need the data that the code crashed with (images + dummy COLMAP model), the exact script you ran and the docker image. If possible zip this together and share a link (e.g. google drive) via email (the address is on my website). Thanks!
I'm trying to refine a Pointcloud extracted using ArCore on my phone, and I get a Segmentation fault error at the end of the triangulation part of PixSfM.
As an input, I provide:
and I want to refine the poses and the pointcloud.
My pipeline is the following: 1) hloc.extract_features 2) hloc.pairs_from_covisibility 3) hloc.match_features 4) PixSfM.triangulation
I use the low memory configuration file, because it crashes otherwise.
Here's my code:
and here's the output I got:
Did I miss something or is there an actual bug? Might it be related to the lowmemory conf? Is is still ok since I got the log "Finished the triangulation"_ ?
Many thanks !