Open chopperop opened 6 years ago
@pochih Where should I put the query image
I have same problem, where do i put query images?
@minukumari @mohamedaboali1990 - You can load the file containing the features extracted for each image. The file will be created in the cache directory of your root folder. This file contains a list of dictionaries, one dictionary per image of your dataset. It is of the form {'img':'xxx', 'cls','123','hist': ''} where img is the name of the image, cls is the class and hist holds the histogram generated for that image. You can choose one of the element of this list as your query image and then call the function infer which is inside evaluate.py to calculate the similarity distance of the query image and the other images and return the most similar results.
Code mentioned below could be helpful: from evaluate import infer samples = cPickle.load(open('D:\Work\CBIR\CBIR-master\cache\histogram_cache-region-n_bin12-n_slice3', "rb", True)) query=samples[13627] ap,res=infer(query,samples,db=None, sample_db_fn=None, depth=10, d_type='d1') depth is the number of similar images you want to retrieve and d_type is the type of simialrity metric you want to use.
You might want to modify the function infer inside evaluate to return also the matched image name along with class and distance which it is presently retrieving.
@pochih - Thanks for this implementation! Great work!
@KarthikDutt What is 136627 ? What @minukumari @MOAboAli meant was How can we evaluate a new Image ?
@Praveenk8051 ,I don't understand the question ?
@MOAboAli I was repeating the question you asked to @KarthikDutt
I didn't use this application , SORRY I DON'T KNOW
where do i put the query image?