question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export error when there are invalid polygons in the overlapping frames (shapely.errors.TopologicalError)

See original GitHub issue

My actions before raising this issue

  • Read/searched the docs
  • Searched past issues

Expected Behaviour

Export of the datasets should go through without any issues.

Current Behaviour

When there are invalid polygons in the overlapping frames, a notification pops out stating the export cannot be done, and an api call error stating: shapely.errors.TopologicalError: The operation 'GEOSIntersection_r' could not be performed Therefore blocking the export.

(in frames that have no overlapping, the invalid polygon does not block the export)

Possible Solution

  • ignore the invalid polygon when calculating similarity
  • add validity check in the UI to prevent any creation of invalid polygon in the first place

Steps to Reproduce (for bugs)

  1. create a new task.
  2. set the overlap size to an integer that is greater or equal to 1.
  3. in the overlapping frames, draw an invalid polygon (self-overlapping polygon).
  4. save and export the task.

Context

We need the exported points’ coordinates for further ML model training.

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS): MacOS 11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fengyachcommented, Apr 1, 2021

At least it has to be possible to export the annotations in any case. I’m currently in the situation that I can’t export my annotations because of this. I have a larger image dataset with polygon track annotations and a segment overlap of 2. Whenever I try to export any kind of annotation format I get the mentioned GEOSIntersection_r error. I triple checked every overlapping frame for “false” annotations, however didn’t find any that look suspicious to me. It would also help, if at least the frame number where the error occurs would be mentioned in the error message.

I also tried to change the frame range of each segment to not include any overlapping frames numbers anymore, however to no avail.

How can I get to my annotations bypassing the web interface or this error in overlapping frames?

Hello! this is fixed via PR 2852 😃 I believe it is already merged to develop.

0reactions
Legorcommented, Apr 1, 2021

At least it has to be possible to export the annotations in any case. I’m currently in the situation that I can’t export my annotations because of this. I have a larger image dataset with polygon track annotations and a segment overlap of 2. Whenever I try to export any kind of annotation format I get the mentioned GEOSIntersection_r error. I triple checked every overlapping frame for “false” annotations, however didn’t find any that look suspicious to me. It would also help, if at least the frame number where the error occurs would be mentioned in the error message.

I also tried to change the frame range of each segment to not include any overlapping frames numbers anymore, however to no avail.

How can I get to my annotations bypassing the web interface or this error in overlapping frames?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export error when there are invalid polygons in the ... - GitHub
Export error when there are invalid polygons in the overlapping frames (shapely.errors.TopologicalError) #2851. Closed. 2 tasks done.
Read more >
python - Polygon intersection error in Shapely: "shapely.geos ...
The documentation says that: A valid Polygon may not possess any overlapping exterior or interior rings. Keep in mind that since the first...
Read more >
Export a list of invalid geometries using Python
A valid Polygon may not possess any overlapping exterior or interior rings. A valid MultiPolygon may not collect any overlapping polygons.
Read more >
Shapely Documentation - Read the Docs
Shapely is a BSD-licensed Python package for manipulation and analysis of planar geometric objects. It is using.
Read more >
SMS:Bugfixes SMS - XMS Wiki
13376 SMS crashes when selecting Convert|Map→2D Mesh on a mesh generator coverage with an invalid polygon. 13347 Map to 2D mesh doesn't assign...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found