Skip to content

Commit

Permalink
fix bug in TryCrop() (apache#8644)
Browse files Browse the repository at this point in the history
  • Loading branch information
cypw authored and eric-haibin-lin committed Dec 3, 2017
1 parent c531bb7 commit f9ab47b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/io/image_det_aug_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ class ImageDetLabel {
}
// check if crop_box valid
bool valid = false;
if (min_crop_overlap > 0.f && max_crop_overlap < 1.f &&
min_crop_sample_coverage > 0.f && max_crop_sample_coverage < 1.f &&
min_crop_object_coverage > 0.f && max_crop_object_coverage < 1.f) {
if (min_crop_overlap > 0.f || max_crop_overlap < 1.f ||
min_crop_sample_coverage > 0.f || max_crop_sample_coverage < 1.f ||
min_crop_object_coverage > 0.f || max_crop_object_coverage < 1.f) {
for (auto& obj : objects_) {
Rect gt_box = obj.ToRect();
if (min_crop_overlap > 0.f || max_crop_overlap < 1.f) {
Expand Down

0 comments on commit f9ab47b

Please sign in to comment.