Skip to content

Commit

Permalink
Fixes #156 where the Pipeline status function would error on unlabell…
Browse files Browse the repository at this point in the history
…ed datasets.
  • Loading branch information
mdbloice committed Mar 7, 2019
1 parent 8e65e18 commit e6ef7bc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Augmentor/Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,21 @@ def status(self):

print("Images: %s" % len(self.augmentor_images))

label_pairs = sorted(set([x.label_pair for x in self.augmentor_images]))
# TODO: find a better way that doesn't need to iterate over every image
# TODO: get rid of this label_pair property as nowhere else uses it
# Check if we have any labels before printing label information.
label_count = 0
for image in self.augmentor_images:
if image.label_pair is not None:
label_count += 1

print("Classes: %s" % len(label_pairs))
if len(label_count) != 0:
label_pairs = sorted(set([x.label_pair for x in self.augmentor_images]))

for label_pair in label_pairs:
print ("\tClass index: %s Class label: %s " % (label_pair[0], label_pair[1]))
print("Classes: %s" % len(label_pairs))

for label_pair in label_pairs:
print ("\tClass index: %s Class label: %s " % (label_pair[0], label_pair[1]))

if len(self.augmentor_images) != 0:
print("Dimensions: %s" % len(self.distinct_dimensions))
Expand Down

0 comments on commit e6ef7bc

Please sign in to comment.