Forum

Author Topic: Not Enough Memory!!!  (Read 24291 times)

alexcagliari

  • Newbie
  • *
  • Posts: 1
    • View Profile
Not Enough Memory!!!
« on: October 13, 2015, 11:45:47 PM »
Hi,
i bought a pc only for use Photoscan..but....  :(
i7 6700K
32GB new DDR4 ram
Nvidia GeForce GTX 980  4GB

I'm using PS Pro 1.2.0 64 bit (in win 7 SP1 64 bit) and i'm trying to merge 140 photos taken from my phantom 3 pro...
I aligned photos with accuracy highest... all ok
I build dense cloud with quality ultra high... all ok
I build mesh with Face Count MEDIUM (3,843,290) = not enough memory  >:(

is it normal? what can i do?
« Last Edit: October 13, 2015, 11:51:05 PM by alexcagliari »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #1 on: October 13, 2015, 11:53:36 PM »
Hello alexcagliari,

You can try building mesh using Height Field option instead of Arbitrary, as the latter option is very resource demanding on higher dense cloud quality: http://www.agisoft.com/pdf/tips_and_tricks/PhotoScan_Memory_Requirements.pdf

Also note that if you are mostly interested in DEM/Orthomosaic outputs, you can build DEM based on the dense cloud, skipping mesh generation stage.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bcoyle

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Not Enough Memory!!!
« Reply #2 on: February 02, 2016, 04:36:29 PM »
I have almost the exact same rig, and just went through the same steps, ie. highest accuracy and highest dense point cloud. The project file/folder is now 8gigs. First time I got an 'Index overflow', and after reboot I've been getting 'Not enough memory'. Even when processing 1mil or 500k poly for the mesh. Settings are:

Surface type: Arbitrary
Source data: Dense cloud
Face count: 500,000

Interpolation: Enable (default)

- I'll try Height field, but isn't that mostly for aerial scanning?

ps: Would it even help if I doubled my memory? My CPU would only support 64gig if I was to upgrade further.

sc

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Not Enough Memory!!!
« Reply #3 on: February 02, 2016, 06:45:03 PM »
Split your chunk into smaller pieces before mesh generation, there are scripts that can do this for you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #4 on: February 02, 2016, 06:56:12 PM »
Hello bcoyle,

Number of polygons in the target model doesn't matter, as in Arbitrary mode PhotoScan will generate the mesh with the max possible number of faces and then will decimate it to the user-defined number.

So what is the number of points in the dense cloud (and quality used for dense cloud generation), number of images and their resolution?
Best regards,
Alexey Pasumansky,
Agisoft LLC

bcoyle

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Not Enough Memory!!!
« Reply #5 on: February 02, 2016, 07:12:18 PM »
Split your chunk into smaller pieces before mesh generation, there are scripts that can do this for you

Scripting is a pro feature that I can't afford for my hobby scans... You did have me excited until I found that out.

I wish I could select cameras after an initial alignment, so I can see the best clusters of photos to move into a new chunk. What bothers me most is I had no issue processing all of this years ago with an older version of Photoscan.. I thought maybe I'd get an improved version re-processing this time around.

Hello bcoyle,

Number of polygons in the target model doesn't matter, as in Arbitrary mode PhotoScan will generate the mesh with the max possible number of faces and then will decimate it to the user-defined number.

So what is the number of points in the dense cloud (and quality used for dense cloud generation), number of images and their resolution?

That's interesting to know that the mesh target wont matter. So when having meshing issues it's better to go back and reduce the point cloud. There's no way to limit the points used in the meshing is there? I'd have to go and re-process again at a different quality level?

# of points in sparse cloud: 33,226
# of points in dense cloud: 463,155,348
quality used for generation: Ultra High, Aggressive filtering
number of images: 316
image resolutions: 5616 x 3744 (shot with Canon 5D mk II) - each image is roughly 100mb .tif

At what point would it help me to double my RAM to 64gig? Or would it help at all? Is there a way to calculate photos + point cloud = memory needs?

thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #6 on: February 02, 2016, 07:27:30 PM »
Hello bcoyle,

According to the following document: http://www.agisoft.com/pdf/tips_and_tricks/PhotoScan_Memory_Requirements.pdf
the dataset of this size may require over 129 GB RAM.

In Standard edition you can still perform the approach implemented in script, just duplicate the chunk with the original dense cloud, reduce the bounding box, build mesh. Then remove the dense cloud from the duplicated chunk (to save the disk space), and perform the same operation with the original chunk, using different area for the reconstruction. It may be not as good in terms of accuracy of the box positioning, as script, but will give more or less similar results.
So I suggest to try such approach to identify the size of the dense cloud you can work with (with the actual amount of RAM) and decide if you can manually use chunking approach in this project. Additionally I suggest to save the project in PSX format, as it can grow to the huge size and may be problematic to work with, if it's kept as PSZ.

Not quite sure though, what features of the older version you are speaking about. I'm almost sure that it wasn't possible to generate Ultra mesh for 300 image of 18 MPIx images in older versions.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bcoyle

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Not Enough Memory!!!
« Reply #7 on: February 02, 2016, 07:32:49 PM »
Thanks for all this info Alexey! This will be a great reference.
I'm sure the old processing uses less points, hence why it worked back then. I wasn't aware that the mesh building was dependant on the points and that setting a 100k poly limit wouldn't help with the processing. Time to tinker with the scene some more and see what I can I achieve.

bcoyle

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Not Enough Memory!!!
« Reply #8 on: February 04, 2016, 04:16:47 PM »
Alexey,

One last question :)
The max possible number of faces during Build Mesh. Is that the 'High' Face count? Or is there possibly a higher number that the program is then decimated to that High, Medium, Low, or custom number?

So far I've had luck in re-processing the dense point cloud at High instead of Ultra High, and then running Low mesh build. No memory issue. I'm assuming since that worked I could also process the high. But I also want to try processing Interpolation Extrapolated vs. Enabled

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #9 on: February 04, 2016, 04:42:44 PM »
Hello bcoyle,

If you need to get max possible number of polygons, use zero in the face count field. In arbitrary mode mesh is generated to the max possible number of polygons and then decimated to the input face count.

So number of polygons in the build mesh dialog doesn't have effect on the memory consumption. For example, if you have over 100 millions points in the dense cloud and use 10 faces for mesh generation, it will still require huge amount of memory to process the data.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bcoyle

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Not Enough Memory!!!
« Reply #10 on: February 04, 2016, 05:50:02 PM »
I see. So the various mesh face counts in the Mesh Build are a bit arbitrary as there's still a higher number above 'High' that the point cloud is being processed to. That max poly number is what seems to be the limiting factor in processing and getting memory errors. Am I following correctly?

So the solution with not enough memory is always to try processing a less dense point cloud, or process in sections.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #11 on: February 04, 2016, 08:25:57 PM »
Actually, the limiting factor is the size of the dense cloud that leads to very big model.

Another solution is using more RAM, but it doesn't help is any case, as the required amount can be easily above the reasonable numbers, if thousands of images are processed.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Not Enough Memory!!!
« Reply #12 on: February 04, 2016, 08:54:43 PM »
It would be fine, if it would be possible to decimate the point cloud to a desired size before meshing (like you can do for example in Meshlab with poisson disk sampling filter or something similar).   :D
Actually you have only five sizes (lowest, low, medium, ...) you can (blindly) choose and nothing in between.
As allways requested in the old feature request: Dense Cloud Filtering from 2013.

Karsten
« Last Edit: February 09, 2016, 08:01:05 PM by Kiesel »

psfan

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Not Enough Memory!!!
« Reply #13 on: September 19, 2016, 02:18:21 PM »
Yeah,me too, I have 4TB RAM with 8 X E78857, also got "Index Overflow" error message. 2700 photos, Arbitary, Dense Cloud
I have almost the exact same rig, and just went through the same steps, ie. highest accuracy and highest dense point cloud. The project file/folder is now 8gigs. First time I got an 'Index overflow', and after reboot I've been getting 'Not enough memory'. Even when processing 1mil or 500k poly for the mesh. Settings are:

Surface type: Arbitrary
Source data: Dense cloud
Face count: 500,000

Interpolation: Enable (default)

- I'll try Height field, but isn't that mostly for aerial scanning?

ps: Would it even help if I doubled my memory? My CPU would only support 64gig if I was to upgrade further.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Not Enough Memory!!!
« Reply #14 on: September 19, 2016, 02:20:14 PM »
Hello psfan,

What's the number of points in the dense cloud?
Best regards,
Alexey Pasumansky,
Agisoft LLC