Ejemplo n.º 1
0
 def test_calc_circle_iou_zero_both_radius(self):
     pred = Prediction(0, 0, 0, 0.58)
     lbl = Label(0, 0, 0)
     iou = pred.calc_circle_iou(lbl)
     self.assertAlmostEqual(iou, 1)
Ejemplo n.º 2
0
 def test_calc_circle_iou_fully_intersecting(self):
     pred = Prediction(0, 0, 10, 0.58)
     lbl = Label(0, 0, 10)
     iou = pred.calc_circle_iou(lbl)
     self.assertAlmostEqual(iou, 1)
Ejemplo n.º 3
0
 def test_calc_circle_iou_one_inside_other(self):
     pred = Prediction(0, 0, 10, 0.58)
     lbl = Label(0, 0, 20)
     iou = pred.calc_circle_iou(lbl)
     self.assertAlmostEqual(iou, 0.25)
Ejemplo n.º 4
0
 def test_calc_circle_iou_one_inside_other_not_centered_2(self):
     pred = Prediction(0, 0.1, 20, 0.58)
     lbl = Label(0, 0, 5)
     iou = pred.calc_circle_iou(lbl)
     self.assertAlmostEqual(iou, 0.0625)
Ejemplo n.º 5
0
 def test_calc_circle_iou_not_even_close(self):
     pred = Prediction(50, 0, 10, 0.58)
     lbl = Label(0, 0, 10)
     iou = pred.calc_circle_iou(lbl)
     self.assertAlmostEqual(iou, 0)