generativeai commited on
Commit
07df622
1 Parent(s): 73f7e3d

Update image_similarity.py

Browse files
Files changed (1) hide show
  1. image_similarity.py +3 -3
image_similarity.py CHANGED
@@ -43,10 +43,10 @@ class ImageSimilarity(object):
43
  # you will get larger clusters which have less similar images in it. Threshold 0 - 1.00
44
  # A threshold of 1.00 means the two images are exactly the same. Since we are finding near
45
  # duplicate images, we can set it at 0.99 or any number 0 < X < 1.00.
46
- threshold = 1.00
47
- near_duplicates = [image for image in processed_images if image[0] <= threshold]
48
 
49
- for score, image_id1, image_id2 in near_duplicates:
50
  results.append({
51
  'score': score,
52
  'image1': pil_images[image_id1]["key"],
 
43
  # you will get larger clusters which have less similar images in it. Threshold 0 - 1.00
44
  # A threshold of 1.00 means the two images are exactly the same. Since we are finding near
45
  # duplicate images, we can set it at 0.99 or any number 0 < X < 1.00.
46
+ # threshold = 0.99
47
+ # near_duplicates = [image for image in processed_images if image[0] < threshold]
48
 
49
+ for score, image_id1, image_id2 in processed_images:
50
  results.append({
51
  'score': score,
52
  'image1': pil_images[image_id1]["key"],