Skip to content

Commit

Permalink
update get_area_filtered_coco (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored May 8, 2021
1 parent d0f8e4b commit 8fbfe9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sahi/utils/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ def get_area_filtered_coco(self, min=0, max=float('inf'), intervals_per_category
for image in self.images:
is_valid_image = True
for annotation in image.annotations:
if intervals_per_category is not None:
if intervals_per_category is not None and annotation.name in intervals_per_category.keys():
category_based_min = intervals_per_category[annotation.category_name]["min"]
category_based_max = intervals_per_category[annotation.category_name]["max"]
if (annotation.area < category_based_min
Expand Down

0 comments on commit 8fbfe9e

Please sign in to comment.