Spaces:
Configuration error
Configuration error
fix: brisque
Browse files
app.py
CHANGED
|
@@ -36,11 +36,11 @@ def process_image(input_img,score,model_path,gamma=1.0,alpha_s=1.0,alpha_i=1.0):
|
|
| 36 |
output = output[:, :, :h, :w]
|
| 37 |
enhanced_img = transforms.ToPILImage()(output.squeeze(0))
|
| 38 |
if score == 'Yes':
|
| 39 |
-
im1 = enhanced_img
|
| 40 |
-
score_brisque = brisque.score(im1)
|
| 41 |
im1 = np.array(im1)
|
| 42 |
score_niqe = calculate_niqe(im1)
|
| 43 |
-
return enhanced_img,score_niqe,
|
| 44 |
else:
|
| 45 |
return enhanced_img,0,0
|
| 46 |
|
|
|
|
| 36 |
output = output[:, :, :h, :w]
|
| 37 |
enhanced_img = transforms.ToPILImage()(output.squeeze(0))
|
| 38 |
if score == 'Yes':
|
| 39 |
+
# im1 = enhanced_img
|
| 40 |
+
# score_brisque = brisque.score(im1)
|
| 41 |
im1 = np.array(im1)
|
| 42 |
score_niqe = calculate_niqe(im1)
|
| 43 |
+
return enhanced_img,score_niqe,0
|
| 44 |
else:
|
| 45 |
return enhanced_img,0,0
|
| 46 |
|