Skip to main content

Python ASMK (Aggregated Selective Match Kernels)

This is a Python implementation of the ASMK approach published in ICCV 2013:

@InProceedings{TAJ13,
  author       = "Giorgos Tolias and Yannis Avrithis and Herv\'e J\'egou",
  title        = "To aggregate or not to aggregate: Selective match kernels for image search",
  booktitle    = "IEEE International Conference on Computer Vision",
  year         = "2013"
}

This package is provided to support image retrieval with local descriptors and to reproduce the results of our ECCV 2020 paper with HOW deep local descriptors:

@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"
}

There are minor differences compared to the original ASMK approach (ICCV'13) and implementation, which are described in our ECCV'20 paper. Using the provided package to run ASMK with other local descriptors is straightforward.

Running the Code

  1. Install the requirements (faiss-cpu for cpu-only setup)
pip3 install pyaml numpy faiss-gpu
  1. Build C library for your Python version
python3 setup.py build_ext --inplace
rm -r build
  1. Download cirtorch and add it to your PYTHONPATH
wget "https://github.com/filipradenovic/cnnimageretrieval-pytorch/archive/master.zip"
unzip master.zip
rm master.zip
export PYTHONPATH=${PYTHONPATH}:$(realpath cnnimageretrieval-pytorch-master)
  1. Run examples/demo_how.py giving it any .yaml parameter file from examples/params/*.yml

Reproducing ECCV 2020 results with HOW local descriptors

Reproducing results from Table 2.

  • R18how (n = 1000):   examples/demo_how.py eccv20_how_r18_1000   ROxf (M): 75.1, RPar (M): 79.4
  • -R50how (n = 1000):   examples/demo_how.py eccv20_how_r50-_1000   ROxf (M): 78.3, RPar (M): 80.1
  • -R50how (n = 2000):   examples/demo_how.py eccv20_how_r50-_2000   ROxf (M): 79.4, RPar (M): 81.6

Metadata

Release files for asmk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asmk 0.1.1
File Size Uploaded
asmk-0.1.1.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asmk 0.1.1
File Interpreter ABI Platform
asmk-0.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details

Total release size: 103.4 kB

Release files / asmk-0.1.1.tar.gz

Download URL asmk-0.1.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6772df30123f95fa74316ea11e6cc418191b0bf00e9659a4ae659abe00410810
BLAKE2b-256 checksum
How to use checksums
a6d1c392f1b6e79d7aeb809fa78a8f4af0e6c41eb7c1461fe5f7face8ca160dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / asmk-0.1.1-cp311-cp311-win_amd64.whl

Download URL asmk-0.1.1-cp311-cp311-win_amd64.whl
Size 88.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
6a8adab30e4cda74c2530a3d204da1552c799c1ad550e39966c665421cf1a9f8
BLAKE2b-256 checksum
How to use checksums
c8d66eac25082f1cc183acdb1c4abbeb74d4c22cd8dfe4c11cfcccd979a65f4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page