Hope you give a complete example, there are some several problems.
minglinlu opened this issue · 2 comments
Traceback (most recent call last):
File "extract_descriptors.py", line 29, in
response = voc.sims(descriptor) # response is a list of image ids of training images.
File "/Users/lml/Desktop/Image_retrieval/vocabulary.py", line 90, in sims
for im_id in node.get_additional_data():
AttributeError: 'list' object has no attribute 'get_additional_data'
I believe that in your extract_descriptors.py
file, you did not build a vocabulary tree using the correct api. There's an example(see step 2) in readme.
I did build the vocabulary tree according to your step 1~3, the code is just the same as it. When I change the descriptor to descriptors[0] generated in step 1, there is another issue, im_sims.get(im_id[0], im_id[1]) is inf, T T. I'm using opencv 2.4.13 and python 2.7 on mac os x.