Skip to content

Commit

Permalink
edge case for score none if no predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Weinstein authored and Ben Weinstein committed Jun 10, 2021
1 parent d8fc0d5 commit fe29629
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 89 deletions.
2 changes: 1 addition & 1 deletion deepforest/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ 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, "true_label":group.label})
result = pd.DataFrame({"truth_id":group.index.values,"prediction_id": None, "IoU":0, "predicted_label": None, "score":None, "true_label":group.label})
results.append(result)
continue
else:
Expand Down
Loading

0 comments on commit fe29629

Please sign in to comment.