Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metashape-scripts - detect_objects.py error #58

Closed
MendyNagar opened this issue Mar 9, 2023 · 13 comments
Closed

metashape-scripts - detect_objects.py error #58

MendyNagar opened this issue Mar 9, 2023 · 13 comments

Comments

@MendyNagar
Copy link

Hi I want to use - metashape-scripts - detect_objects.py
I installed everything properly, built an orthophoto and marked the cars with the name you wrote.
When I run the code I get an error.

image
ללא שם
@PolarNick239

@PolarNick239
Copy link
Member

Hi, please share a project-reproducer to [email protected] with steps to reproduce (f.e. "open project -> run script with such parameters ..."), so we were able to reproduce and investigate the problem. Probably small part of the project will be enough - just make sure that it can reproduce the problem.

@MendyNagar
Copy link
Author

hey ok
Can I attach a video of the process?

@PolarNick239
Copy link
Member

Yes, it will be helpful in addition to project-reproducer.

@molode4ik
Copy link

Hi, cv2 only accepts ASCII encoding, check encoding of your path in line 655

@arpitpara
Copy link

Hi I am also getting an error.
Software Version - 1.7
Script Compatibility - 1.7
Error Message -
'''
Metashape.CoordinateSystem.transform(p, self.chunk.shapes.crs, self.chunk.orthomosaic.crs)
2024-02-29 11:19:43 TypeError: object is not a sequence
'''

What I am doing wrong?

@PolarNick239
Copy link
Member

Hi, @arpitpara, please try the latest version of the script in Metashape 2.1. Does it work?

@arpitpara
Copy link

I haven't checked it yet. I can't change the version due to some official issues. If it doesn't work then I will try to upgrade.
Is there any solution for this version?

@PolarNick239
Copy link
Member

Please share a project-reproducer to [email protected] with steps to reproduce (f.e. "open project -> run script with such parameters ..."), so we were able to reproduce and investigate the problem. Probably small part of the project will be enough - just make sure that it can reproduce the problem.

@PolarNick239
Copy link
Member

Also, please specify - do you have any shapes with attached markers in shape layers used for training zones?

@arpitpara
Copy link

Thanks @PolarNick239 !!
I contacted support from Agisoft. And after minute tweaks it seems to work well.
Now I am looking for importing the train data layer from outside and use it to train the model more precisely.
Can you help me with that?

@PolarNick239
Copy link
Member

I contacted support from Agisoft. And after minute tweaks it seems to work well.

Nice!

Now I am looking for importing the train data layer from outside and use it to train the model more precisely.
Can you help me with that?

Please tell me more details - what question do you have?

@arpitpara
Copy link

Well
Till now I selected the Train Zone polygon and drew rectangles inside as Train Data layer. (Around 42 objects). The results are pretty good. But i'd like train more accurately and more in quantity of objects. I have rectangles drawn already as geojson layer through some other software. Now I want to import all those rectangles into Agisoft for training as I did manually drawing before.
How can I do that?

@PolarNick239
Copy link
Member

You can use File->Import Shapes..., just make sure that your data is in compatible format (objects annotations are in different layer from train zone and so on).

Also, it is a good idea to evaluate your workflow with couple train objects, because it can take some attempts to refine workflow (to find proper format and so on), so don't annotate all objects until you ensured that your workflow works on small data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants