-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hello, i am trying to reconstruct 3D geometry from video, but ODM seems to crash after it tries to allocate ~2TB of RAM, that seems bit excessive
Used command:
time sudo docker run -ti --rm -v ~/3d_scan:/datasets opendronemap/odm --project-path /datasets rosnicka
Crash reason:
``
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.0) /code/SuperBuild/src/opencv/modules/core/src/alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 2220942923328 bytes in function 'OutOfMemoryError'
Aborted (core dumped)
Longer part of the log:
...
2025-06-18 02:44:28,087 DEBUG: Undistorting image VID_20250617_161418_1068_1835.jpg
2025-06-18 02:44:28,088 DEBUG: Undistorting image VID_20250617_161418_1104_1878.jpg
[INFO] running "/code/SuperBuild/install/bin/opensfm/bin/opensfm" export_visualsfm --points "/datasets/rosnicka/opensfm"
[INFO] Finished opensfm stage
[INFO] Running openmvs stage
[INFO] running "/code/SuperBuild/install/bin/opensfm/bin/opensfm" export_openmvs "/datasets/rosnicka/opensfm"
[INFO] Depthmap resolution set to: 480px
[INFO] Running dense reconstruction. This might take a while.
[INFO] Estimating depthmaps
[INFO] running "/code/SuperBuild/install/bin/OpenMVS/DensifyPointCloud" "/datasets/rosnicka/opensfm/undistorted/openmvs/scene.mvs" --resolution-level 2 --dense-config-file "/datasets/rosnicka/opensfm/undistorted/openmvs/Densify.ini" --max-resolution 1920 --min-resolution 640 --max-threads 4 --number-views-fuse 2 --sub-resolution-levels 2 --archive-type 3 -w "/datasets/rosnicka/opensfm/undistorted/openmvs/depthmaps" -v 0 --cuda-device -2
02:45:02 [App ] OpenMVS x64 v2.2.0
02:45:02 [App ] Build date: Apr 16 2025, 02:46:54
02:45:02 [App ] CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 cores)
02:45:02 [App ] RAM: 15.38GB Physical Memory 16.51GB Virtual Memory
02:45:02 [App ] OS: Linux 6.14.5-zen1-1-zen (x86_64)
02:45:02 [App ] Disk:
02:45:02 [App ] SSE & AVX compatible CPU & OS detected
02:45:02 [App ] Command line: DensifyPointCloud /datasets/rosnicka/opensfm/undistorted/openmvs/scene.mvs --resolution-level 2 --dense-config-file /datasets/rosnicka/opensfm/undistorted/openmvs/Densify.ini --max-resolution 1920 --min-resolution 640 --max-threads 4 --number-views-fuse 2 --sub-resolution-levels 2 --archive-type 3 -w /datasets/rosnicka/opensfm/undistorted/openmvs/depthmaps -v 0 --cuda-device -2
02:45:02 [App ] Found a camera not pointing towards the scene center; the scene will be considered unbounded (no ROI)
02:45:14 [App ] Preparing images for dense reconstruction completed: 480 images (12s667ms)
02:45:16 [App ] Selecting images for dense reconstruction completed: 480 images (1s372ms)
Estimated depth-maps 1 (0.21%, 9s, ETA 0ms)...
Estimated depth-maps 2 (0.42%, 23s, ETA 0ms)...
Estimated depth-maps 3 (0.62%, 42s, ETA 0ms)...
Estimated depth-maps 4 (0.83%, 50s, ETA 0ms)...
Estimated depth-maps 5 (1.04%, 1m2s, ETA 1h39m)...
Estimated depth-maps 6 (1.25%, 1m16s, ETA 1h40m)...
Estimated depth-maps 7 (1.46%, 1m27s, ETA 1h38m)...
Estimated depth-maps 8 (1.67%, 1m40s, ETA 1h38m)...
Estimated depth-maps 9 (1.88%, 1m56s, ETA 1h41m)...
Estimated depth-maps 10 (2.08%, 2m6s, ETA 1h38m)...
Estimated depth-maps 11 (2.29%, 2m15s, ETA 1h36m)...
Estimated depth-maps 12 (2.50%, 2m28s, ETA 1h36m)...
Estimated depth-maps 13 (2.71%, 2m43s, ETA 1h37m)...
Estimated depth-maps 14 (2.92%, 2m56s, ETA 1h37m)...
Estimated depth-maps 15 (3.12%, 3m8s, ETA 1h37m)...
Estimated depth-maps 16 (3.33%, 3m22s, ETA 1h37m)...
Estimated depth-maps 17 (3.54%, 3m35s, ETA 1h37m)...
Estimated depth-maps 18 (3.75%, 3m47s, ETA 1h37m)...
Estimated depth-maps 19 (3.96%, 4m1s, ETA 1h37m)...
Estimated depth-maps 20 (4.17%, 4m17s, ETA 1h38m)...
Estimated depth-maps 21 (4.38%, 4m32s, ETA 1h39m)...
Estimated depth-maps 22 (4.58%, 4m40s, ETA 1h37m)...
Estimated depth-maps 23 (4.79%, 4m53s, ETA 1h37m)...
Estimated depth-maps 24 (5.00%, 5m2s, ETA 1h35m)...
Estimated depth-maps 25 (5.21%, 5m17s, ETA 1h36m)...
Estimated depth-maps 26 (5.42%, 5m19s, ETA 1h33m)...
Estimated depth-maps 27 (5.62%, 5m38s, ETA 1h34m)...
Estimated depth-maps 28 (5.83%, 5m51s, ETA 1h34m)...
Estimated depth-maps 29 (6.04%, 6m7s, ETA 1h35m)...
Estimated depth-maps 30 (6.25%, 6m11s, ETA 1h32m)...
Estimated depth-maps 31 (6.46%, 6m26s, ETA 1h33m)...
Estimated depth-maps 32 (6.67%, 6m38s, ETA 1h32m)...
Estimated depth-maps 33 (6.88%, 6m54s, ETA 1h33m)...
Estimated depth-maps 34 (7.08%, 7m1s, ETA 1h32m)...
Estimated depth-maps 35 (7.29%, 7m9s, ETA 1h31m)...
Estimated depth-maps 36 (7.50%, 7m24s, ETA 1h31m)...
Estimated depth-maps 37 (7.71%, 7m30s, ETA 1h29m)...
Estimated depth-maps 38 (7.92%, 7m45s, ETA 1h30m)...
Estimated depth-maps 39 (8.12%, 8m2s, ETA 1h30m)...
Estimated depth-maps 40 (8.33%, 8m7s, ETA 1h29m)...
Estimated depth-maps 41 (8.54%, 8m22s, ETA 1h29m)...
Estimated depth-maps 42 (8.75%, 8m34s, ETA 1h29m)...
Estimated depth-maps 43 (8.96%, 8m51s, ETA 1h30m)...
Estimated depth-maps 44 (9.17%, 9m3s, ETA 1h29m)...
Estimated depth-maps 45 (9.38%, 9m12s, ETA 1h29m)...
Estimated depth-maps 46 (9.58%, 9m29s, ETA 1h29m)...
Estimated depth-maps 47 (9.79%, 9m43s, ETA 1h29m)...
Estimated depth-maps 48 (10.00%, 9m56s, ETA 1h29m)...
Estimated depth-maps 49 (10.21%, 10m10s, ETA 1h29m)...
Estimated depth-maps 50 (10.42%, 10m26s, ETA 1h29m)...
Estimated depth-maps 51 (10.62%, 10m35s, ETA 1h29m)...
Estimated depth-maps 52 (10.83%, 10m50s, ETA 1h29m)...
Estimated depth-maps 53 (11.04%, 10m59s, ETA 1h28m)...
Estimated depth-maps 54 (11.25%, 11m12s, ETA 1h28m)...
Estimated depth-maps 55 (11.46%, 11m23s, ETA 1h28m)...
Estimated depth-maps 56 (11.67%, 11m36s, ETA 1h27m)...
Estimated depth-maps 57 (11.88%, 11m47s, ETA 1h27m)...
Estimated depth-maps 58 (12.08%, 12m4s, ETA 1h27m)...
Estimated depth-maps 59 (12.29%, 12m10s, ETA 1h26m)...
Estimated depth-maps 60 (12.50%, 12m23s, ETA 1h26m)...
Estimated depth-maps 61 (12.71%, 12m35s, ETA 1h26m)...
Estimated depth-maps 62 (12.92%, 12m48s, ETA 1h26m)...
Estimated depth-maps 63 (13.12%, 13m1s, ETA 1h26m)...
Estimated depth-maps 64 (13.33%, 13m17s, ETA 1h26m)...
Estimated depth-maps 65 (13.54%, 13m31s, ETA 1h26m)...
Estimated depth-maps 66 (13.75%, 13m47s, ETA 1h26m)...
Estimated depth-maps 67 (13.96%, 13m58s, ETA 1h26m)...
Estimated depth-maps 68 (14.17%, 14m12s, ETA 1h26m)...
Estimated depth-maps 69 (14.38%, 14m28s, ETA 1h26m)...
Estimated depth-maps 70 (14.58%, 14m42s, ETA 1h26m)...
Estimated depth-maps 71 (14.79%, 14m50s, ETA 1h25m)...
Estimated depth-maps 72 (15.00%, 14m59s, ETA 1h24m)...
Estimated depth-maps 73 (15.21%, 15m12s, ETA 1h24m)...
Estimated depth-maps 74 (15.42%, 15m24s, ETA 1h24m)...
Estimated depth-maps 75 (15.62%, 15m40s, ETA 1h24m)...
Estimated depth-maps 76 (15.83%, 15m48s, ETA 1h24m)...
Estimated depth-maps 77 (16.04%, 16m, ETA 1h23m)...
Estimated depth-maps 78 (16.25%, 16m14s, ETA 1h23m)...
Estimated depth-maps 79 (16.46%, 16m26s, ETA 1h23m)...
Estimated depth-maps 80 (16.67%, 16m42s, ETA 1h23m)...
Estimated depth-maps 81 (16.88%, 16m55s, ETA 1h23m)...
Estimated depth-maps 82 (17.08%, 17m8s, ETA 1h23m)...
Estimated depth-maps 83 (17.29%, 17m21s, ETA 1h23m)...
Estimated depth-maps 84 (17.50%, 17m33s, ETA 1h22m)...
Estimated depth-maps 85 (17.71%, 17m44s, ETA 1h22m)...
Estimated depth-maps 86 (17.92%, 17m59s, ETA 1h22m)...
Estimated depth-maps 87 (18.12%, 18m10s, ETA 1h22m)...
Estimated depth-maps 88 (18.33%, 18m27s, ETA 1h22m)...
Estimated depth-maps 89 (18.54%, 18m40s, ETA 1h22m)...
Estimated depth-maps 90 (18.75%, 18m51s, ETA 1h21m)...
Estimated depth-maps 91 (18.96%, 19m4s, ETA 1h21m)...
Estimated depth-maps 92 (19.17%, 19m23s, ETA 1h21m)...
Estimated depth-maps 93 (19.38%, 19m35s, ETA 1h21m)...
Estimated depth-maps 94 (19.58%, 19m47s, ETA 1h21m)...
Estimated depth-maps 95 (19.79%, 20m, ETA 1h21m)...
Estimated depth-maps 96 (20.00%, 20m10s, ETA 1h20m)...
Estimated depth-maps 97 (20.21%, 20m23s, ETA 1h20m)...
Estimated depth-maps 98 (20.42%, 20m33s, ETA 1h20m)...
Estimated depth-maps 99 (20.62%, 20m45s, ETA 1h19m)...
Estimated depth-maps 100 (20.83%, 20m56s, ETA 1h19m)...
Estimated depth-maps 101 (21.04%, 21m9s, ETA 1h19m)...
Estimated depth-maps 102 (21.25%, 21m20s, ETA 1h19m)...
Estimated depth-maps 103 (21.46%, 21m36s, ETA 1h19m)...
Estimated depth-maps 104 (21.67%, 21m54s, ETA 1h19m)...
Estimated depth-maps 105 (21.88%, 21m56s, ETA 1h18m)...
Estimated depth-maps 106 (22.08%, 22m7s, ETA 1h18m)...
Estimated depth-maps 107 (22.29%, 22m19s, ETA 1h17m)...
Estimated depth-maps 108 (22.50%, 22m33s, ETA 1h17m)...
Estimated depth-maps 109 (22.71%, 22m47s, ETA 1h17m)...
Estimated depth-maps 110 (22.92%, 23m, ETA 1h17m)...
Estimated depth-maps 111 (23.12%, 23m17s, ETA 1h17m)...
Estimated depth-maps 112 (23.33%, 23m30s, ETA 1h17m)...
Estimated depth-maps 113 (23.54%, 23m39s, ETA 1h16m)...
Estimated depth-maps 114 (23.75%, 23m51s, ETA 1h16m)...
Estimated depth-maps 115 (23.96%, 24m4s, ETA 1h16m)...
Estimated depth-maps 116 (24.17%, 24m14s, ETA 1h16m)...
Estimated depth-maps 117 (24.38%, 24m26s, ETA 1h15m)...
Estimated depth-maps 118 (24.58%, 24m41s, ETA 1h15m)...
Estimated depth-maps 119 (24.79%, 24m56s, ETA 1h15m)...
Estimated depth-maps 120 (25.00%, 25m10s, ETA 1h15m)...
Estimated depth-maps 121 (25.21%, 25m27s, ETA 1h15m)...
Estimated depth-maps 122 (25.42%, 25m40s, ETA 1h15m)...
Estimated depth-maps 123 (25.62%, 25m54s, ETA 1h15m)...
Estimated depth-maps 124 (25.83%, 26m10s, ETA 1h15m)...
Estimated depth-maps 125 (26.04%, 26m25s, ETA 1h15m)...
Estimated depth-maps 126 (26.25%, 26m39s, ETA 1h14m)...
Estimated depth-maps 127 (26.46%, 26m47s, ETA 1h14m)...
Estimated depth-maps 128 (26.67%, 27m, ETA 1h14m)...
Estimated depth-maps 129 (26.88%, 27m12s, ETA 1h14m)...terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.0) /code/SuperBuild/src/opencv/modules/core/src/alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 2220942923328 bytes in function 'OutOfMemoryError'
Aborted (core dumped)
===== Dumping Info for Geeks (developers need this to fix bugs) =====
Child returned 134
Traceback (most recent call last):
File "/code/stages/odm_app.py", line 82, in execute
self.first_stage.run()
File "/code/opendm/types.py", line 470, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 470, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 470, in run
self.next_stage.run(outputs)
[Previous line repeated 1 more time]
File "/code/opendm/types.py", line 449, in run
self.process(self.args, outputs)
File "/code/stages/openmvs.py", line 121, in process
raise e
File "/code/stages/openmvs.py", line 107, in process
run_densify()
File "/code/stages/openmvs.py", line 102, in run_densify
system.run('"%s" "%s" %s' % (context.omvs_densify_path,
File "/code/opendm/system.py", line 112, in run
raise SubprocessException("Child returned {}".format(retcode), retcode)
opendm.system.SubprocessException: Child returned 134
===== Done, human-readable information to follow... =====
[ERROR] Uh oh! Processing stopped because of strange values in the reconstruction. This is often a sign that the input data has some issues or the software cannot deal with it. Have you followed best practices for data acquisition? See https://docs.opendronemap.org/flying/