Hi, i have been working on get minimum bounding rectangle for my building polygons using python. i do get square rectangles but i need minimum rectangles to train YOLOv3. Thanks in advance.

853
1
10-13-2019 08:05 AM
rizwangul
New Contributor II

It is a project to extract building footprints using instance segmentation in machine learning techniques. but i need minimum bounding rectangles to separate each building polygon from other connected building polygon to treat each polygon as a single class. MBRs are things which need. can anyone help how i can get it in python. i have rectangles but those are squares and not minimum. thank you. 

0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

Minimum bounding rectangles, sometimes go by rectangle by area...

In any event, they are all here IF! you have the appropriate license level

Minimum Bounding Geometry—Data Management toolbox | ArcGIS Desktop 

If not, then you can steal the code from 

https://www.arcgis.com/home/item.html?id=564e2949763943e3b9fb4240bab0ca2f 

for the minimum area bounding rectangle