Skip to content

Commit 4e43392

Browse files
authored
use all_img_ids on coco eval thanks to @@mnslarcher
1 parent 98c6263 commit 4e43392

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

coco_eval.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454

5555
def evaluate_coco(img_path, set_name, image_ids, coco, model, threshold=0.05):
5656
results = []
57-
processed_image_ids = []
5857

5958
regressBoxes = BBoxTransform()
6059
clipBoxes = ClipBoxes()
@@ -86,8 +85,6 @@ def evaluate_coco(img_path, set_name, image_ids, coco, model, threshold=0.05):
8685
if not preds:
8786
continue
8887

89-
processed_image_ids.append(image_id)
90-
9188
preds = invert_affine(framed_metas, preds)[0]
9289

9390
scores = preds['scores']
@@ -124,8 +121,6 @@ def evaluate_coco(img_path, set_name, image_ids, coco, model, threshold=0.05):
124121
os.remove(filepath)
125122
json.dump(results, open(filepath, 'w'), indent=4)
126123

127-
return processed_image_ids
128-
129124

130125
def _eval(coco_gt, image_ids, pred_json_path):
131126
# load results in COCO evaluation tool
@@ -161,6 +156,6 @@ def _eval(coco_gt, image_ids, pred_json_path):
161156
if use_float16:
162157
model.half()
163158

164-
image_ids = evaluate_coco(VAL_IMGS, SET_NAME, image_ids, coco_gt, model)
159+
evaluate_coco(VAL_IMGS, SET_NAME, image_ids, coco_gt, model)
165160

166161
_eval(coco_gt, image_ids, f'{SET_NAME}_bbox_results.json')

0 commit comments

Comments
 (0)