Closed bhavikshah1995 closed 5 years ago
@bhavikshah1995 could you post some example images before and after the crop?
Could you also post the minimal code you're using to process your images?
I have identified hundreds of thousands of matching images that involve crops with image-match, but my data consisted mostly of line drawings.
@duhaime Here are some examples in the order of uncropped image in the index and cropped image being searched:
Here's the code I'm using to process the images:
from elasticsearch import Elasticsearch
from image_match.elasticsearch_driver import SignatureES
es = Elasticsearch()
ses = SignatureES(es, distance_cutoff = 0.50)
import os
files_path = 'C:\\Users\\UC244373\\Python_Images\\Sample_images\\'
for filename in os.listdir(files_path):
ses.add_image('C:\\Users\\UC244373\\Python_Images\\Sample_images\\'+filename)
path = 'C:\\Users\\UC244373\\Pictures\\Screenshots\\Image Examples\\greens_cropped.png'
ses.search_image(path, all_orientations=True)
Note that the images I have added to the index are of .mm file type, but I have tested the above for .png file types as well, with the same lack of result.
I'm surprised the AAD example didn't work, but the others are simply to extreme for this algorithm. You can try lowering the match thereshold, but I'm certain the other three examples will never work.
@rhsimplex You mention in issue #40 that the algorithm is theoretically capable of heavy cropping. Is there any way you could shed some light on how one can go about implementing this?
I tried searching for cropped versions of images that were added to the index, but the results were completely off, such that the original image from which I had cropped the search image didn't even make it (even after extending distance_cutoff to 0.80). Is there any way we can work around this issue or is this a flaw in the algorithm itself that cannot be easily fixed?