I am confused by usage of lighting transforms. For example:
img = PILImage.create(filename)
timg = TensorImage(array(img)).permute(2,0,1).float()/255.
batch_tfms = Brightness(p=1, draw=[0.9])
tim1 = batch_tfms(timg[None])[0]
tim2 = timg[None].brightness(p=1, draw=[0.9])[0]
show_image(tim1)
show_image(tim2)
The two images should be the same, but tim1
doesn’t show any brightness change while tim2
always show (as it should be).
I also noticed for affine and coord transforms, both two images change. For example, if I replace the Brightness to Rotate in the example above, both images are rotated.
Does anybody know why is this?