li-xirong / simpleknn

Find k nearest neighbors by an exhaustive search, used for content-based image retrieval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simpleknn

Find k nearest neighbors by an exhaustive search, used for content-based image retrieval

Given an image collection say toydata with n image, we presume that a specific visual feature, named as f1, has been extracted and stored as toydata/FeatureData/f1/id.feature.txt, where each line starts with a unique image id followed by its feature vector. Given a test image and its feature vector, simpleknn finds the k nearest neighbors from toydata by computing a given distance, namely l1 or l2, between the feature vectors.

See test.sh for usage.

About

Find k nearest neighbors by an exhaustive search, used for content-based image retrieval

License:MIT License


Languages

Language:Python 73.6%Language:C++ 19.3%Language:C 4.5%Language:Makefile 0.9%Language:Shell 0.9%Language:Batchfile 0.8%