Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where do i put the query image? #6

Open
chopperop opened this issue Aug 16, 2018 · 7 comments
Open

where do i put the query image? #6

chopperop opened this issue Aug 16, 2018 · 7 comments

Comments

@chopperop
Copy link

where do i put the query image?

@minukumari
Copy link

@pochih Where should I put the query image

@MOAboAli
Copy link

I have same problem, where do i put query images?

@KarthikDutt
Copy link

@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!

@Praveenk8051
Copy link

@KarthikDutt What is 136627 ? What @minukumari @MOAboAli meant was How can we evaluate a new Image ?

@MOAboAli
Copy link

@Praveenk8051 ,I don't understand the question ?

@Praveenk8051
Copy link

@MOAboAli I was repeating the question you asked to @KarthikDutt

@MOAboAli
Copy link

I didn't use this application , SORRY I DON'T KNOW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants