You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I try to use this library for transforming my first set of images with a known ground truth. These have no labels, I just want transformed images for use with my network. Therefore, I try to follow the DataPipeline example as follows:
>> import glob
>> import numpy
>> from PIL import Image
>> import Augmentor
>> ref_imgs = glob.glob('./reference_images/**/*.jpg')
>> imgs = glob.glob('./images/**/*.jpg')
>> collated = list(zip(ref_imgs, imgs))
>> len(collated)
130475
>> images = [[np.asarray(Image.open(y)) for y in x] for x in collated]
>> p = Augmentor.DataPipeline(images)
>> p.rotate(1, max_left_rotation=5, max_right_rotation=5)
>> p.flip_top_bottom(0.5)
>> p.zoom_random(1, percentage_area=0.5)
>> p.status()
Operations: 3
0: RotateRange (probability=1 max_left_rotation=-5 max_right_rotation=5 )
1: Flip (probability=0.5 top_bottom_left_right=TOP_BOTTOM )
2: ZoomRandom (probability=1 percentage_area=0.5 randomise=False )
Images: 130475
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/local_scratch2/mterpst5/anaconda3/lib/python3.7/site-packages/Augmentor/Pipeline.py", line 798, in status
label_pairs = sorted(set([x.label_pair for x in self.augmentor_images]))
File "/local_scratch2/mterpst5/anaconda3/lib/python3.7/site-packages/Augmentor/Pipeline.py", line 798, in <listcomp>
label_pairs = sorted(set([x.label_pair for x in self.augmentor_images]))
AttributeError: 'list' object has no attribute 'label_pair'
This should not happen because my data has no labels. I suppose a check should be in place to make sure labels are present.
Thanks
The text was updated successfully, but these errors were encountered:
I reproduce the same bug. For now you can comment out p.status() to avoid the error. The remaining of the pipeline works perfectly.
P.S. also remember to use
Ok so I have made a quick bug fix, this fix won't appear in the pip installed version of Augmentor until I make a version update which will happen a little later.
Hi, I try to use this library for transforming my first set of images with a known ground truth. These have no labels, I just want transformed images for use with my network. Therefore, I try to follow the DataPipeline example as follows:
This should not happen because my data has no labels. I suppose a check should be in place to make sure labels are present.
Thanks
The text was updated successfully, but these errors were encountered: