Brian Gabini commited on
Commit
c075ea7
·
1 Parent(s): e89bb4b

feat: remove gamma, lambda_, sigma as inputs

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -4,18 +4,15 @@ from exposure_enhancement import enhance_image_exposure
4
 
5
  # inputs, fn, and ouputs
6
  inputs=[
7
- gr.Image(type="numpy"),
8
- gr.Slider(minimum=0, maximum=1, value=0.6, label="Gamma", info="The gamma correction parameter."),
9
- gr.Slider(minimum=0, maximum=1, value=0.15, label="Lambda", info="The weight for balancing the two terms in the illumination refinement optimization objective."),
10
- gr.Number(value=3, minimum=0, label="Sigma", info="Spatial standard deviation for spatial affinity based Gaussian weights.")
11
  ]
12
  outputs=["image"]
13
  examples=[
14
- ["demo/1.jpg", 0.6, 0.15, 3],
15
- ["demo/2.bmp", 0.6, 0.15, 3]
16
  ]
17
 
18
- def enhance_image(image, gamma, lambda_, sigma, lime=True, bc=1, bs=1, be=1, eps=1e-3):
19
  # enhance image
20
  enhanced_image = enhance_image_exposure(image, gamma, lambda_, not lime, sigma=sigma, bc=bc, bs=bs, be=be, eps=eps)
21
 
 
4
 
5
  # inputs, fn, and ouputs
6
  inputs=[
7
+ gr.Image(type="numpy")
 
 
 
8
  ]
9
  outputs=["image"]
10
  examples=[
11
+ ["demo/1.jpg"],
12
+ ["demo/2.bmp"]
13
  ]
14
 
15
+ def enhance_image(image, gamma=0.6, lambda_=0.15, sigma=3, lime=True, bc=1, bs=1, be=1, eps=1e-3):
16
  # enhance image
17
  enhanced_image = enhance_image_exposure(image, gamma, lambda_, not lime, sigma=sigma, bc=bc, bs=bs, be=be, eps=eps)
18