Discussions>AttributeError: 'MultiPolygon' object has no attribute 'exterior'>

AttributeError: 'MultiPolygon' object has no attribute 'exterior'

I'm using geometry of Shapely to for image contours and bounding boxes, but I get this error:

AttributeError: 'MultiPolygon' object has no attribute 'exterior'
2 votesLP262.00
1 Answers

I had the same issue when I was runing a code, which detects all boxes of the object from mask images.
Sometimes it retured Polygon, but when I've got multiple objects in my image mask, it returned MultiPolygon, which does not have exterior field.

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?