alicevision / Meshroom

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

[question] DepthMap failing on deviceSimilarityVolume.cu #2105

Open AntonKrug opened 1 year ago

AntonKrug commented 1 year ago

Describe the problem When running DepthMap I get obscure error and can't proced, tweaking few things didn't help. Googling the issue find similar issues, but not exactly this one.

Dataset Allt he photos i took are taken vertically, had to use SfMTransform to level it and then to align the ground with another manual transfer. This is my very first time using the tool with 38 images, just to get hang of it. I do not care if the output model will be ugly and I shoud have taken more pictures and get better time of the day (it was overcast then moment later I got sun), but just to run it once to see it working. See the screenshot:

image

After running DepthMap I get cryptic error. I used to get warning that my tile sizes do not match, so then i made them same size, that resolved the warning but the issue still present. Tried it with 2 and 4 downsample.

Log

[2023-07-09 02:23:25.031658] [0x000014d4] [trace]   Embedded OCIO configuration file: 'D:\work\photogrammetry\Meshroom-2023.2.0\aliceVision/share/aliceVision/config.ocio' found.
Program called with the following parameters:
 * autoAdjustSmallImage = 1
 * chooseTCamsPerTile = 1
 * colorOptimizationEnabled = 1
 * colorOptimizationNbIterations = 100
 * customPatchPatternGroupSubpartsPerLevel = 233 (default)
 * customPatchPatternSubparts =  Unknown Type "class std::vector<struct aliceVision::depthMap::CustomPatchPatternParams::SubpartParams,class std::allocator<struct aliceVision::depthMap::CustomPatchPatternParams::SubpartParams> >" (default)
 * downscale = 4
 * exportIntermediateCrossVolumes = 0
 * exportIntermediateDepthSimMaps = 0
 * exportIntermediateNormalMaps = 0
 * exportIntermediateTopographicCutVolumes = 0
 * exportIntermediateVolume9pCsv = 0
 * exportIntermediateVolumes = 0
 * exportTilePattern = 0
 * imagesFolder = "d:/work/photogrammetry/MeshroomCache/PrepareDenseScene/48aa81d2e7745631a168707b65f77742271f9124"
 * input = "d:/work/photogrammetry/MeshroomCache/SfMTransform/9ef45260b945663c51fcc804028ccf6111f4e4e0/sfm.abc"
 * maxCoresAvailable =  Unknown Type "unsigned int" (default)
 * maxMemoryAvailable = 18446744073709551615 (default)
 * maxTCams = 10
 * maxViewAngle = 70
 * minViewAngle = 2
 * nbGPUs = 0
 * output = "d:/work/photogrammetry/MeshroomCache/DepthMap/3ec225ee6b6766afa6cdc9ae0e3404d43677c461"
 * rangeSize = 3
 * rangeStart = 0
 * refineEnabled = 1
 * refineGammaC = 15.5
 * refineGammaP = 8
 * refineHalfNbDepths = 15
 * refineInterpolateMiddleDepth = 0
 * refineMaxTCamsPerTile = 4
 * refineScale = 1
 * refineSigma = 15
 * refineStepXY = 1
 * refineSubsampling = 10
 * refineUseConsistentScale = 0
 * refineUseCustomPatchPattern = 0
 * refineWSH = 3
 * sgmDepthListPerTile = 1
 * sgmDepthThicknessInflate = 0
 * sgmFilteringAxes = "YX"
 * sgmGammaC = 5.5
 * sgmGammaP = 8
 * sgmMaxDepths = 1500
 * sgmMaxSimilarity = 1
 * sgmMaxTCamsPerTile = 4
 * sgmP1 = 10
 * sgmP2Weighting = 100
 * sgmScale = 2
 * sgmSeedsRangeInflate = 0.2
 * sgmStepXY = 2
 * sgmStepZ = -1
 * sgmUseConsistentScale = 0
 * sgmUseCustomPatchPattern = 0
 * sgmUseSfmSeeds = 1
 * sgmWSH = 4
 * tileBufferHeight = 625
 * tileBufferWidth = 416
 * tilePadding = 64
 * verboseLevel = "info"

Hardware : 
    Detected core count : 4
    OpenMP will use 4 cores
    Detected available memory : 52537 Mo

