hlzz / libvot

A C++11 multithread library for image retrieval
http://hlzz.github.io/libvot
BSD 3-Clause "New" or "Revised" License
179 stars 53 forks source link

Example doesnt work #7

Closed ashkart closed 8 years ago

ashkart commented 8 years ago

image_feauture example doesnt work. Files it creates are named with unreadable encoding. And i cant try image_search because of that.

hlzz commented 8 years ago

Hi @ashkart , Can you provide the detailed build message, your platform info, your usage message, and specific errors? To use libvot_feature, you should have opencv 2.4 installed. I have also updated the master branch a bit. You can try again. Thanks.

ashkart commented 8 years ago

Hi @hlzz , My platform is Linux mint 17.3. Opencv 2.4.13. I am using those instructions u put on main project's page to compile the libvot. There is no any errors on compiling. Tests are fine too. `Test project /home/max/SDKs/libvot-master/build Start 1: unit_test 1/3 Test #1: unit_test ........................ Passed 0.01 sec Start 2: opencv_test 2/3 Test #2: opencv_test ...................... Passed 0.19 sec Start 3: libvot_feature_test 3/3 Test #3: libvot_feature_test .............. Passed 0.95 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) = 1.16 sec `

When I try to use image_feature, I do this ./libvot_feature car.jpg The image called "car.jpg" is in same directory with libvot_feature executable (build/bin/qwe) wich i created. Console input in attach. log.txt

And what folder contains now... default

I tryed to research the problem by myself, but i cant compile project in my IDE (netbeans and codeblocks), i get some errors in output, wich solutions i even cant find in google 0_0.

hlzz commented 8 years ago

hi @ashkart , libvot_feature takes a image filename list as input. For a single image case, you can generate a image list file containing the path to car.jpg. The image list has only one line:

/home/max/SDKs/libvot-master/build/bin/qwe/car.jpg

And pass that image list to libvot_feature, like ./libvot_feature image_list.txt

ashkart commented 8 years ago

Oooohh.... now it runs fine. And I successfully created a tree. Dont understand how to use it yet, but it seems all stuff works fine. Thanks a lot!

hlzz commented 8 years ago

@ashkart , You're welcome. I will add a section to guard against single image input. Thanks.

ashkart commented 8 years ago

I've created some database with image_search executable example on those sift bins I got with libvot_feature executable. How to send query image to that database? I know it is offtop, but there is no wiki about it, and no any documentation((

hlzz commented 8 years ago

Hi @ashkart , If you mean update the image database, it is not well supported now but the api is flexible and we should be supporting it in the future. If you mean query an image, you can check out web_search in example.

ashkart commented 8 years ago

I mean send query in DB (query containing an image) and receive an answer - is given image (or matching image) exists in DB.

hlzz commented 8 years ago

@ashkart You can first extract the sift features from query images and database images, then run image_search. It consists a complete pipeline containing training, image DB building and querying. The results are store in the output_folder you specified.:)

ashkart commented 8 years ago

Okay. I extracted sift data from images i need to store in DB. Executed the image_search, and got results in folder: default Now I will use one of existing sift file in my query. Should i make a list with that sift and run image_search again? It clears up files which are on screen below and puts there info about this one sift...

hlzz commented 8 years ago

No. If you have included the query sift file in the image database building process. You are good to go. The query results are in match.out

hlzz commented 8 years ago

If you want to do a simple single-image query, check out web_search :)

ashkart commented 8 years ago

What that web_search query returns in success case?

For me it looks like that output in attach. attach.txt

hlzz commented 8 years ago

@ashkart It will output a rank list file (*.rank) in the output_folder, specifying the top-k retrieval result, from top to bottom

ashkart commented 8 years ago

is my input correct? ./web_search single vocab_out/match_pairs.txt vocab_out/db.out ouput

single - is a txt with path to fist of query image. vocab_out/match_pairs.txt - list of images paired with sift in db folder vocab_out/db.out - db file ouput - output folder for web_search

hlzz commented 8 years ago

Nope. I will give you an example: (type this in libvot/build/bin) ./web_search ../../test_data/0001.desc ../../test_data/list vocab_out/db.out

This command will generate a rank list called 0001.rank in the same folder as the executable file, which contains the retrieval results. For the usage of additional flags, you can type the following to see: ./web_search --helpshort

ashkart commented 8 years ago

oooohh.... and what is the .desc files?)

hlzz commented 8 years ago

It the feature descriptors generated by openmvg, an alternative way to use libvot when libvot was lack of a feature detector. You can find them in test_data. You can also replace .desc files with the .sift files generated by libvot_feature.

ashkart commented 8 years ago

and what is non-alternative way in my case? the primary one )) i didnt use open mvg, that means i dont need those .desc files. i cant use them now. there is no my images data there.

hlzz commented 8 years ago

@ashkart

You can also replace .desc files with the .sift files generated by libvot_feature.

ashkart commented 8 years ago

oh, sorry, thanks, will try it now))

ashkart commented 8 years ago

yes, it works! man, dont stop working on ths project. quick image recognition search is very expensive pleasure. in my country there is no such projects.

ashkart commented 8 years ago

It would be nice to see matching scores in output

hlzz commented 8 years ago

@ashkart Thanks. We are working towards the next release. Feel free to fork it and play with it. :)