Giter Site home page Giter Site logo

delg's Introduction

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

!!! Queries should be cropped as DOLG.

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

delg's People

Contributors

feymanpriv avatar xuexuetong1993 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.