HFswapnil commited on
Commit
98d0fef
·
verified ·
1 Parent(s): 9ae8c1b

Update src/localization_eval.py

Browse files
Files changed (1) hide show
  1. src/localization_eval.py +3 -5
src/localization_eval.py CHANGED
@@ -13,7 +13,7 @@ class Localization:
13
  """
14
  Original Localization class from EvalAI
15
  """
16
- def __init__(self, eval_bbox=True, eval_segm=False):
17
  self.eval_bbox = eval_bbox
18
  self.eval_segm = eval_segm
19
  print("Created Localization Object")
@@ -91,16 +91,14 @@ def evaluate_submission(ground_truth_path, predictions_path):
91
  print(f"Required Fields Checked")
92
 
93
  # Run evaluation
94
- evaluator = Localization(eval_bbox=True, eval_segm=False)
95
  print("Evaluation Object Instantiated")
96
  bbox_mAP, bbox_AP50, segm_mAP, segm_AP50 = evaluator.compute_coco_metrics(
97
  ground_truth_path,
98
  predictions_path
99
  )
100
  print(f"bbox score calculated : {bbox_mAP}")
101
- # Convert mAP to percentage (0-100 scale)
102
- score = round(bbox_mAP * 100, 2)
103
- print("Returning Result")
104
  return float(bbox_mAP), float(bbox_AP50), segm_mAP, segm_AP50
105
 
106
  except Exception as e:
 
13
  """
14
  Original Localization class from EvalAI
15
  """
16
+ def __init__(self, eval_bbox=True, eval_segm=True):
17
  self.eval_bbox = eval_bbox
18
  self.eval_segm = eval_segm
19
  print("Created Localization Object")
 
91
  print(f"Required Fields Checked")
92
 
93
  # Run evaluation
94
+ evaluator = Localization()
95
  print("Evaluation Object Instantiated")
96
  bbox_mAP, bbox_AP50, segm_mAP, segm_AP50 = evaluator.compute_coco_metrics(
97
  ground_truth_path,
98
  predictions_path
99
  )
100
  print(f"bbox score calculated : {bbox_mAP}")
101
+
 
 
102
  return float(bbox_mAP), float(bbox_AP50), segm_mAP, segm_AP50
103
 
104
  except Exception as e: