GithubHelp home page GithubHelp logo

xunguangwang / cgat Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 899 KB

[WWW 2023] Official repository for "CgAT: Center-Guided Adversarial Training for Deep Hashing-Based Retrieval"

Python 100.00%
adversarial-training deep-hashing image-retrieval

cgat's Introduction

CgAT: Center-Guided Adversarial Training for Deep Hashing-Based Retrieval

This is the official code for CgAT: Center-Guided Adversarial Training for Deep Hashing-Based Retrieval (WWW 2023).

In this paper, we present a min-max based Center-guided Adversarial Training, namely CgAT, to improve the robustness of deep hashing networks through worst adversarial examples. Our key idea is to formulate a hash code (dubbed center code) as a discriminative semantic representation of the original sample, which can be used to guide the generation of the powerful adversarial example and as an accurate optimization objective for adversarial training.

Requirements

My dependencies are as follows:

  • python 3.9.12
  • pytorch 1.12.0
  • torchvision 0.13.0
  • pillow 9.0.1
  • numpy 1.21.5
  • cudatoolkit 11.3.1

Quick Start

Train hashing models

Initialize the hyper-parameters in hashing.py following the paper, and then run

python hashing.py

Adversarial training

Initialize the hyper-parameters in central_adv_train.py according to the paper, and then run

python central_adv_train.py

Citation

If you find this work is useful, please cite the following:

@inproceedings{wang2023cgat,
  title={CgAT: Center-Guided Adversarial Training for Deep Hashing-Based Retrieval},
  author={Wang, Xunguang and Lin, Yiqun and Li, Xiaomeng},
  booktitle={Proceedings of the ACM Web Conference (WWW)},
  year={2023}
}

cgat's People

Contributors

xunguangwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cgat's Issues

How to reproduce the results.

What is the difference between this method and SAAT method. Besides, i wanna know how to reproduce the results reported in the paper and it seems that the robust model can not be trained successfully. Please answer this question for me, thanks a lot.

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.