An algorithm for fitting trapezoids from irregular polygons. Fork of QuadrilateralFitter, rewritten in C.
Torch extension for calculating the Intersection over Union (IoU) for quadrilaterals, supports CPU and CUDA tensors. Handles both 1-to-1 and M-to-N matches, returning an IoU matrix with M rows and N columns.