[02:23:25.036646][info] CUDA-Enabled GPU.
Device information:
    - id:                      0
    - name:                    Quadro M2000M
    - compute capability:      5.0
    - clock frequency (kHz):   1137000
    - total device memory:     4095 MB 
    - device memory available: 3412 MB 
    - per-block shared memory: 49152
    - warp size:               32
    - max threads per block:   1024
    - max threads per SM(X):   2048
    - max block sizes:         {1024,1024,64}
    - max grid sizes:          {2147483647,65535,65535}
    - max 2D array texture:    {65536,65536}
    - max 3D array texture:    {4096,4096,4096}
    - max 2D linear texture:   {65536,65536,1048544}
    - max 2D layered texture:  {16384,16384,2048}
    - number of SM(x)s:        5
    - registers per SM(x):     65536
    - registers per block:     65536
    - concurrent kernels:      yes
    - mapping host memory:     yes
    - unified addressing:      yes
    - texture alignment:       512 byte
    - pitch alignment:         32 byte
CUDA build version: 11.6
[02:23:25.125521][info] Supported CUDA-Enabled GPU detected.
[02:23:25.236256][info] Found 1 image dimension(s): 
[02:23:25.236256][info]     - [1667x2500]
[02:23:25.353910][info] Overall maximum dimension: [1667x2500]
[02:23:25.353910][warning] Single tile computation, override SGM maximum number of T cameras per tile (before: 4, now: 10).
[02:23:25.353910][warning] Single tile computation, override Refine maximum number of T cameras per tile (before: 4, now: 10).
[02:23:25.353910][warning] Single tile computation, override SGM step XY (before: 2, now: 1).
[02:23:25.354938][info] Tiling information: 
    - parameters: 
          - buffer width:  416 px
          - buffer height: 625 px
          - padding: 64 px
    - maximum downscale:  2
    - maximum image width:  416 px
    - maximum image height: 625 px
[02:23:25.354938][info] Maximum image size is smaller than one tile, use only one tile.
[02:23:25.354938][info] SGM parameters:
    - scale: 2
    - stepXY: 1
[02:23:25.354938][info] Refine parameters:
    - scale: 1
    - stepXY: 1
[02:23:25.354938][info] Number of GPU devices: 1, number of CPU threads: 4
[02:23:25.558341][info] Device memory:
    - available: 2730.27 MB
    - requirement for the first tile: 524.01 MB
    - # computation buffers per tile: 491.28 MB (Sgm: 463.509 MB, Refine: 27.771 MB)
    - # input images (R + 10 Ts): 32.7301 MB (single mipmap image size: 2.97546 MB)
[02:23:25.559338][info] Parallelization:
    - # tiles per image: 1
    - # simultaneous depth maps computation: 5
    - # simultaneous tiles computation: 5
[02:23:25.616472][info] Device memory (device id: 0):
    - used: 2159.04 MB
    - available: 1936.83 MB
    - total: 4095.88 MB
[02:23:38.054198][info] (rc: 0, tile: 1/1) Camera / Depth information: 
    - R camera:
       - id: 0
       - view id: 20499923
       - depth planes: 442
       - depths range: [0.703646-6.05737]
    - T cameras:
       - T camera (1/10):
          - id: 16
          - view id: 1096707777
          - depth planes: 425
          - depths range: [0.743048-6.05737]
          - depth indexes range: [17-442]
       - T camera (2/10):
          - id: 38
          - view id: 2114827362
          - depth planes: 442
          - depths range: [0.703646-6.05737]
          - depth indexes range: [0-442]
       - T camera (3/10):
          - id: 2
          - view id: 199565017
          - depth planes: 304
          - depths range: [1.01083-4.83566]
          - depth indexes range: [125-429]
       - T camera (4/10):
          - id: 8
          - view id: 552163487
          - depth planes: 319
          - depths range: [1.00465-6.05737]
          - depth indexes range: [123-442]
       - T camera (5/10):
          - id: 3
          - view id: 240618057
          - depth planes: 245
          - depths range: [1.13414-3.53176]
          - depth indexes range: [160-405]
       - T camera (6/10):
          - id: 11
          - view id: 690450856
          - depth planes: 254
          - depths range: [1.10316-3.56105]
          - depth indexes range: [152-406]
       - T camera (7/10):
          - id: 31
          - view id: 1699719090
          - depth planes: 365
          - depths range: [0.882115-6.05737]
          - depth indexes range: [77-442]
       - T camera (8/10):
          - id: 7
          - view id: 464687443
          - depth planes: 229
          - depths range: [1.09941-2.95062]
          - depth indexes range: [151-380]
       - T camera (9/10):
          - id: 33
          - view id: 1743816344
          - depth planes: 385
          - depths range: [0.835759-6.05737]
          - depth indexes range: [57-442]
       - T camera (10/10):
          - id: 32
          - view id: 1730789022
          - depth planes: 238
          - depths range: [1.08834-3.04581]
          - depth indexes range: [148-386]
