Forum

Author Topic: Solving an Error with detection object script in agisoft  (Read 1239 times)

ro-teodoro

  • Newbie
  • *
  • Posts: 4
    • View Profile
Solving an Error with detection object script in agisoft
« on: February 13, 2023, 09:54:49 PM »

I am trying to follow this tutorial for detecting objects: https://agisoft.freshdesk.com/support/solutions/articles/31000162552-automatic-detection-of-objects-on-orthomosaic  , the training and detection are going very well but when I try to make a detection with the created model it gives me the following error in the console:

2023-02-13 09:17:09 Traceback (most recent call last):
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 1168, in <lambda>
2023-02-13 09:17:09     QtCore.QObject.connect(self.btnRun, QtCore.SIGNAL("clicked()"), lambda: self.process())
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 188, in process
2023-02-13 09:17:09     self.detect()
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 963, in detect
2023-02-13 09:17:09     self.add_trees(big_tile_to_world, big_tile_trees, detected_shapes_layer)
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 979, in add_trees
2023-02-13 09:17:09     p = Metashape.CoordinateSystem.transform(p, self.chunk.orthomosaic.crs, self.chunk.shapes.crs)
2023-02-13 09:17:09 TypeError: transform() argument 3 must be Metashape.CoordinateSystem, not None

Anyone know how to solve this error?

ro-teodoro

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Solving an Error with detection object script in agisoft
« Reply #1 on: February 13, 2023, 10:31:03 PM »
forget it, everything is cancelled. It takes the crs of the shapes in the project as a reference, it was only necessary to add the training shapes to use them in the detection. thanks all the same.