Integrated CBIR web application, depend on Swin-Transformer for
feature extraction and Faiss for similarity search. A deep learning based classification framework
MMClassification is used to simplify the model migration process.
The web service architecture is Flask + VueJS.
- Backend
- torch 1.7+
- mmcv-full
- mmclassification
- flask
- Frontend
- npm
- axios
- vuetify
git clone --recurse-submodules https://github.com/AnxQ/cbir-web
# For CPU
conda install pytorch torchvision -c pytorch
# For CUDA 11.3
conda install pytorch==1.10.0 torchvision==0.11.1 cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt
pip install git+https://github.com/open-mmlab/mim.git
mim install mmcls
cd ../cbir-front
npm install
- Download the pth for swin-tiny and put it in checkpoints
- Symbol link or modify the configs in gen_vectors.py
- Run
python gen_vectors.py
- Backend
FLASK_APP = main.py
FLASK_ENV = development
FLASK_DEBUG = 1
python -m flask run
- Frontend
cd cbir-front
npm run serve
The application will be run at http://localhost:8082/