https://github.com/gtolias/how
HOW local descriptors
https://github.com/gtolias/how
deep-descriptors image-retrieval instance-level-recognition instance-level-search local-descriptors local-features visual-representation visual-representation-learning
Last synced: about 1 year ago
JSON representation
HOW local descriptors
- Host: GitHub
- URL: https://github.com/gtolias/how
- Owner: gtolias
- License: mit
- Created: 2020-07-14T14:58:58.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T10:57:51.000Z (almost 2 years ago)
- Last Synced: 2024-12-31T10:13:12.656Z (over 1 year ago)
- Topics: deep-descriptors, image-retrieval, instance-level-recognition, instance-level-search, local-descriptors, local-features, visual-representation, visual-representation-learning
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 93
- Watchers: 9
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HOW local descriptors
This is the official Python/PyTorch implementation of the HOW local descriptors from our [ECCV 2020 paper](https://arxiv.org/abs/2007.13172):
```
@InProceedings{TJ20,
author = "Giorgos Tolias and Tomas Jenicek and Ond\v{r}ej Chum}",
title = "Learning and aggregating deep local descriptors for instance-level recognition",
booktitle = "European Conference on Computer Vision",
year = "2020"
}
```
## Running the Code
1. Install the cirtorch package (see [cirtorch github](https://github.com/filipradenovic/cnnimageretrieval-pytorch/) for details)
```
# cirtorch
wget "https://github.com/filipradenovic/cnnimageretrieval-pytorch/archive/v1.2.zip"
unzip v1.2.zip
rm v1.2.zip
export PYTHONPATH=${PYTHONPATH}:$(realpath cnnimageretrieval-pytorch-1.2)
```
2. Install the asmk package with dependencies (see [asmk github](https://github.com/jenicek/asmk#running-the-code) for details)
```
# asmk
git clone https://github.com/jenicek/asmk.git
pip3 install pyaml numpy faiss-gpu
cd asmk
python3 setup.py build_ext --inplace
rm -r build
cd ..
export PYTHONPATH=${PYTHONPATH}:$(realpath asmk)
```
3. Install pip3 requirements
```
pip3 install -r requirements.txt
```
4. Run `examples/demo_how.py` with two arguments – mode (`train` or `eval`) and any `.yaml` parameter file from `examples/params/*/*.yml`
### Evaluating ECCV 2020 HOW models
Reproducing results from **Table 2.** with the publicly available models
- R18how (n = 1000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r18_1000.yml -e official_how_r18_1000` _ROxf (M): 75.1, RPar (M): 79.4_
- -R50how (n = 1000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r50-_1000.yml -e official_how_r50-_1000` _ROxf (M): 78.3, RPar (M): 80.1_
- -R50how (n = 2000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r50-_2000.yml -e official_how_r50-_2000` _ROxf (M): 79.4, RPar (M): 81.6_
### Training HOW models
- R18how:
- train: `examples/demo_how.py train examples/params/eccv20/train_how_r18.yml -e train_how_r18`
- eval (n = 1000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r18_1000.yml -ml train_how_r18`
- -R50how:
- train: `examples/demo_how.py train examples/params/eccv20/eval_how_r50-.yml -e train_how_r50-`
- eval (n = 1000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r50-_1000.yml -ml train_how_r50-`
- eval (n = 2000): `examples/demo_how.py eval examples/params/eccv20/eval_how_r50-_2000.yml -ml train_how_r50-`
Dataset shuffling during the training is done according to the cirtorch package; randomness in the results is caused by cudnn and by kmeans for codebook creation during evaluation.