Forum

Author Topic: Major Speed and memory managment overhaul needed  (Read 3307 times)

Mak11

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Major Speed and memory managment overhaul needed
« on: July 21, 2018, 12:32:23 PM »
I've just recently decided to upgrade my gear and went from a 14.3Mp camera to a 24.2MP cam and suffice to say that Photoscan sure didn't "love" it at all. Neither did my PC or my electricity bill. The processing times are now unbearable (yes even the alignment process which can take 40 Minutes for 190 photos TIFF/16Bit in PS 1.4.2 while the exact same set takes 2 Minutes in RC which doesn't even use the GPU for this stage!).
Reconstruction is now faster compared to last year when using the experimental method but I now can't do it in ultra-high quality because I run out of memory given the resolution of the cameras so I will have to use the old method..which can take days now (build ultra-high dense cloud then high-poly mesh...). Photoscan seriously need to support out-of-core computation after all these years.

I just couldn't bring myself to use Reality Capture before because of it's horrible UI, serious lack of features compared to PS, horrible pricing and the fact that it's CUDA only. But I'm on the verge of grabbing an NVIDIA GPU & 3/month license just to process some of my scans given how slow PS has become for me.

I really hope that the Agisoft team is working on improving Photoscan's memory management in particular because everybody doesn't have 64GB in there PC (32GB here which have become nearly useless with 150+ 24MP cameras..).

Sorry for the small rant folks but PS is such an awesome piece of software especially in terms of features. A boost in perf for high res photo sets is really the only thing missing.

Cheers

ps. Using chunks can be a band-aid solution but definitely not the easiest or logical especially for single object scan projects when you simply aim to create a super high-poly mesh to use for baking
« Last Edit: July 21, 2018, 09:14:07 PM by Mak11 »

stihl

  • Sr. Member
  • ****
  • Posts: 410
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #1 on: July 22, 2018, 03:29:29 PM »
Why do you process the TIFFs and not the high quality JPEGS? There are numerous topics on this that shows that using TIFFs (except greyscale thermal) does not necessarily yield better results.

Though the increased size for the TIFFs will use more memory while processing.

dense_data

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #2 on: July 22, 2018, 03:54:37 PM »
While this may be true, I have to agree with the OP that PhotoScan is quite memory hungry compared to other software.

Mak11

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #3 on: July 22, 2018, 08:25:59 PM »
Why do you process the TIFFs and not the high quality JPEGS? There are numerous topics on this that shows that using TIFFs (except greyscale thermal) does not necessarily yield better results.

Though the increased size for the TIFFs will use more memory while processing.

Yes TIFFs are not necessarily useful in all scenarios but the photos resolution seems to have a lot more impact on the processing times and memory footprint than theirs file size. I ran the same test using JPEGs versions of the same photo sets and ran into the same memory and extra long processing issues.

Cheers
« Last Edit: July 23, 2018, 03:41:35 PM by Mak11 »

JRM

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #4 on: July 23, 2018, 09:59:59 AM »
Out-of-core memory algorithms are an old request, it is clearly not an easy task but it would be so nice to launch a process on tens of thousands cameras over the weekend without getting a bad allocation greeting on monday

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #5 on: July 25, 2018, 08:53:51 PM »
Hello Mak11,

Regarding the long alignment time, can you specify, which parameters have you used at this stage? Was the preselection enabled?

Maybe you have the processing log related to the operation or at least timing for image matching and alignment itself?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mak11

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #6 on: July 26, 2018, 12:57:34 AM »
Hello Mak11,

Regarding the long alignment time, can you specify, which parameters have you used at this stage? Was the preselection enabled?

Maybe you have the processing log related to the operation or at least timing for image matching and alignment itself?

Alexey,

I'm currently using 40000 Key/10000 Tie Points with either High or Highest because this is is what seems to work best with the alignement with background suppression technique. I did notice that using mask does make the alignment process longer btw. I can't check if preselection is enabled but I think that yes it is..will let you know once PS finishes processing in a few hours.

I don't have the logs but IIRC at the Highest alignment settings it approximatively takes 40Mins to align 120 24MP photos. For reference RC (which doesn't even use the GPU for this operations) takes 3 mins to align the same photo set with the same 40000/10000 settings..which is kinda crazy.

Obviously lowering the tie points limit does speed up things.. but high res (24MP in my case) images simply trash the performance in PS and there's no way around it as far as I can see. With lower res images Photoscan is often just a little bit slower than RC when aligning but once I crank up the number of photos & use higher res ones then I know that I can simply hit start and come back at least half an our later :-(

You guys already know that but the Depth Map filtering process really needs a big boost (make it OpenCL compatible?).

Cheers

« Last Edit: July 26, 2018, 01:02:03 AM by Mak11 »

Alvaro L

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Major Speed and memory managment overhaul needed
« Reply #7 on: July 26, 2018, 01:18:53 PM »
I don't think current bottlenecks have go an easy solution, Photoscan shows typical disadvantatges of massive discrete tasks and one of the main factor is image resolution, a 5000x3000 pixels image is in fact a 15 million pixels image, then multiply it for each chanel (RGB) and for the number of pics in the chunk and then allocate resources to all of them.

The main battle IMO is implemeting differential sampling without too much overhead, so more resources are allocated where their are really needed, for instance more sampling where the cloud is more sparse or there is more complexity.  I think that an usability overhaul could partially solve that, for instance linking for once parameters and jobs to regions, and allow for several regions in an scene, each one with its own quality settings, and allow for some boolean operations between regions, etc. and making everything a non-destructive process.

Currently Photoscan is following the same path others are using, which is throwing more silicon to the problem (GPU cores).
« Last Edit: July 26, 2018, 01:46:22 PM by Alvaro L »