Symmetry or mirror function #1259
jruiz72
started this conversation in
Ideas / Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've been annotating some images that have "Left" and "Right" parts where the Left part is exactly the same as the Right part but reflected. At the moment Labelme doesn't have a Mirror/Symmetry function and I think that this feature will save a lot of time. I was trying to apply something like that modifiying the Json generated by labelme, so this is my the code in Python. I think that maybe it is not the best because I'm not a senior programmer but I think it can give you ideas of how implement it.
In this code I only reflect vertically one polygon respect to the middle of my image. My image size is 1024x1024, that's why it's hard-coded. But I consider that as a general solution, the code should:
You can also find ideas of how to implement this by looking at AutoCAD (Software to draw plans widely used in engineering) implementation of the mirror function. By the way, this software has a lot of cool features that can enrich Labelme such as rotating figures, merge polygons, scale objects, etc.
Beta Was this translation helpful? Give feedback.
All reactions