uladzislau-varabei / rotated_polygons_iou

Differenciable IoU of rotated polygons in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rotated polygons intersection and differenciable IoU in PyTorch


This repository provides an implementation of polygons intersection and evaluation of differenciable IoU in PyTorch. This functionality can be used to construct loss for rotated bounding boxes

The algorithm is based on lines intersections and assumes convex polygons which is the case for rotated object detection (or polygons detection).

Note: polygons intersection is not yet heavily tested. There can be some bugs and edge cases. Please feel free to let me know about them

Demonstration


Below is the demo image which shows algorithm work for different cases. In addition, standard IoU for boxes which are parallel to coordinate axes is computed

Rotated IoU results

Other similar implementations


Below is the list of other repositories which might be useful when dealing with rotated object detection loss:

About

Differenciable IoU of rotated polygons in PyTorch

License:MIT License


Languages

Language:Python 100.0%