title: Intersection over union on non rectangular quadrilaterals
body: <p>I am working on the problem of parking space detection. To detect empty parking space I am using intersection over union. But, parking spaces aren't always rectangular. So, I have made a labeling tool that can draw polygons of various shapes. Now, I want to know if there is any python library that provides IOU functionality? If not is there any alternative?</p>
  
  <p><a href="https://i.stack.imgur.com/fSXCl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fSXCl.png" alt="enter image description here"></a></p>