[02:23:38.054198][info] (rc: 0, tile: 1/1) SGM depth/thickness map of view id: 20499923, rc: 0 (1 / 39).
[02:23:38.054198][info] (rc: 0, tile: 1/1) SGM Compute similarity volume.
[02:23:38.054198][info] (rc: 0, tile: 1/1) SGM Compute similarity volume done.
[02:23:38.054198][info] (rc: 0, tile: 1/1) SGM Optimizing volume (filtering axes: YX).
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM Optimizing volume done.
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM Retrieve best depth in volume.
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM Retrieve best depth in volume done.
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM depth/thickness map done.
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM Smooth thickness map.
[02:23:38.062176][info] (rc: 0, tile: 1/1) SGM Smooth thickness map done.
[02:23:38.062176][info] (rc: 0, tile: 1/1) Refine depth/sim map of view id: 20499923, rc: 0 (1 / 39).
[02:23:38.062176][info] (rc: 0, tile: 1/1) Refine and fuse depth/sim map volume.
[02:23:38.062176][info] (rc: 0, tile: 1/1) Refine and fuse depth/sim map volume done.
[02:23:38.062176][info] (rc: 0, tile: 1/1) Color optimize depth/sim map.
[02:23:38.063174][info] (rc: 0, tile: 1/1) Color optimize depth/sim map done.
[02:23:38.063174][info] (rc: 0, tile: 1/1) Refine depth/sim map done.
[02:23:38.094091][info] (rc: 1, tile: 1/1) Camera / Depth information: 
    - R camera:
       - id: 1
       - view id: 173443838
       - depth planes: 504
       - depths range: [0.273629-7.50791]
    - T cameras:
       - T camera (1/10):
          - id: 23
          - view id: 1300481133
          - depth planes: 353
          - depths range: [0.739743-7.50791]
          - depth indexes range: [151-504]
       - T camera (2/10):
          - id: 11
          - view id: 690450856
          - depth planes: 354
          - depths range: [0.736648-7.50791]
          - depth indexes range: [150-504]
       - T camera (3/10):
          - id: 7
          - view id: 464687443
          - depth planes: 417
          - depths range: [0.501412-5.74813]
          - depth indexes range: [74-491]
       - T camera (4/10):
          - id: 27
          - view id: 1484474669
          - depth planes: 460
          - depths range: [0.371413-5.85446]
          - depth indexes range: [32-492]
       - T camera (5/10):
          - id: 21
          - view id: 1190990732
          - depth planes: 486
          - depths range: [0.285284-5.64547]
          - depth indexes range: [4-490]
       - T camera (6/10):
          - id: 32
          - view id: 1730789022
          - depth planes: 484
          - depths range: [0.273629-5.09697]
          - depth indexes range: [0-484]
       - T camera (7/10):
          - id: 8
          - view id: 552163487
          - depth planes: 244
          - depths range: [0.982572-4.31951]
          - depth indexes range: [229-473]
       - T camera (8/10):
          - id: 17
          - view id: 1110054733
          - depth planes: 287
          - depths range: [0.944027-7.50791]
          - depth indexes range: [217-504]
       - T camera (9/10):
          - id: 12
          - view id: 743516421
          - depth planes: 227
          - depths range: [0.989307-3.56584]
          - depth indexes range: [231-458]
       - T camera (10/10):
          - id: 22
          - view id: 1228577487
          - depth planes: 309
          - depths range: [0.875933-7.50791]
          - depth indexes range: [195-504]
[02:23:38.094091][info] (rc: 1, tile: 1/1) SGM depth/thickness map of view id: 173443838, rc: 1 (2 / 39).
[02:23:38.094091][info] (rc: 1, tile: 1/1) SGM Compute similarity volume.
[02:23:38.095088][info] (rc: 1, tile: 1/1) SGM Compute similarity volume done.
[02:23:38.095088][info] (rc: 1, tile: 1/1) SGM Optimizing volume (filtering axes: YX).

