Skip to content

Commit 76f4b0b

Browse files
authored
iou for combining (#119)
1 parent 559fd12 commit 76f4b0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

detectree2/models/outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def combine_and_average_polygons(gdfs, iou = 0.9):
503503
match_confidence = row_match.Confidence_score if "Confidence_score" in combined_gdf.columns else None
504504

505505
intersection = polygon.intersection(match)
506-
if intersection.area / match.area > iou:
506+
if intersection.area / (polygon.area + match.area - intersection.area) > iou:
507507
significant_matches.append(match)
508508
if match_confidence is not None:
509509
significant_confidences.append(match_confidence)

0 commit comments

Comments
 (0)