Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: an198317 on June 25, 2014, 08:09:19 PM

Title: Python Workflow is getting slower after a series looping runs
Post by: an198317 on June 25, 2014, 08:09:19 PM
Hi,

I created a Python workflow to loop through the different folders for making a series models.

As I can see the first one or two Photoscan run is fairly fast, but PhotoScan get slower and slower. And I can tell the mesh creating step is really taking a long time not processing but "waiting" when it's already showing mesh creating is 100% finished.

In my python workflow, I did remove chunks after each model made, and also did garbage collector run. But it seems not work. The only way can speed PhotoScan is closing it and reopen PhotoScan, then the process will be back to fast again.

Any thoughts or inputs are really appreciated.
Title: Re: Python Workflow is getting slower after a series looping runs
Post by: Alexey Pasumansky on June 25, 2014, 09:00:20 PM
Hello an198317,

Is it possible that delay on 100% mesh generation is caused by huge number of polygons and solid/shaded mode turned on? You can try to disable automatic switch to model view in Preferences and see if it works faster.

Please also specify if you are removing chunks by .remove() method or by assigning None to chunk variable?
Title: Re: Python Workflow is getting slower after a series looping runs
Post by: an198317 on June 25, 2014, 10:34:11 PM
Hi Alexey,

Thanks for your response. As I talked to you before, I have already turned off the "switch to the model view by default". So the PhotoScan is actually showing nothing but running my python code to process the model.

And I used .remove() method to remove the current chunk. And after this step, I used gc.collect() to collect the garbage.

Thanks again!
Nan
Title: Re: Python Workflow is getting slower after a series looping runs
Post by: Alexey Pasumansky on July 12, 2014, 06:30:42 PM
Hello Nan,

Could you please send your code to my e-mail?