I study how to implement CBIR from PyImageSearch Gurus, the algorithms are almost the same, but my codes are written by c++, build on top of opencv, hdf5, armadillo, boost, rapidjson. I pick c++ but not python(PyImageSearch use python) for this project because
1 : c++ suit for building stand alone package
2 : I like c++
These series of post would not discuss the implementation details of the codes(codes located at github) but summarize the keys I learn from the CBIR lessons of PyImageSearch Gurus.
The keys of this CBIR system
1 : Feature detector--kaze
2 : Feature descriptor--kaze
3 : Bag of visual words
4 : Data structure(hdf5, inverted index)
5 : Create Code book(I prefer kmeans)
6 : Quantization(build a histogram)
7 : Tf-idf(Term frequency and inverse document frequency)
8 : Spatial verification
9 : Evaluation
ukbench contain 6376 images, it would be a tedious job to find relevant images by human, this is why we need CBIR to save us from this kind of labor. Before I begin to summarize the keys of this CBIR system, I would post some examples, a picture is worth a thousand words.
Case 1 : Find similar image of the camera(pic00) within ukbench
pic00 |
Search result of pic00 |
Case 2 : Find similar image of the toy(pic01) within ukbench
pic01 |
Search result of pic01 |
On next post, I would record part of the flows of this CBIR system, write down how to use the codes located on github(without explanation of implementation details).
No comments:
Post a Comment