Hello,
My company has recently decided to purchase an Agisoft Metashape license to construct models out of drone footage. Our current plan is to combine machine learning with Metashape in order to mark the locations of defects (such as concrete spalling, cracked bricks, etc.) in construction material on the model itself, so that our engineers have an easy way of locating critical defects. I just have a few questions about whether Metashape is capable of supporting our workflow.
1. Headless Metashape
We would like to run Metashape without having to open the GUI in order to streamline our workflow. From what I've gathered, it should be possible to run Metashape's python API from the command line. I even installed a python wheel file that seems to include the Metashape python library. However, upon attempting to "import Metashape," I still receive the "key not found" error, despite purchasing a license a few days ago. Is there something that I need to do in order to allow the python package to recognize the license? Also, I would like to know if the rest of my goals can be accomplished from the command line as well.
2. Photo Coordinates System
I currently have a machine learning model capable of detecting defects in construction materials. The model takes in an image and outputs the location of the defect(s) in YOLO format, which I can then redraw onto the input image by converting to OpenCV format. Is it possible to do something similar in Metashape (i.e. is it possible to take one of the images that the model was constructed out of, run inference on it to get the locations of the bounding boxes, convert those locations to a coordinate system that the Metashape software understands, and then draw the bounding box on the image so that is shows up at the correct location on the model)? I've looked into the Project() and Unproject() methods on the Camera object, but they do not seem to meet all of my needs.
3. More Bounding Boxes
I've noticed that if I draw a polygon on one side of the model (e.g. the southern face of a building), it's still possible to see the bounding box from the other side of the model (the northern face of the building). Is it possible to make it so that if I draw a poly on the southern face, and then I rotate the model more than 90 degrees horizontally or vertically, then that polygon disappears? In addition, I would like to fill in the polygons that I draw with color (so that eventually we'll be able to use color to indicate the location of the defects). Is that possible in Metashape? I looked into creating masks, but it seems that masks are either "on" or "off." I would like it to be the case that if multiple images indicate a defect at the same location, then that location should be shaded darker than the surrounding areas.
Thanks for your help!