{"id":13679367,"url":"https://github.com/universome/class-norm","last_synced_at":"2025-04-29T18:32:10.946Z","repository":{"id":108699777,"uuid":"212306802","full_name":"universome/class-norm","owner":"universome","description":"Class Normalization for Continual Zero-Shot Learning","archived":false,"fork":false,"pushed_at":"2021-02-05T11:37:36.000Z","size":74313,"stargazers_count":34,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-13T20:17:17.212Z","etag":null,"topics":["continual-learning","iclr2021","initialization","lifelong-learning","normalization","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/universome.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":"2019-10-02T10:02:43.000Z","updated_at":"2024-08-13T20:17:17.213Z","dependencies_parsed_at":"2023-04-01T11:49:16.296Z","dependency_job_id":null,"html_url":"https://github.com/universome/class-norm","commit_stats":null,"previous_names":["universome/class-norm-for-czsl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universome%2Fclass-norm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universome%2Fclass-norm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universome%2Fclass-norm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universome%2Fclass-norm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/universome","download_url":"https://codeload.github.com/universome/class-norm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224185654,"owners_count":17270102,"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":["continual-learning","iclr2021","initialization","lifelong-learning","normalization","zero-shot-learning"],"created_at":"2024-08-02T13:01:04.803Z","updated_at":"2024-11-11T22:30:46.865Z","avatar_url":"https://github.com/universome.png","language":"Python","readme":"# About\n\nThis repo contains the code for the [Class Normalization for Continual Zero-Shot Learning paper](https://arxiv.org/abs/2006.11328) from ICLR 2021:\n- the code to reproduce ZSL and CZSL results\n- the proposed CZSL metrics (located in `src/utils/metrics.py`)\n- fast python implementation of the AUSUC metric\n\n\u003cp style=\"text-align: center;\"\u003e\n\u003c!-- [[Paper]](https://arxiv.org/abs/2006.11328) [[Google Colab]](https://colab.research.google.com/drive/125-hNotS79DH-6lb3CNcN3PaDZfPxasV?usp=sharing) [Website (TBD)] --\u003e\n\u003ca href=\"https://arxiv.org/abs/2006.11328\" target=\"_blank\"\u003e[arXiv Paper]\u003c/a\u003e\n\u003ca href=\"https://colab.research.google.com/drive/125-hNotS79DH-6lb3CNcN3PaDZfPxasV?usp=sharing\" target=\"_blank\"\u003e[Google Colab]\u003c/a\u003e\n\u003ca href=\"https://openreview.net/forum?id=7pgFL2Dkyyy\" target=\"_blank\"\u003e[OpenReview Paper]\u003c/a\u003e\n\u003c/p\u003e\n\u003c!-- [[Website (TBD)]](https://universome.github.io/class-norm-for-czsl) --\u003e\n\nIn this project, we explored different normalization strategies used in ZSL and proposed a new one (class normalization) that is suited for deep attribute embedders.\nThis allowed us to outperform the existing ZSL model with a simple 3-layer MLP trained just in 30 seconds.\nAlso, we extended ZSL ideas into a more generalized setting: Continual Zero-Shot Learning, proposed a set of metrics for it and tested several baselines.\n\n\u003cdiv style=\"text-align:center\"\u003e\n\u003cimg src=\"images/class-norm-illustration.jpg\" alt=\"Class Normalization illustration\" width=\"500\"/\u003e\n\u003c/div\u003e\n\n# Installation \u0026 training\n## Data preparation\n### For ZSL\nFor ZSL, we tested our method on the standard GBU datasets which you can download from [the original website](https://www.mpi-inf.mpg.de/departments/computer-vision-and-machine-learning/research/zero-shot-learning/zero-shot-learning-the-good-the-bad-and-the-ugly).\nIt is the easiest to follow our [Google Colab](class-norm-for-czsl.ipynb) to reproduce the results.\n\n### For CZSL\nFor CZSL, we tested our method on SUN and CUB datasets.\nIn contrast to ZSL, in CZSL we used raw images as inputs instead of an ImageNet-pretrained model's features.\nFor CUB, please follow the instructions in the [A-GEM repo](https://github.com/facebookresearch/agem). Note, that CUB images dataset are now to be downloaded manually from [here](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html), but we used the same splits as A-GEM.\nPut the A-GEM splits into the CUB data folder.\n\nFor SUN, download the data from the [official website](https://cs.brown.edu/~gmpatter/sunattributes.html), put it under `data/SUN` and then follow the instructions in [scripts/sun_data_preprocessing.py](scripts/sun_data_preprocessing.py)\n\n## Installing the `firelab` dependency\nYou will need to install [firelab library](https://github.com/universome/firelab) to run the training:\n```\npip install firelab\n```\n\n## Running ZSL training\nPlease, refer to this [Google Colab notebook](class-norm-for-czsl.ipynb): it contains the code to reproduce our results.\n\n## Running CZSL training\nTo run CZSL training you will need to run the command:\n```\npython src/run.py -c basic|agem|mas|joint -d cub|sun\n```\nPlease note, that by default we load all the data into memory (to speed up things).\nThis behaviour is controled by the `in_memory` flag in the config.\n\n# Results\n## Zero-shot learning results\n\u003cdiv style=\"text-align:center\"\u003e\n\u003cimg src=\"images/zsl-results-table.jpg\" alt=\"ZSL results\" style=\"max-width: 500px\"/\u003e\n\u003c/div\u003e\n\n## Continual Zero-Shot Learning results\n\u003cdiv style=\"text-align:center\"\u003e\n\u003cimg src=\"images/czsl-results-table.jpg\" alt=\"CZSL results\" style=\"max-width: 500px\"/\u003e\n\u003c/div\u003e\n\n\n## Training speed results for ZSL\n\u003cdiv style=\"text-align:center\"\u003e\n\u003cimg src=\"images/training-speed-results.jpg\" alt=\"Training speed results\" style=\"max-width: 500px\"/\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversome%2Fclass-norm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiversome%2Fclass-norm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversome%2Fclass-norm/lists"}