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.
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