Skip to content

Commit

Permalink
updated with save param
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtuevo committed Jan 24, 2025
1 parent c4ba0a9 commit 637e7fe
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions fiftyone/utils/eval/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def _evaluate_detections_bulk(
)

sample_updates = {"sample_tp": {}, "sample_fp": {}, "sample_fn": {}}
frame_updates = []

logger.info("Evaluating detections...")
pb = fou.ProgressBar(total=len(ids), progress=progress)
Expand All @@ -104,7 +103,7 @@ def _evaluate_detections_bulk(
pb.update()

docs = (ids, ground_truths, predictions)
return matches, docs, sample_updates, frame_updates
return matches, docs, sample_updates


def evaluate_detections(
Expand Down Expand Up @@ -277,22 +276,22 @@ def evaluate_detections(
"Frame-level updates not supported for bulk evaluation"
)

(
matches,
docs,
sample_updates,
frame_updates,
) = _evaluate_detections_bulk(
start_time = time.time()
(matches, docs, sample_updates) = _evaluate_detections_bulk(
_samples,
gt_field,
pred_field,
eval_method,
eval_key,
progress=progress,
)
id_field = "id"
end_time = time.time()
logger.info(
f"Finished bulk evaluation in {end_time - start_time:.2f} seconds"
)

if save:
id_field = "id"
logger.info("Saving results...")

if progress is None:
Expand Down

0 comments on commit 637e7fe

Please sign in to comment.