CUDAError: no error
  file:       C:\Release\sources\official\AliceVision\src\aliceVision\depthMap\cuda\planeSweeping\deviceSimilarityVolume.cu
  function:   aliceVision::depthMap::cuda_volumeAggregatePath
  line:       373
 - commandLine: aliceVision_depthMapEstimation  --input "d:/work/photogrammetry/MeshroomCache/SfMTransform/9ef45260b945663c51fcc804028ccf6111f4e4e0/sfm.abc" --imagesFolder "d:/work/photogrammetry/MeshroomCache/PrepareDenseScene/48aa81d2e7745631a168707b65f77742271f9124" --downscale 4 --minViewAngle 2.0 --maxViewAngle 70.0 --tileBufferWidth 416 --tileBufferHeight 625 --tilePadding 64 --autoAdjustSmallImage True --chooseTCamsPerTile True --maxTCams 10 --sgmScale 2 --sgmStepXY 2 --sgmStepZ -1 --sgmMaxTCamsPerTile 4 --sgmWSH 4 --sgmUseSfmSeeds True --sgmSeedsRangeInflate 0.2 --sgmDepthThicknessInflate 0.0 --sgmMaxSimilarity 1.0 --sgmGammaC 5.5 --sgmGammaP 8.0 --sgmP1 10.0 --sgmP2Weighting 100.0 --sgmMaxDepths 1500 --sgmFilteringAxes "YX" --sgmDepthListPerTile True --sgmUseConsistentScale False --refineEnabled True --refineScale 1 --refineStepXY 1 --refineMaxTCamsPerTile 4 --refineSubsampling 10 --refineHalfNbDepths 15 --refineWSH 3 --refineSigma 15.0 --refineGammaC 15.5 --refineGammaP 8.0 --refineInterpolateMiddleDepth False --refineUseConsistentScale False --colorOptimizationEnabled True --colorOptimizationNbIterations 100 --sgmUseCustomPatchPattern False --refineUseCustomPatchPattern False --exportIntermediateDepthSimMaps False --exportIntermediateNormalMaps False --exportIntermediateVolumes False --exportIntermediateCrossVolumes False --exportIntermediateTopographicCutVolumes False --exportIntermediateVolume9pCsv False --exportTilePattern False --nbGPUs 0 --verboseLevel info --output "d:/work/photogrammetry/MeshroomCache/DepthMap/3ec225ee6b6766afa6cdc9ae0e3404d43677c461" --rangeStart 9 --rangeSize 3

Desktop (please complete the following and other pertinent information):

chrismade commented 1 year ago

I have the same issue (and using pretty similar hardware: HP Zbook 3 w/ Quadro M1000M 2GB, i7-6820HQ and 16GB RAM):

[10:07:57.781220][info] CUDA-Enabled GPU.
Device information:
    - id:                      0
    - name:                    Quadro M1000M
    - compute capability:      5.0
    - clock frequency (kHz):   1071500
    - total device memory:     2047 MB 
    - device memory available: 1681 MB 
    - per-block shared memory: 49152
    - warp size:               32
    - max threads per block:   1024
    - max threads per SM(X):   2048
    - max block sizes:         {1024,1024,64}
    - max grid sizes:          {2147483647,65535,65535}
    - max 2D array texture:    {65536,65536}
    - max 3D array texture:    {4096,4096,4096}
    - max 2D linear texture:   {65536,65536,1048544}
    - max 2D layered texture:  {16384,16384,2048}
    - number of SM(x)s:        4
    - registers per SM(x):     65536
    - registers per block:     65536
    - concurrent kernels:      yes
    - mapping host memory:     yes
    - unified addressing:      yes
    - texture alignment:       512 byte
    - pitch alignment:         32 byte
CUDA build version: 11.6
[10:07:57.867097][info] Supported CUDA-Enabled GPU detected.

cause: maybe some system requirements mismatch that have not been mentioned yet (explicitely) - however would be helpful if there is a SW solution e.g. parameter change to make it work - or tell user clearly that it won't work.

To make it reproducible I'm using the monstree demo picture set - neither "full" (max) nor "mini 3" (min) are working, all throw the same error message as shown above by @AntonKrug

Schaffi commented 6 months ago

I have the same issue. Geforce GTX 960. My solution: Change the DepthMap - Atrributes - Downscale to 16.

chrismade commented 6 months ago

@Schaffi thanks for this hint !! will try...