omar87 commited on
Commit
dc979d2
·
1 Parent(s): 48e5876

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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):