Skip to content

Commit

Permalink
don't load labels with zero area
Browse files Browse the repository at this point in the history
  • Loading branch information
jveitchmichaelis committed May 8, 2020
1 parent ecc24c5 commit 757ecc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/labelproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ bool LabelProject::getLabels(int image_id, QList<BoundingBox> &bboxes){
new_bbox.rect.setWidth(rec.value(rec.indexOf("width")).toInt());
new_bbox.rect.setHeight(rec.value(rec.indexOf("height")).toInt());

if(new_bbox.rect.width()*new_bbox.rect.height() <= 0){
continue;
}

bboxes.append(new_bbox);
}
}
Expand Down

0 comments on commit 757ecc4

Please sign in to comment.