GithubHelp home page GithubHelp logo

shadowkun / ijcai-2022-zla Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cdb342/ijcai-2022-zla

0.0 1.0 0.0 229 KB

Codes for IJCAI'2022 Paper: Zero-Shot Logit Adjustment

License: MIT License

Python 100.00%

ijcai-2022-zla's Introduction

Zero-Shot Logit Adjustment

arXiv Pytorch 1.8.1 License: MIT

This project contains the pytorch implemention for Zero-Shot Logit Adjustment.

Dependencies

  • Python 3.7
  • Pytorch = 1.0.1
  • NumPy = 1.17.3

Prerequisites

  • Dataset: please download the dataset, and change --dataroot to your local path.
  • Semantic: The semantics for AWA2, SUN, and APY are available in the dataset. please download the 1024-D CUB semantic and save it to the data path.

Train and Test

Please run the following commands to test on different datasets:

  • python ./WGAN+ZLAP.py --dataset AWA2 --attSize 85 --nz 85 --syn_num 10 --ratio 1000
  • python ./WGAN+ZLAP.py --dataset SUN --attSize 102 --nz 102 --syn_num 10 --ratio 60
  • python ./WGAN+ZLAP.py --dataset APY --attSize 64 --nz 64 --syn_num 10 --ratio 300
  • python ./WGAN+ZLAP.py --dataset CUB --attSize 1024 --nz 1024 --syn_num 10 --ratio 30 --class_embedding sent

The meaning of these args is

  • --dataset: datasets, e.g: SUN.
  • --attSize: size of semantic descriptors.
  • --nz: size of the Gaussian noise.
  • --syn_num: synthetic number for each unseen class.
  • --reatio: hyperparameter to control the seen-unseen prior (see Sec. 4.4 of the paper)

Results

We test our method in WGAN and CE-GZSL, and here are the results.

Method AWA2 CUB SUN APY
AS AU AH AS AU AH AS AU AH AS AU AH
f-CLSWGAN 57.7 71.0 63.7 59.4 63.3 61.3 46.2 35.2 40.0 32.5 57.2 41.5
ZLAPWGAN 65.4 82.2 72.8 73.0 64.8 68.7 50.1 38.0 43.2 40.2 53.8 46.0
CE-GZSL 65.3 75.0 69.9 66.9 65.9 66.4 52.4 34.3 41.5 28.3 65.8 39.6
ZLAP+CE-GZSL 64.8 80.9 72.0 71.2 66.2 68.6 50.9 35.7 42.0 38.3 60.9 47.0

Citation

If you recognize our work, please cite:

@inproceedings{chen2022zero,  
  title={Zero-Shot Logit Adjustment},  
  author={Chen, Dubing and Shen, Yuming and Zhang, Haofeng and Philip H.S. Torr},  
  year={2022},  
  organization={IJCAI}  
}

Acknowledgment

We acknowledge the prior works f-CLSWGAN and CE-GZSL for their contributions to our work.

ijcai-2022-zla's People

Contributors

cdb342 avatar

Watchers

 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.