Faiss + Pytorch + FastAPI + LMDB + PostgreSQL
Uses HardNet8 + DoG + MAGSAC++ (OpenCV)
Supported operations: add new image, delete image, find similar images by image file, find similar images by image id
You should install torch yourself https://pytorch.org/get-started/locally/.
apt install python3-dev
apt install libpq-dev
pip3 install -r requirements.txtthen install PostgreSQL
after that:
sudo -i -u postgres
psql
ALTER USER postgres PASSWORD '12345';generate_local_features.py ./path_to_img_folder -> generates features
train.py -> trains index
add_to_index.py -> adds features from lmdb to index
local_features_web.py -> web microservice