Skip to content

Commit

Permalink
empty recall has to be penalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Weinstein authored and Ben Weinstein committed Jun 13, 2021
1 parent fe29629 commit 4d9593e
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 136 deletions.
4 changes: 3 additions & 1 deletion deepforest/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def evaluate(predictions,

#If empty, add to list without computing IoU
if image_predictions.empty:
result = pd.DataFrame({"truth_id":group.index.values,"prediction_id": None, "IoU":0, "predicted_label": None, "score":None, "true_label":group.label})
result = pd.DataFrame({"truth_id":group.index.values,"prediction_id": None, "IoU":0, "predicted_label": None, "score":None, "match":None,"true_label":group.label})
#An empty prediction set has recall of 0, precision of NA.
box_recalls.append(0)
results.append(result)
continue
else:
Expand Down
Loading

0 comments on commit 4d9593e

Please sign in to comment.