edgarriba commited on
Commit
0d5409e
1 Parent(s): 5f2d222

fix double normalization

Browse files
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))