Author Topic: Speed up metashape process - multiprocessing or other multicore/thread methods  (Read 1018 times)


  • Newbie
  • *
  • Posts: 14
    • View Profile
Dear everyone,

I have a little question about how Python and Metashape works.
I have a problem, because I have to speed up a script which extract coordinates for any selected point in Metashape, but it needs like 27 days to run across 1 milion points.
For this reason I was wondering if you know a way to multiprocess everything and speed up a little the process.
I have already splitted  my dataframe in several parts, to call it in different functions, and I tried with asyncio to see if the process was speeding up a little but nothing. So I was wandering if multiprocessing package was a good solution. Unfortunately until now it gives me always an error:

Traceback (most recent call last):
  File "C:/Users/eepi0002/PycharmProjects/train/", line 207, in <module>
  File "C:\Users\eepi0002\AppData\Local\Programs\Python\Python38\lib\multiprocessing\", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Users\eepi0002\AppData\Local\Programs\Python\Python38\lib\multiprocessing\", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\eepi0002\AppData\Local\Programs\Python\Python38\lib\multiprocessing\", line 326, in _Popen
    return Popen(process_obj)
  File "C:\Users\eepi0002\AppData\Local\Programs\Python\Python38\lib\multiprocessing\", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\eepi0002\AppData\Local\Programs\Python\Python38\lib\multiprocessing\", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle 'Metashape.Metashape.Camera' object

Do you have any Idea?
Thank you in advance.
Best regards.
Emanuele Papucci.


  • Newbie
  • *
  • Posts: 26
    • View Profile
Did you figure out this issue and how to fix it?


  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Maybe is better to export the mesh / point cloud and write a GPU accelerated software if you really need performance.