Forum

Author Topic: Could we do not generate depth maps but go for build model directly with python?  (Read 953 times)

Jay

  • Newbie
  • *
  • Posts: 15
    • View Profile
Hey guys, is it possible to align photo and then build model directly without generate depth maps via python?  The generate depth maps part takes so much time  :'(

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14760
    • View Profile
Hello Jay,

There are several ways to generate the mesh model after completing the camera alignment:
1. based on tie points - would be completed very fast, but the model will be quite rough,
2. based on the dense point cloud (note that dense point cloud includes the depth maps generation step) - usually used for aerial surveys,
3. based on the depth maps source (depth maps will be generated automatically, if you select Depth Maps source option in the Build Model dialog) - suggested for the close range projects.

Without the depth maps generation you wouldn't be able to complete approaches 2 and 3 described above.

If the depth maps generation process takes a long time, you can lower the depth maps quality option. Also check that you have rather powerful GPU that is enabled in Metashape preferences window.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Jay

  • Newbie
  • *
  • Posts: 15
    • View Profile
Hello Jay,

There are several ways to generate the mesh model after completing the camera alignment:
1. based on tie points - would be completed very fast, but the model will be quite rough,
2. based on the dense point cloud (note that dense point cloud includes the depth maps generation step) - usually used for aerial surveys,
3. based on the depth maps source (depth maps will be generated automatically, if you select Depth Maps source option in the Build Model dialog) - suggested for the close range projects.

Without the depth maps generation you wouldn't be able to complete approaches 2 and 3 described above.

If the depth maps generation process takes a long time, you can lower the depth maps quality option. Also check that you have rather powerful GPU that is enabled in Metashape preferences window.

Hey Alexey , thanks for your reply, I really appreciate it.

There is one thing I don't really understood:  when I use UI, directly BuildMesh ( "source data" select "Depth maps") after Align Photos, is it going to build the depth maps automatically anyway?
Cause with those control, I could get a good model without losing a lot of time, I would like to do this control via python to use similar time and get similar model, is it possible?


« Last Edit: February 09, 2023, 12:03:11 PM by Jay »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14760
    • View Profile
Hello Jay,

Yes, when you call Build Mesh from GUI using the depth maps source option, it automatically generates the depth maps, unless Reuse Depth Maps option is enabled (is only available, when the depth maps of the selected quality are already present in the project).

If you observe the considerable processing time difference between GUI and Python runs, please save both logs related to the processing and attach them to post here or share with our support team.
Also make sure that GPU is utilized for the depth maps calculation started from Python script.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Jay

  • Newbie
  • *
  • Posts: 15
    • View Profile
Hello Jay,

Yes, when you call Build Mesh from GUI using the depth maps source option, it automatically generates the depth maps, unless Reuse Depth Maps option is enabled (is only available, when the depth maps of the selected quality are already present in the project).

If you observe the considerable processing time difference between GUI and Python runs, please save both logs related to the processing and attach them to post here or share with our support team.
Also make sure that GPU is utilized for the depth maps calculation started from Python script.

Thanks for the information.

Here is two log and the Scripts I uesed, although the configuration( like tie point limit in the script its actually small but still takes more time) is not exactly same but processing time and export model size have a lot of different
« Last Edit: February 10, 2023, 06:54:40 AM by Jay »