Calculating the accuracy of predicted vertices on rotated rectangles
In Machine learning, the Dice and IOU (Intersection over Union) metrics are often used to calculate the accuracy of predictions.
For object detection, they are commonly used to compute the accuracy of the predicted bounding boxes vs the labeled boxes. But these boxes are typically not rotated.
But when shapes are rotated like they are in the context of my app Mix on Pix, then it can be more complicated to calculate the area of a shape accurately.
In Mix on Pix, I have a model to determine the shape drawn on screen like Line, Rectangle, Ellipse, …
But for Rectangles, Ellipses and Triangle, I also need to determine the vertices (angular points) of these shapes to determine the exact position and angle.
So, I made separate models to predict these vertices.
To determine the accuracy of the predictions, I use the Dice metric.
In the Jupyter notebook, I show examples of the vertices and how to calculates the Dice (and IOU) metrics for rotated shapes.
See also Mix on Pix.
by Francois Robert