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'
detectionshapelypolygon
2 votesLP190.00
1 Answers
JW234.00
1

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.

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