Forum

Author Topic: Python scripts collection?  (Read 88055 times)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Python scripts collection?
« Reply #30 on: June 21, 2021, 09:24:56 PM »
Our partners from Geoscan have published quite a few scripts for Metashape which extends the functionality of the application (mostly related to aerial survey projects):
https://github.com/geoscan/geoscan_plugins

The list of available scripts can be found on the following page:
https://github.com/geoscan/geoscan_plugins#%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA-%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%D0%BE%D0%B2
Not sure, if they are planning to add the description in English, but online translation tools should help, if you can't read in Russian.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Costas

  • Jr. Member
  • **
  • Posts: 67
  • Aerial Mapping
    • View Profile
Re: Python scripts collection?
« Reply #31 on: December 01, 2021, 04:38:14 PM »
So, i tried to install the script "detect_objects.py" from https://github.com/agisoft-llc/metashape-scripts/tree/master/src but i have a problem.

When i try to run the script i get the following error

Quote
Shape layer: key=0, label=Layer, enabled=False
2021-12-01 16:19:52 Shape layer: key=1, label=Train zones, enabled=True
2021-12-01 16:19:52 Shape layer: key=2, label=Train data, enabled=True
2021-12-01 16:19:52 Shape layer: key=3, label=Objects, enabled=True
2021-12-01 16:20:11 Shape layer: key=0, label=Layer, enabled=False
2021-12-01 16:20:11 Shape layer: key=1, label=Train zones, enabled=True
2021-12-01 16:20:11 Shape layer: key=2, label=Train data, enabled=True
2021-12-01 16:20:11 Shape layer: key=3, label=Objects, enabled=True
2021-12-01 16:20:32 Using resolution 0.020156805028629442 m/pix with patch 1600x1600
2021-12-01 16:20:32 Additional neural network training expected on key=2 layer data w.r.t. key=1 layer zones
2021-12-01 16:20:32 Loading train shapes...
2021-12-01 16:20:32 1 train zones and 12 train data loaded in 0.00 sec
2021-12-01 16:20:32 Working dir: E:\- PROJECTS -\01. ANAX Projects\10. DIAFORA\Ioannina - University\- Agisoft Projects\objects_detection
2021-12-01 16:20:37 Traceback (most recent call last):
2021-12-01 16:20:37   File "C:/Users/ANAX-UAS/AppData/Local/Agisoft/Photogrammetric Kit for TOPCON/scripts/detect_objects.py", line 1139, in <lambda>
2021-12-01 16:20:37     QtCore.QObject.connect(self.btnRun, QtCore.SIGNAL("clicked()"), lambda: self.process())
2021-12-01 16:20:37   File "C:/Users/ANAX-UAS/AppData/Local/Agisoft/Photogrammetric Kit for TOPCON/scripts/detect_objects.py", line 154, in process
2021-12-01 16:20:37     self.prepair()
2021-12-01 16:20:37   File "C:/Users/ANAX-UAS/AppData/Local/Agisoft/Photogrammetric Kit for TOPCON/scripts/detect_objects.py", line 221, in prepair
2021-12-01 16:20:37     from deepforest import utilities
2021-12-01 16:20:37   File "C:\Program Files\Agisoft\Photogrammetric Kit Pro\python\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 114, in _import
2021-12-01 16:20:37     return original_import(name, *args, **kwargs)
2021-12-01 16:20:37   File "C:\Program Files\Agisoft\Photogrammetric Kit Pro\python\lib\site-packages\deepforest\utilities.py", line 10, in <module>
2021-12-01 16:20:37     import rasterio
2021-12-01 16:20:37   File "C:\Program Files\Agisoft\Photogrammetric Kit Pro\python\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 114, in _import
2021-12-01 16:20:37     return original_import(name, *args, **kwargs)
2021-12-01 16:20:37   File "C:\Program Files\Agisoft\Photogrammetric Kit Pro\python\lib\site-packages\rasterio\__init__.py", line 17, in <module>
2021-12-01 16:20:37     from rasterio._base import gdal_version
2021-12-01 16:20:37   File "C:\Program Files\Agisoft\Photogrammetric Kit Pro\python\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 114, in _import
2021-12-01 16:20:37     return original_import(name, *args, **kwargs)
2021-12-01 16:20:37 ImportError: DLL load failed while importing _base: The specified module could not be found.

I do not what is wrong and why it does not work.

Anyone installed that script and got it working?
« Last Edit: December 01, 2021, 05:28:05 PM by Costas »