{"id":13422195,"url":"https://github.com/lzrobots/LearningToCompare_ZSL","last_synced_at":"2025-03-15T11:31:14.022Z","repository":{"id":73908826,"uuid":"126488485","full_name":"lzrobots/LearningToCompare_ZSL","owner":"lzrobots","description":"PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning  (Zero-Shot Learning part)","archived":false,"fork":false,"pushed_at":"2018-10-01T21:05:59.000Z","size":13892,"stargazers_count":264,"open_issues_count":5,"forks_count":67,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-27T22:32:50.756Z","etag":null,"topics":["few-shot-learning","zero-shot-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lzrobots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-23T13:24:10.000Z","updated_at":"2024-09-03T07:53:16.000Z","dependencies_parsed_at":"2024-01-16T00:18:42.871Z","dependency_job_id":"1f6f3f6e-6495-40a2-8aa1-9e79995b2aa0","html_url":"https://github.com/lzrobots/LearningToCompare_ZSL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzrobots%2FLearningToCompare_ZSL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzrobots%2FLearningToCompare_ZSL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzrobots%2FLearningToCompare_ZSL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzrobots%2FLearningToCompare_ZSL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lzrobots","download_url":"https://codeload.github.com/lzrobots/LearningToCompare_ZSL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243724939,"owners_count":20337653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["few-shot-learning","zero-shot-learning"],"created_at":"2024-07-30T23:00:38.894Z","updated_at":"2025-03-15T11:31:13.528Z","avatar_url":"https://github.com/lzrobots.png","language":"Python","funding_links":[],"categories":["Learning to Compare: Relation Network for Few-Shot Learning. CVPR 2018"],"sub_categories":[],"readme":"# LearningToCompare_ZSL\n\nPyTorch code for CVPR 2018 paper: [Learning to Compare: Relation Network for Few-Shot Learning](https://arxiv.org/abs/1711.06025) (Zero-Shot Learning part)\n\nFor Few-Shot Learning part, please visit [here](https://github.com/songrotek/LearningToCompare_FSL).\n\n# Requirements\n\nPython 2.7\n\nPytorch 0.3\n\n# Data\nDownload data from [here](http://www.robots.ox.ac.uk/~lz/DEM_cvpr2017/data.zip) and unzip it `unzip data.zip`.\n\n# Run\nZSL and GZSL performance evaluated under GBU setting [1]: ResNet feature, GBU split, averaged per class accuracy.\n\n`AwA1_RN.py` will give you ZSL and GZSL performance on AwA1 with attribute under GBU setting [1].\n\n`AwA2_RN.py` will give you ZSL and GZSL performance on AwA2 with attribute under GBU setting [1].\n\n`CUB_RN.py` will give you ZSL and GZSL performance on CUB with attribute under GBU setting [1].\n\n\n| Model      |   AwA1 T1    |    u    |    s    |    H    |   CUB T1    |    u    |    s    |    H    |\n|------------|---------|---------|---------|---------|---------|---------|---------|---------|\n| DAP [2]      |   44.1  |   0.0   |   88.7  |   0.0   |   40.0  |   1.7   |   67.9  |   3.3   |\n| CONSE [3]     |   45.6  |   0.4   |   88.6  |   0.8   |   34.3  |   1.6   |   **72.2**  |   3.1   |\n| SSE [4]       |   60.1  |   7.0   |   80.5  |   12.9  |   43.9  |   8.5   |   46.9  |   14.4  |\n| DEVISE [5]    |   54.2  |   13.4  |   68.7  |   22.4  |   52.0  |   23.8  |   53.0  |   32.8  |\n| SJE [6]       |   65.6  |   11.3  |   74.6  |   19.6  |   53.9  |   23.5  |   59.2  |   33.6  |\n| LATEM [7]     |   55.1  |   7.3   |   71.7  |   13.3  |   49.3  |   15.2  |   57.3  |   24.0  |\n| ESZSL [8]     |   58.2  |   6.6   |   75.6  |   12.1  |   53.9  |   12.6  |   63.8  |   21.0  |\n| ALE [9]       |   59.9  |   16.8  |   76.1  |   27.5  |   54.9  |   23.7  |   62.8  |   34.4  |\n| SYNC [10]      |   54.0  |   8.9   |   87.3  |   16.2  |   55.6  |   11.5  |   70.9  |   19.8  |\n| SAE [11]       |   53.0  |   1.8   |   77.1  |   3.5   |   33.3  |   7.8   |   54.0  |   13.6  |\n| [DEM](https://github.com/lzrobots/DeepEmbeddingModel_ZSL) [12] | **68.4** | **32.8** | 84.7  |  **47.3** | 51.7  |   19.6  |  57.9  |  29.2 |\n| **RN (OURS)** |68.2  | 31.4  | **91.3**   |  46.7  |  **55.6** |  **38.1**   |  61.4   |  **47.0**  |\n\n\n| Model      |   AwA2 T1    |    u    |    s    |    H    | \n|------------|---------|---------|---------|---------|\n| DAP [2]      |   46.1  |   0.0    |   84.7  |   0.0   |\n| CONSE [3]     |   44.5  |   0.5   | 90.6|   1.0   |   \n| SSE [4]       |   61.0  |   8.1   |   82.5  |   14.8  |  \n| DEVISE [5]    |   59.7  |   17.1  |   74.7  |   27.8  |  \n| SJE [6]       |   61.9  |   8.0   |   73.9  |   14.4  |  \n| LATEM [7]     |   55.8  |   11.5  |   77.3  |   20.0  | \n| ESZSL [8]     |   58.6  |   5.9   |   77.8  |   11.0  |  \n| ALE [9]       |   62.5  |   14.0  |   81.8  |   23.9  | \n| SYNC [10]     |   46.6  |   10.0  |   90.5  |   18.0  |  \n| SAE [11]      |   54.1  |   1.1   |   82.2  |   2.2   | \n| [DEM](https://github.com/lzrobots/DeepEmbeddingModel_ZSL) [12] | **67.1** | **30.5** | 86.4 | 45.1| \n| **RN (OURS)** |64.2   | 30.0 | **93.4**  | **45.3** | \n\n\n\n\n\n\n## Citing\n\nIf you use this code in your research, please use the following BibTeX entry.\n\n```\n@inproceedings{sung2018learning,\n  title={Learning to Compare: Relation Network for Few-Shot Learning},\n  author={Sung, Flood and Yang, Yongxin and Zhang, Li and Xiang, Tao and Torr, Philip HS and Hospedales, Timothy M},\n  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},\n  year={2018}\n}\n```\n\n## References\n\n- [1] [Zero-Shot Learning - A Comprehensive Evaluation of the Good, the Bad and the Ugly](https://arxiv.org/abs/1707.00600).\n  Yongqin Xian, Christoph H. Lampert, Bernt Schiele, Zeynep Akata.\n  arXiv, 2017.\n- [2] [Attribute-Based Classification forZero-Shot Visual Object Categorization](https://cvml.ist.ac.at/papers/lampert-pami2013.pdf).\n  Christoph H. Lampert, Hannes Nickisch and Stefan Harmeling.\n  PAMI, 2014.\n- [3] [Zero-Shot Learning by Convex Combination of Semantic Embeddings](https://arxiv.org/abs/1312.5650).\n  Mohammad Norouzi, Tomas Mikolov, Samy Bengio, Yoram Singer, Jonathon Shlens, Andrea Frome, Greg S. Corrado, Jeffrey Dean.\n  arXiv, 2013.\n- [4] [Zero-Shot Learning via Semantic Similarity Embedding](https://arxiv.org/abs/1509.04767).\n  Ziming Zhang, Venkatesh Saligrama.\n  ICCV, 2015.\n- [5] [DeViSE: A Deep Visual-Semantic Embedding Model](http://papers.nips.cc/paper/5204-devise-a-deep-visual-semantic-embedding-model.pdf).\n  Andrea Frome*, Greg S. Corrado*, Jonathon Shlens*, Samy BengioJeffrey Dean, Marc’Aurelio Ranzato, Tomas Mikolov.\n  NIPS, 2013.\n- [6] [Evaluation of Output Embeddings for Fine-Grained Image Classification](https://arxiv.org/abs/1409.8403).\n  Zeynep Akata, Scott Reed, Daniel Walter, Honglak Lee, Bernt Schiele.\n  CVPR, 2015.\n- [7] [Latent Embeddings for Zero-shot Classification](https://arxiv.org/abs/1603.08895).\n  Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh Nguyen, Matthias Hein, Bernt Schiele\n  CVPR, 2016.\n- [8] [An embarrassingly simple approach to zero-shot learning](http://proceedings.mlr.press/v37/romera-paredes15.pdf).\n  Bernardino Romera-Paredes, Philip H. S. Torr.\n  ICML, 2015.\n- [9] [Label-Embedding for Image Classification](https://arxiv.org/abs/1503.08677).\n  Zeynep Akata, Florent Perronnin, Zaid Harchaoui, Cordelia Schmid.\n  PAMI, 2016.\n- [10] [Synthesized Classifiers for Zero-Shot Learning](https://arxiv.org/abs/1603.00550).\n  Soravit Changpinyo, Wei-Lun Chao, Boqing Gong, Fei Sha.\n  CVPR, 2016.\n- [11] [Semantic Autoencoder for Zero-Shot Learning](https://arxiv.org/abs/1704.08345).\n  Elyor Kodirov, Tao Xiang, Shaogang Gong.\n  CVPR, 2017.\n- [12] [Learning a Deep Embedding Model for Zero-Shot Learning](https://arxiv.org/abs/1611.05088).\n  Li Zhang, Tao Xiang, Shaogang Gong.\n  CVPR, 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzrobots%2FLearningToCompare_ZSL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flzrobots%2FLearningToCompare_ZSL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzrobots%2FLearningToCompare_ZSL/lists"}