From f9ab47b1354a3a093ba37775019969537de1b4f1 Mon Sep 17 00:00:00 2001 From: Yunpeng Date: Fri, 17 Nov 2017 05:36:31 +0800 Subject: [PATCH] fix bug in TryCrop() (#8644) --- src/io/image_det_aug_default.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/image_det_aug_default.cc b/src/io/image_det_aug_default.cc index 1a11c0583858..3545059681d3 100644 --- a/src/io/image_det_aug_default.cc +++ b/src/io/image_det_aug_default.cc @@ -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) {