alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.1k stars 1.08k forks source link

meshroom_photometry --cache option doesn't work properly #1153

Open dancadar opened 3 years ago

dancadar commented 3 years ago

when trying to use meshroom_photogrammetry command, can't use --cache option, it will try to find cached files in the wrong location:

/opt/Meshroom/meshroom_photogrammetry -p photogrammetry -I frames/ -o meshroom_cmd_line_test --cache cache_dir
...
Traceback (most recent call last):
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/cx_Freeze/initscripts/__startup__.py", line 40, in run
  File "/opt/Meshroom/setupInitScriptUnix.py", line 39, in run
  File "bin/meshroom_photogrammetry", line 203, in <module>
  File "/opt/Meshroom/meshroom/core/graph.py", line 1154, in executeGraph
  File "/opt/Meshroom/meshroom/core/node.py", line 365, in process
  File "/opt/Meshroom/meshroom/nodes/aliceVision/CameraInit.py", line 318, in processChunk
  File "/opt/Meshroom/meshroom/nodes/aliceVision/CameraInit.py", line 308, in createViewpointsFile
FileNotFoundError: [Errno 2] No such file or directory: './cache/CameraInit/09405fa4d8fe1d4ec9cee8313db7389cfa259a3f//viewpoints.sfm'

It did properly create cache directory, but then it created another directory inside of it with the same name where it would dump the cache, but would fail to properly use it:

$ ls -l
total 4603000
drwxr-xr-x 3 dan admins       4096 Nov 17 23:49 cache_dir
drwxr-xr-x 2 dan admins      36864 Nov 17 21:16 frames
-rw------- 1 dan admins 1891718688 Nov 17 02:39 DJI_0479.MP4
-rw------- 1 dan admins 1182935783 Nov 17 13:27 DJI_0717.MP4
-rw------- 1 dan admins 1493779484 Nov 17 13:28 DJI_0764.MP4
-rw-r--r-- 1 dan admins  144885336 Nov 17 21:53 castel.blend
-rw-r--r-- 1 dan admins      88014 Nov 17 21:18 keyframes.mg
$ ls -l cache_dir/
total 4
drwxr-xr-x 14 dan admins 4096 Nov 17 23:49 cache_dir
$ ls -l cache_dir/cache_dir/
total 48
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 CameraInit
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 DepthMap
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 DepthMapFilter
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 FeatureExtraction
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 FeatureMatching
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 ImageMatching
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 MeshFiltering
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 Meshing
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 PrepareDenseScene
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 Publish
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 StructureFromMotion
drwxr-xr-x 3 dan admins 4096 Nov 17 23:49 Texturing

It does work, however, if i use "--cache ."

ThibaultLejemble commented 3 years ago

I think it is working using global paths instead of relative ones (i.e. /opt/Meshroom/meshroom_photogrammetry ... --cache /global/path/to/cache_dir)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.