Skip to content

Commit

Permalink
Print #1
Browse files Browse the repository at this point in the history
  • Loading branch information
manole-alexandru committed Mar 10, 2023
1 parent f4ab7eb commit 3015f5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,15 +509,14 @@ def __init__(self,
self.labels = list(labels)
self.shapes = np.array(shapes)
self.im_files = list(cache.keys()) # update
print('IMFILES', self.im_files[0])
self.label_files = img2label_paths(cache.keys()) # update

# 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}{n - len(include)}/{n} images filtered from dataset')
self.im_files = [self.im_files[i] for i in include]
print('IMFILES', self.im_files[0])
print('INCLUDE', include)
self.label_files = [self.label_files[i] for i in include]
self.labels = [self.labels[i] for i in include]
self.segments = [self.segments[i] for i in include]
Expand Down Expand Up @@ -549,7 +548,6 @@ def __init__(self,
s = self.shapes # wh
ar = s[:, 1] / s[:, 0] # aspect ratio
irect = ar.argsort()
print('IRECT:', irect)
self.im_files = [self.im_files[i] for i in irect]
self.label_files = [self.label_files[i] for i in irect]
self.labels = [self.labels[i] for i in irect]
Expand Down

0 comments on commit 3015f5d

Please sign in to comment.