Beispiel #1
0
        float BoundBoxIOU(NeuralNetworkBoundBox a, NeuralNetworkBoundBox b)
        {
            float intersectWidth  = IntervalOverlap(a.MinX, a.MaxX, b.MinX, b.MaxX);
            float intersectHeight = IntervalOverlap(a.MinY, a.MaxY, b.MinY, b.MaxY);
            float intersect       = intersectWidth * intersectHeight;
            float union           = (a.MaxX - a.MinX) * (a.MaxY - a.MinY) + (b.MaxX - b.MinX) * (b.MaxY - b.MinY) - intersect;

            return(intersect / union);
        }
 public NeuralNetworkYoloResult(NeuralNetworkBoundBox boundBox, int label, float score)
 {
     BoundBox = boundBox;
     Label    = label;
     Score    = score;
 }