@@ -28,13 +28,11 @@ def test_runs_inside_model(self):
2828 recall = COCORecall (
2929 max_detections = 100 ,
3030 category_ids = [1 ],
31- area_range = (0 , 64 ** 2 ),
31+ area_range = (0 , 64 ** 2 ),
3232 )
3333
3434 # These would match if they were in the area range
35- y_true = np .array ([[[0 , 0 , 10 , 10 , 1 ], [5 , 5 , 10 , 10 , 1 ]]]).astype (
36- np .float32
37- )
35+ y_true = np .array ([[[0 , 0 , 10 , 10 , 1 ], [5 , 5 , 10 , 10 , 1 ]]]).astype (np .float32 )
3836 y_pred = np .array ([[[0 , 0 , 10 , 10 , 1 , 1.0 ], [5 , 5 , 10 , 10 , 1 , 0.9 ]]]).astype (
3937 np .float32
4038 )
@@ -48,13 +46,11 @@ def test_recall_area_range_filtering(self):
4846 recall = COCORecall (
4947 max_detections = 100 ,
5048 category_ids = [1 ],
51- area_range = (32 ** 2 , 64 ** 2 ),
49+ area_range = (32 ** 2 , 64 ** 2 ),
5250 )
5351
5452 # These would match if they were in the area range
55- y_true = np .array ([[[0 , 0 , 10 , 10 , 1 ], [5 , 5 , 10 , 10 , 1 ]]]).astype (
56- np .float32
57- )
53+ y_true = np .array ([[[0 , 0 , 10 , 10 , 1 ], [5 , 5 , 10 , 10 , 1 ]]]).astype (np .float32 )
5854 y_pred = np .array ([[[0 , 0 , 10 , 10 , 1 , 1.0 ], [5 , 5 , 10 , 10 , 1 , 0.9 ]]]).astype (
5955 np .float32
6056 )
@@ -64,7 +60,7 @@ def test_recall_area_range_filtering(self):
6460
6561 def test_missing_categories (self ):
6662 recall = COCORecall (
67- max_detections = 100 , category_ids = [1 , 2 , 3 ], area_range = (0 , 1e9 ** 2 )
63+ max_detections = 100 , category_ids = [1 , 2 , 3 ], area_range = (0 , 1e9 ** 2 )
6864 )
6965 t = recall .iou_thresholds .shape [0 ]
7066 k = recall .category_ids .shape [0 ]
@@ -84,7 +80,7 @@ def test_missing_categories(self):
8480
8581 def test_recall_direct_assignment (self ):
8682 recall = COCORecall (
87- max_detections = 100 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
83+ max_detections = 100 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
8884 )
8985 t = recall .iou_thresholds .shape [0 ]
9086 k = recall .category_ids .shape [0 ]
@@ -98,7 +94,7 @@ def test_recall_direct_assignment(self):
9894
9995 def test_max_detections_one_third (self ):
10096 recall = COCORecall (
101- max_detections = 1 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
97+ max_detections = 1 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
10298 )
10399 y_true = np .array (
104100 [
@@ -119,7 +115,7 @@ def test_max_detections_one_third(self):
119115
120116 def test_max_detections (self ):
121117 recall = COCORecall (
122- max_detections = 3 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
118+ max_detections = 3 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
123119 )
124120 y_true = np .array (
125121 [
@@ -141,7 +137,7 @@ def test_max_detections(self):
141137
142138 def test_recall_direct_assignment_one_third (self ):
143139 recall = COCORecall (
144- max_detections = 100 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
140+ max_detections = 100 , category_ids = [1 ], area_range = (0 , 1e9 ** 2 )
145141 )
146142 t = recall .iou_thresholds .shape [0 ]
147143 k = recall .category_ids .shape [0 ]
0 commit comments