Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,8 @@ def calculate_similarity(img1, img2):
|
|
9 |
img1 = cv2.cvtColor(img1, cv2.COLOR_GRAY2RGB)
|
10 |
if len(img2.shape) == 2:
|
11 |
img2 = cv2.cvtColor(img2, cv2.COLOR_GRAY2RGB)
|
12 |
-
return ssim(img1, img2)
|
|
|
13 |
|
14 |
# Function to compute similarity scores for all images
|
15 |
def compute_similarity(target_image, image_list):
|
|
|
9 |
img1 = cv2.cvtColor(img1, cv2.COLOR_GRAY2RGB)
|
10 |
if len(img2.shape) == 2:
|
11 |
img2 = cv2.cvtColor(img2, cv2.COLOR_GRAY2RGB)
|
12 |
+
return ssim(img1, img2, win_size=3)
|
13 |
+
|
14 |
|
15 |
# Function to compute similarity scores for all images
|
16 |
def compute_similarity(target_image, image_list):
|