Forum

Author Topic: Out of Memory  (Read 19586 times)

IanJohnson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Out of Memory
« on: June 15, 2011, 06:18:34 AM »
I'm having trouble creating geometry from 13 5 megapixel photos on 4GB of RAM.  I ran a similar set with about 20 photos at High Quality 200k triangles and got a really nice model.  Other similar chunks keep failing. 

While reconstructing and creating geometry it runs at around 1.5GB of RAM.  When the geometry reaches 100%, memory usage begins to climb until it runs out and never begins decimating the mesh.  The same thing happens at 100k polys/High Quality, but a medium quality build will succeed.

Is this a bug, or is there something about a set of photos that can cause excessive memory usage between the mesh build and decimation?

This is with 0.8.2 build 979.  I started to try the same chunk with 0.8.1, but it was going to take 4 hours to complete the geometry rather than the 90 minutes or so that 0.8.2 was going to take and I didn't want to wait.  I'm trying 0.8.2 build 958 now.

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Out of Memory
« Reply #1 on: June 15, 2011, 12:09:20 PM »
from my personal  view ia a feature of new version of Photoscan. im curently reinstaled PC with new board and 16 GB ram, if need, send me files over dropbox, can compute it for you.........
----------------
www.mhb.sk

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Out of Memory
« Reply #2 on: June 15, 2011, 01:41:37 PM »
Hello Ian,

Before decimation procedure is performed PhotoScan allocates buffer which could be several times greater than reconstructed geometry is. That's why "Out of memory" problems sometimes appear on systems with rather limited amount of memory.

Please also note that the face count parameter only specifies the target face count for mesh decimation performed as a post processing step. The size of the reconstructed mesh before decimation can be considerably larger (I expect several millions of polygons for your data set). So it may be required to decrease quality setting to bring the RAM usage down.

What operating system are you using (Win32/64, ...) and what reconstruction method is used?
Best regards,
Alexey Pasumansky,
Agisoft LLC

IanJohnson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Out of Memory
« Reply #3 on: June 16, 2011, 01:17:51 AM »

I'm running Win7 64bit.  I was trying to build at Arbitrary-High-Sharp. 

Does the amount of detail in the photos effect the potential size of the mesh? 

What is the difference between High and Medium quality meshes with the same number of faces?  Are the images downsampled before processing with Medium?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Out of Memory
« Reply #4 on: June 16, 2011, 01:04:19 PM »
Hello Ian,

Images are downscaled corresponding to the target quality selected:
  • Ultra High - no scaling
  • High - images are downscaled two times by each side
  • Medium - downscaling four times by each side
  • Low - eight times
  • Lowest - sixteen times

The difference between High and Medium quality could be visible if original resolution is not high and some details are lost during downscaling. But amount of detail on photos does not effect the mesh size.

If you still have "Out of memory" problem you can use "0" as "Face count" parameter in "Build geometry" dialog box. In this case decimation would not be performed if it is the problem.
Best regards,
Alexey Pasumansky,
Agisoft LLC

GPC

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • Geopro
Re: Out of Memory
« Reply #5 on: June 16, 2011, 11:28:33 PM »
That's an interesting tip. Thanks Alex.

Here's a general question about processing time and memory usage:

Let's say I have two identical machines, except one has 8GB and the other has 16GB of ram. Given the same set of images, will the 16GB computer process the data set faster? Or, does the program only utilize the RAM it needs and not the RAM available?

Is it possible to forecast how much memory will be required based on the photo alignment results and the quality settings? A forecast would be very beneficial.. there is nothing more frustrating than processing a dataset for 26 hours just to have it fail with an "Out of memory error" when it's 99% complete.
« Last Edit: June 16, 2011, 11:32:56 PM by cs »
When things get weird, the weird turn pro.

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Out of Memory
« Reply #6 on: June 16, 2011, 11:49:52 PM »
Alex, how can it be understand that ULTRA HIGH - no downscaling is a feature of what version of Photoscan ???
im using Standard edition and cannot set ULTRA HIGH...... what are setting for that ??
----------------
www.mhb.sk

IanJohnson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Out of Memory
« Reply #7 on: June 17, 2011, 02:07:50 AM »
When I am splitting a project I want to set up chunks that I know will be successfully processed, and need to know what the limitations of my computer are.  Would the number of points generated in the sparse cloud be a good metric? 

Suppose I have two sets of 30 photos totaling 500MB each.  After photo alignment Set #1 has 16,000 points and Set #2 has 8,000.  Can I expect Set #1 to possibly take twice as much memory to mesh, since there seems to be much more detail and many more points to be detected during dense reconstruction?

janosch1234

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Out of Memory
« Reply #8 on: June 17, 2011, 03:43:54 AM »
Alex, how can it be understand that ULTRA HIGH - no downscaling is a feature of what version of Photoscan ???
im using Standard edition and cannot set ULTRA HIGH...... what are setting for that ??
Hi Wishgranter,

the "Ultra high" setting is a feature of PhotoScan Professional.

Best regards
Jan
« Last Edit: June 17, 2011, 03:53:04 AM by Jan Wesbuer »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Out of Memory
« Reply #9 on: June 17, 2011, 01:42:46 PM »
Hello,

Here's a general question about processing time and memory usage:

Let's say I have two identical machines, except one has 8GB and the other has 16GB of ram. Given the same set of images, will the 16GB computer process the data set faster? Or, does the program only utilize the RAM it needs and not the RAM available?

PhotoScan utilizes RAM only it needs, so if the set could be completely placed into 8Gb the time results on these two system should be similar. But if 8Gb is not enough for the whole set the first machine will use cache and processing will be significantly slower.

Concerning predictable memory use for geometry reconstruction, it seems to be possible but with the 50% accuracy, I guess. Later on I'll post the way it could be calculated, but we have to think about it for now.
Best regards,
Alexey Pasumansky,
Agisoft LLC

datapolo

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Out of Memory
« Reply #10 on: June 18, 2011, 07:56:55 PM »
Alexey,
does the quality setting affect the pixel resolution of the output orthophoto? Or is it just the resolution of the 3D model grid?

Regards,
Mike

IanJohnson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Out of Memory
« Reply #11 on: June 19, 2011, 03:03:10 AM »
I'm finding that my limit at 4GB seems to be around 16k to 18k points in the sparse cloud, typically from 12-15 5 megapixel photos.

4GB is the limit for my laptop, but I'm upgrading my home theater PC to 8GB so I can run processes overnight and during the weekday when no one is watching TV.

I'll be happy when the merging chunks gets fixed since I have to split my projects so much.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Out of Memory
« Reply #12 on: June 20, 2011, 01:39:08 PM »
Hello Mike,

Quality setting effects only on building geometry, but if you are reconstructing for example aerial photos of the urban area on the low quality settings the buildings and other complicated structures could be reconstructed with low accuracy causing  orthophoto to have errors. But for plain terrain low quality settings mostly give reasonable results.
Best regards,
Alexey Pasumansky,
Agisoft LLC