Forum

Author Topic: Build Depth Maps as separate Job? (or at least save after creating them)  (Read 11582 times)

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Could Build Depth Maps be it's own Job in the workflow and Batch Process dialog?
Or could the batch process at least save the project after the Depth Maps are created?

I've had Metashape and my machine crash for various reason when Building Mesh, and with my quite large projects, it's rather upsetting to know that the Build Depth Maps had been done successfully, but now it has to build them all over again, which is many hours of wasted time.  It'd be nice to resume Build Meshing and choose to 'reuse depth maps'!

Plus i guess Depth Maps are used as the source for a few things now...

Cheers.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Like this...?

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
No.
I mean that Metashape would save the project, like it optionally does when doing batch process jobs.
E.g. After Align Photos it saves, after Build Mesh it saves, etc, etc, etc...
But Build Depth Maps is a subtask within Build Dense Cloud, Build Mesh, etc, if they're told to use it as a source... The project doesn't get saved until both the depth maps and the dense cloud/mesh are completed.
If Metashape crashes, or the pc crashes, for whatever reasons, during the dense cloud or meshing stages, the creation of the depth maps isn't saved to disk (ssd).
« Last Edit: July 02, 2021, 03:53:25 PM by CheeseAndJamSandwich »
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Ok. A workaround would of course be to calculate another "product" with depth images.
E.g. a DEM.

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
But what i'm after is that if Depth Maps are generated, that Metashape can save them... So that the work done isn't wasted, if ms or the pc crashes for whatever silly reason...

It's not an issue for those building small projects, but some people, like myself, are working on big tasks, where each stage take multiple hours.

The justification, reasoning is exactly the same as having the "Save project after each step" feature to start with...  I'm just suggesting that Build Depth Maps could be classed as a step worthy of a 'Save Project'.

Oh, and i only have Standard  :'(
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Some of our projects also calculate days.
But if your computer occasionally crashes both with the dense point cloud and with DEM, you should look for another solution...

 8)

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
I don't understand...?

My laptop sometimes crashes because i've undervolted it a smidge too much, or i've tried doing other stuff whilst it's processing, or if i mistakenly created filenames, paths that are too long and Metashape crashes due to the 260 char limit, or other crashes i don't know the causes of...  It's not really important why it's crashed...  sh1t happens... We would just like things saved after each step, because it can save us hours of repeated processing occasionally.

Again, i'm requesting a feature to be extended, to include a stage of processing which logically could be its own 'job' perhaps.  And the reasoning being the same as the reason the "Save project after each step" feature exists.  That's all.

I'm not fussed if it's separated out as it's own task, or if it just triggers the project save, either will be good.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

dpitman

  • Full Member
  • ***
  • Posts: 246
    • View Profile
i'm requesting a feature to be extended, to include a stage of processing which logically could be its own 'job' perhaps.  And the reasoning being the same as the reason the "Save project after each step" feature exists.  That's all.

I'm not fussed if it's separated out as it's own task, or if it just triggers the project save, either will be good.

Makes sense. 

wojtek

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
They are saved to the Disk FYI, the project files just don't get updated. If you get a crash you can bring it back by editing the .xml files. That being said, there should be a save substep in Build Model/Cloud etc to avoid that.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Hi,

there are already a few similar threads on this matter:
https://www.agisoft.com/forum/index.php?topic=11785
https://www.agisoft.com/forum/index.php?topic=12224

I think that at some point the possibility to generate depth maps only will be added to GUI, however, now there's no exact timeframe for such functionality.
Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
They are saved to the Disk FYI, the project files just don't get updated. If you get a crash you can bring it back by editing the .xml files. That being said, there should be a save substep in Build Model/Cloud etc to avoid that.
That's handy to know!
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Hi,

there are already a few similar threads on this matter:
https://www.agisoft.com/forum/index.php?topic=11785
https://www.agisoft.com/forum/index.php?topic=12224

I think that at some point the possibility to generate depth maps only will be added to GUI, however, now there's no exact timeframe for such functionality.
Sweet.
Thanks Alexey.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Eric Baird

  • Newbie
  • *
  • Posts: 25
  • Quadro K5000 + Quadro K620 / Xeon Hex / 64M RAM
    • View Profile
    • The Brighton Toy and Model Index
Re: Build Depth Maps as separate Job? (or at least save after creating them)
« Reply #12 on: January 09, 2022, 08:22:47 PM »
Given that generating depth maps takes so much longer than most of the other steps, it would also be handy if Metashape allowed the resumption of an unfinished depth maps calculation.

So if a "calculate depth maps" stage is taking 20 hours, and it fails after 18, or if the user runs out of time and has to switch off their laptop, then the software saves all the depth maps calculated so far, and the next time that that particular project is opened, a dialog box opens saying that there are unfinished depth map calculations underway, and user is offered the chance to (1), continue with the calculations from where they left off (or from the beginning of the last incomplete block or tile), (2), close the project file immediately with no changes, so that they still have the option of reloading it and completing the calculations at a later date, or (3), discarding the incomplete calculations and proceeding with other editing stuff.

So I guess that a possible dialog box might be:
"Incomplete depth map calculations are available. Do you want to complete them now, exit and complete them later, or discard them and continue editing?"
, with button options "Resume now", "Resume Later", and "Discard"

sfmdd

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Build Depth Maps as separate Job? (or at least save after creating them)
« Reply #13 on: January 10, 2022, 11:58:19 AM »
If you cancel Dense Cloud oder Build Mesh process after the depth maps are completed the depth maps will preserve and you can save the project and continue the process later.
Maybe you can write a script for overnight projects doing that as a workaround.

Greetings

JRM

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Build Depth Maps as separate Job? (or at least save after creating them)
« Reply #14 on: January 11, 2022, 01:56:43 PM »
sfmdd > it would not adress Eric's point, if the depthmap stage has not been fully achieved there is no easy way to resume this part of the task or the whole task.