Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: cb on July 19, 2011, 09:13:43 PM

Title: Geometry type 'smooth' never finishes the job
Post by: cb on July 19, 2011, 09:13:43 PM
Hello,

I have had amazing results with Photoscan but not since build 958 at the beginning of June.

I have been using the software to scan heads of people. Since June, at the 'Generating mesh' stage, Photoscan gives up at "46% done" with virtual memory getting stuck at very high levels.


This is what happens;

My computer is a windows xp 64bit, dual quad core (Intel Core(TM) i7 950 @ 3.07GHz), 12GB RAM, Quadro FX 1800.
The "build Geometry" settings are Arbitrary, High, Smooth, 0 face count (I intend to decimate it later).

With about 30 photos of a person's head, 'Reconstructing depth' may take around 1 hour and a half, using about 95% of CPU and 1 GB of RAM and 1GB of virtual memory.
When 'Generating mesh' starts, CPU usage goes down to 0% and RAM usage goes up steadily from about 3GB at the Depth1/11 stage (which I see in Output window) to about 10GB at the Depth 10/11 stage.Virtual memory goes up to about 16GB. It takes about 15 minutes to go from Depth 1/11 to Depth 10/11.

After about 4 hours at the 'Generating mesh' stage at depth 10/11, with virtual memory stuck at about 15 or 20gb, I give up. Sometimes the last depth level gets done but the same memory problem occurs.

I can obtain geometry if I opt for medium quality, or sharp geometry type, or if I reduce the number of images used or reduce their resolution. However, in all these cases the result is mediocre or bad and not as good as Photofly. So unless I use High, Smooth and have 30 images, there is no point in using Photoscan.

I have tried using the openCL option with 2 CPUs turned off, but Photoscan crashes.

I have tried using Chunks but merging bits of a head together looses a lot of the detail and creates lumps.

Is it worth buying more RAM? I already have 12Gb and photoscan never uses all of it - it uses about 8gb at depth 9/11 and goes up to about 11 GB at Depth 10/11. You say in your 'performance' pdf that "12GB RAM will allow to process up to 200-300 photographs."and I only use about 30. You also say that "The whole chain of operations could easily occupy 4-6 hours when building a model from hundreds of photos." I have been waiting that long before ending the task with only 30 photos.

I cannot send you the output window contents as I always have to stop the program through Task manager, but I have attached a screen grab.

thanks
Title: Re: Geometry type 'smooth' never finishes the job
Post by: Alexey Pasumansky on July 20, 2011, 05:40:02 PM
Hello Charles,

Thank you for reporting.

We have tested geometry reconstruction with the same parameters (Arbitrary, High, Smooth) on the set of 24 12Mpix images, but have not faced described huge memory consumption. Building geometry process took 3 hours with a memory peak at generating mesh stage about 9 Gb.

If you are not using volume selection option already, we would recommend to set up a reconstruction volume bounding box so that only head of the person is included. This should help to minimize the reconstruction volume and memory consumption should be also lower during processing.

It will be very helpful if you could provide a sample data set so that we could reproduce the problem ourselves.
Title: Re: Geometry type 'smooth' never finishes the job
Post by: cb on July 20, 2011, 08:07:23 PM
thank you for the reply.

I have been setting a tight volume bounding box around the heads.

I have sent you an email with a link to my photos and my photoscan project. It would be great if you could look at these.

However, could the problem be with my computer? Why does photoscan hang right at the end of it's process, on the last Depth stage?
Title: Re: Geometry type 'smooth' never finishes the job
Post by: IanJohnson on July 21, 2011, 08:09:26 PM
Were you able to process the same datasets on earlier builds?  I run into the same problem a lot, always at 46%.  Sometimes when I run out of memory, there is an error but it usually happens as you describe.  The cancel button doesn't work so the only option is to force quit.

On 4GB of ram I can manage about 3-6 10MP images at high.  With 8GB ram I can do a few more.  At medium I might be able to push it to 80 photos, but beyond that I stand a good chance of running into this problem.  Unfortunately running out of memory on large sets means it has already taken hours to get to that point, making it all wasted time.

I wish there was a way to save the work from reconstructing depth, and then somehow limit the mesh generation.  Kind of a "pre-decimation"  Then if it crashes, we can dial down the face count and jump straight back to mesh generation without redoing the depth reconstructing.  I have no idea if that is even possible.

Title: Re: Geometry type 'smooth' never finishes the job
Post by: cb on July 21, 2011, 09:07:49 PM
I have had a very helpful reply back from Alexey. He tested my photos and they needed 14GB of RAM and I only have 12GB. As far as I understand, if photoscan goes to swap, CPU goes to 0% and Photoscan runs off memory which can be hundreds of times slower than CPU.

However, the good news is that the next update will solve this problem and use less RAM in the last stage.

And yes in earlier builds I was able to process far larger sets. I was getting amazing results with 40 21mp photos.
Title: Re: Geometry type 'smooth' never finishes the job
Post by: Alexey Pasumansky on July 22, 2011, 04:12:26 PM
Hello Ian,
Quote
  I run into the same problem a lot, always at 46%.  Sometimes when I run out of memory, there is an error but it usually happens as you describe.
While testing the image set provided by Charles at Arbitrary, High, Smooth parameters we had the same progress bar "jump" from 46% to 82% but due to it was not accompanied by the lack of memory we were able to complete the task. So this progress bar "stop" at 46% does not always mean the memory shortage.
By the way, if you do remember - how many depth stages are there usually when you experience memory shortage?