Home

Awesome

Introduction

This repository contains implementations of 5 classical zero-shot algorithms (SAE, ALE, SJE, ESZSL, and DeViSE) in the usual as well as the Generalized zero-shot learning (GZSL) settings using the Proposed Split and evaluation protocols (eg. Class-Averaged Top-1 Accuracy) outlined in Zero-Shot Learning - A Comprehensive Evaluation of the Good, the Bad and the Ugly (ZSLGBU) by Yongqin Xian, Christoph H. Lampert, Bernt Schiele, Zeynep Akata (TPAMI 2018).

This is the first public implementation of SAE, ALE, SJE and DeViSE under the ZSLGBU protocol. An existing implementation of ESZSL can be found here (thanks to @sbharadwajj). To this, I have added the GZSL functionality.

Reference Papers

The original papers corresponding to the 5 algorithms are:

[1] SAE (Semantic Autoencoder) - Semantic Autoencoder for Zero-Shot Learning. Elyor Kodirov, Tao Xiang, Shaogang Gong. CVPR, 2017.

[2] ALE (Attribute Label Embedding) - Label-Embedding for Image Classification. Zeynep Akata, Florent Perronnin, Zaid Harchaoui, Cordelia Schmid. TPAMI, 2016.

[3] SJE (Structured Joint Embedding) - Evaluation of Output Embeddings for Fine-Grained Image Classification. Zeynep Akata, Scott Reed, Daniel Walter, Honglak Lee, Bernt Schiele. CVPR, 2015.

[4] ESZSL - An embarrassingly simple approach to zero-shot learning. Bernardino Romera-Paredes, Philip H. S. Torr. ICML, 2015.

[5] DeViSE - DeViSE: A Deep Visual-Semantic Embedding Model. Andrea Frome*, Greg S. Corrado*, Jonathon Shlens*, Samy Bengio, Jeffrey Dean, Marc’Aurelio Ranzato, Tomas Mikolov. NIPS, 2013.

Data Splits

DatasetTotal ImagesAttributesClass Split (Tr+Val+Ts)ZSLGZSL
trvaltstrvaltr+valts seents unseen
SUN14340102580+65+721160013001440928010401032025801440
CUB11788312100+50+5058752946296747022355705717642967
AWA1304758527+13+1016864792656851346063721983249585685
AWA2373228527+13+1020218919179131618773402352758827913
aPY153396415+5+1260861329792449061026593214837924

Code

Each folder above has its own README with running instructions, results and their comparisons with those reported in ZSLGBU. I have also put existing code references wherever relevant.

Setup

git clone https://github.com/mvp18/Popular-ZSL-Algorithms.git
cd Popular-ZSL-Algorithms
bash setup.sh

This downloads data (splits, Res101 features and class embeddings) corresponding to the Proposed Split for AWA1, AWA2, CUB, SUN and aPY. To know more about the individual files, refer to the README.txt file available inside xlsa17 folder.

TODOs

Contributing

If you find any errors, kindly raise an issue and I will get back to you ASAP.