NimaBoscarino edgarriba commited on
Commit
fb1cd10
1 Parent(s): 5f2d222

fix double normalization (#2)

Browse files

- fix double normalization (0d5409e29d841d53a921cd8a00c77a93c23087b4)


Co-authored-by: Edgar Riba <[email protected]>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ from kornia.core import Tensor
7
  def enhance(file, brightness, contrast, saturation, gamma, hue):
8
  # load the image using the rust backend
9
  img: Tensor = K.io.load_image(file.name, K.io.ImageLoadType.RGB32)
10
- img = img[None] / 255.
11
 
12
  # apply tensor image enhancement
13
  x_out: Tensor = K.enhance.adjust_brightness(img, float(brightness))
 
7
  def enhance(file, brightness, contrast, saturation, gamma, hue):
8
  # load the image using the rust backend
9
  img: Tensor = K.io.load_image(file.name, K.io.ImageLoadType.RGB32)
10
+ img = img[None] # 1xCxHxW / fp32 / [0, 1]
11
 
12
  # apply tensor image enhancement
13
  x_out: Tensor = K.enhance.adjust_brightness(img, float(brightness))