Skip to content

Commit

Permalink
Fix min_items (#10001)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher authored Nov 1, 2022
1 parent 067ad9a commit 82a5585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ def __init__(self,

# Filter images
if min_items:
include = np.array([len(x) > min_items for x in self.labels]).nonzero()[0].astype(int)
LOGGER.info(f'{prefix}{nf - len(include)}/{nf} images filtered from dataset')
include = np.array([len(x) >= min_items for x in self.labels]).nonzero()[0].astype(int)
LOGGER.info(f'{prefix}{n - len(include)}/{n} images filtered from dataset')
self.im_files = [self.im_files[i] for i in include]
self.label_files = [self.label_files[i] for i in include]
self.labels = [self.labels[i] for i in include]
Expand Down

0 comments on commit 82a5585

Please sign in to comment.