Skip to content

Commit

Permalink
removed annotations of zero area
Browse files Browse the repository at this point in the history
  • Loading branch information
waspinator committed Apr 10, 2018
1 parent 4511a15 commit 38ee683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pycococreatortools/pycococreatortools.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def create_annotation_info(annotation_id, image_id, category_info, binary_mask,
bounding_box = mask.toBbox(binary_mask_encoded)
area = mask.area(binary_mask_encoded)

if area < 1:
return None

if category_info["is_crowd"]:
annotation_info = {
"id": annotation_id,
Expand Down

0 comments on commit 38ee683

Please sign in to comment.