get_transforms
creates a list of transforms. I want to check the transforms that I have created using get_transforms
by applying each them individually to the same image using apply_tfms
. However it seems that it is just applying all of them anyway when I try this.
Here are my transforms:
get_transforms(flip_vert=False, max_warp=0.0, max_rotate=360, max_lighting=0.0, max_zoom=1.15)
[RandTransform(tfm=TfmCrop (crop_pad), kwargs={'row_pct': (0, 1), 'col_pct': (0, 1), 'padding_mode': 'reflection'}, p=1.0, resolved={'row_pct': 0.15663206811390784, 'col_pct': 0.5780825513563352, 'padding_mode': 'reflection'}, do_run=True, is_random=True, use_on_y=True),
RandTransform(tfm=TfmPixel (flip_lr), kwargs={}, p=0.5, resolved={}, do_run=True, is_random=True, use_on_y=True),
RandTransform(tfm=TfmAffine (rotate), kwargs={'degrees': (-360, 360)}, p=0.75, resolved={'degrees': 280.6319932696381}, do_run=True, is_random=True, use_on_y=True),
RandTransform(tfm=TfmAffine (zoom), kwargs={'scale': (1.0, 1.15), 'row_pct': (0, 1), 'col_pct': (0, 1)}, p=0.75, resolved={'scale': 1.0291329472876456, 'row_pct': 0.8337403533326125, 'col_pct': 0.8612715133552968}, do_run=False, is_random=True, use_on_y=True)]
Here is my code for attempted to apply them individually and plot:
fig, axes = plt.subplots(ncols=5, figsize=(15, 3))
for j in range(5):
ax = axes[j]
img = data.train_ds[6][0].apply_tfms(tfms[0][1])
img.show(ax=ax)
I expected this to just do a horizontal flip.
Here is the output from that code: