Giter Site home page Giter Site logo

advbct's Introduction

Boundary-aware Backward-Compatible Representation via Adversarial Learning in Image Retrieval [PDF]

Introduction

Backward-compatible training (BCT) aims to deploy a new model without the operation of "backfilling". We introduce AdvBCT, an Adversarial Backward-Compatible Training method with an elastic boundary constraint that takes both compatibility and discrimination into consideration. The codes for AdvBCT and the benchmark are all publicly available in this repo. Thanks to the work Hot-refresh. Some implementaions of our code are based on it.

Our paper has been accepted by CVPR2023.

Datasets

refer to Dataset.md.

Enviroments

conda create -n bct python=3.7
conda activate bct
#conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda install faiss-cpu
pip install -r requirements.txt

Train

  • run scripts/train_old.sh to train the old model. change configs/old_model.yml, MODEL.ARCH, TAG, and TRAIN.FILE_DIR to set different allocation types.
  • run scripts/extract_feat.sh to get feature centers with the old model.
  • run scripts/train_new.sh to train new models. change configs/new_*.yml to configure different allocation types.

Evaluation

evaluate datasets on 32G v100

mkdir -p output/final_model
  • move models to ./output/final_model/. Models can be download in GDrive. The password is 9168.
  • test. change model paths and arch to test your models.
bash scripts/test.sh landmark roxford5k ./data/ROxfordParis/
bash scripts/test.sh landmark rparis6k ./data/ROxfordParis/
bash scripts/test.sh landmark gldv2 ./data/GLDv2 # take a long time

Results

alt results

Next-step

The following content will also be released soon.

  • Release of preprocess codes for training datasets.
  • Release of training codes for 5 works.
  • Release of the trained models.

License

The code is released under MIT license.

MIT License

Copyright (c) 2022 AdvBCT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

advbct's People

Contributors

ashespt 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.