Skip to content

Pytorch Implementation of Unifying Deep Local and Global Features for Image Search (DELG)

Notifications You must be signed in to change notification settings

qingfengmingyue/DELG

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DELG-pytorch

Pytorch Implementation of Unifying Deep Local and Global Features for Image Search (delg-eccv20)

  • DELG pipline:

Installation

Install Python dependencies:

pip install -r requirements.txt

Set PYTHONPATH:

export PYTHONPATH=`pwd`:$PYTHONPATH

Training

Training a delg model:

python train_delg.py \
    --cfg configs/metric/resnet_delg_8gpu.yaml \
    OUT_DIR ./output \
    PORT 12001 \
    TRAIN.WEIGHTS path/to/pretrainedmodel

Resume training:

python train_delg.py \
    --cfg configs/metric/resnet_delg_8gpu.yaml \
    OUT_DIR ./output \
    PORT 12001 \
    TRAIN.AUTO_RESUME True

Weights

-r50-delg (wu46)

-r101-delg (5pdj)

pretrained weeights are available in pymetric

Feature extraction

Extracting global and local feature for multi-scales

python tools/extractor.py --cfg configs/resnet_delg_8gpu.yaml

Refer extractor.sh for using multicards

See visualize.ipynb for verification of local features

Evaluation on ROxf and RPar

Local Match

  • Spatial Verification

    Install pydegensac and see tools/rerank/spatial_verification.py

  • Examples

Results

See (https://github.com/filipradenovic/revisitop) for details

cd tools/revisitop
python example_evaluate_with_local.py main
  • on roxford5k
Backbone Train Size Method mAP E mAP M mAP H
ResNet50 224 Global Ranking 77.73 66.06 38.37
ResNet50 224 Global 81.03 68.31 39.98
ResNet50 224 Global + Spatial Verification 84.81 71.97 46.63
ResNet50 512 Global 90.55 78.51 56.90
ResNet50 512 Global + Spatial Verification 90.86 80.08 58.42
  • on rparis6k(updating)
  1. SOTA of R50-DELG is 78.3 mAP@M in the paper, we outperform it
  2. All training set version is GLDv2-clean (81313, 1580470)
  3. Traing size, global and local feature scales adopted are same with the paper

About

Pytorch Implementation of Unifying Deep Local and Global Features for Image Search (DELG)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 88.0%
  • Python 12.0%