Skip to content

Code of Estimation of Near-Instance-Level Attribute Bottleneck for Zero-Shot Learning (IJCV))

Notifications You must be signed in to change notification settings

LanchJL/IAB-GZSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Estimation of Near-Instance-Level Attribute Bottleneck for Zero-Shot Learning (IAB)

Codes of Estimation of Near-Instance-Level Attribute Bottleneck for Zero-Shot Learning (IJCV 2024)

Installation

$ cd repository
$ pip install -r requirements.txt

Datasets

The splits of dataset and its attributes can be found in data[1]. Please download the data folder and place it in ./data/.

Set the --root in opt.py as your code path.

Please download CUB, AWA2, SUN, FLO datasets, and set the --image_root in opt.py to the datasets.

Please download pretrained resnet weights[1] and place it in ./pretrained_models/

Test

You can evaluate our pretrained model.

Please specify the --model_path in opt.py and then run:

python test.py --att_size 85 --image_size 224 --calibrated_stacking 2.0 --seen_classes 40 --nclasses 50

Train

If you wish to try training our model from scratch, please run IAB.py, for example:

python IAB.py --att_size 85 --image_size 224 --t 8  --gamma 2 --delta 2.0 --calibrated_stacking 2.0 --seen_classes 40 --nclasses 50

Acknowledgment

We are very grateful to the following repos for their great help in constructing our work:

[1] APN. Xu W, Xian Y, Wang J, et al. Attribute prototype network for zero-shot learning[J]. Advances in Neural Information Processing Systems, 2020, 33: 21969-21980.

[2] Softsort. Prillo S, Eisenschlos J. Softsort: A continuous relaxation for the argsort operator[C]//International Conference on Machine Learning. PMLR, 2020: 7793-7802.

[3] C2AM. Xie J, Xiang J, Chen J, et al. C2AM: contrastive learning of class-agnostic activation map for weakly supervised object localization and semantic segmentation[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022: 989-998.

About

Code of Estimation of Near-Instance-Level Attribute Bottleneck for Zero-Shot Learning (IJCV))

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages