We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class gamma_transform(object): def init(self,gamma_range): self.gamma_range=gamma_range def call(self,sample): image, mask = sample gamma=np.random.uniform(low=self.gamma_range[0],high=self.gamma_range[1]) image=np.array(image) image=image/255 image=image**gamma image=image*255 image[image>255]=255 image[image<0]=0 image=image.astype(np.uint8) image=Image.fromarray(image) return image, mask
The text was updated successfully, but these errors were encountered:
No branches or pull requests
class gamma_transform(object):
def init(self,gamma_range):
self.gamma_range=gamma_range
def call(self,sample):
image, mask = sample
gamma=np.random.uniform(low=self.gamma_range[0],high=self.gamma_range[1])
image=np.array(image)
image=image/255
image=image**gamma
image=image*255
image[image>255]=255
image[image<0]=0
image=image.astype(np.uint8)
image=Image.fromarray(image)
return image, mask
The text was updated successfully, but these errors were encountered: