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.