{"id":17193730,"url":"https://github.com/ankitdhall/learning_embeddings","last_synced_at":"2025-04-13T20:11:38.211Z","repository":{"id":37641680,"uuid":"172055744","full_name":"ankitdhall/learning_embeddings","owner":"ankitdhall","description":"Code for CVPR-W 2020 paper \"Hierarchical Image Classification using Entailment Cone Embeddings\" https://arxiv.org/abs/2004.03459","archived":false,"fork":false,"pushed_at":"2023-02-02T05:19:18.000Z","size":2660,"stargazers_count":22,"open_issues_count":12,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T10:46:52.624Z","etag":null,"topics":["cvpr-2020","fine-grained-classification","hyperbolic-embeddings","image-classification","non-euclidean-geometry","representation-learning"],"latest_commit_sha":null,"homepage":"https://ankitdhall.github.io/project/learning-representations-for-images-with-hierarchical-labels/","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/ankitdhall.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}},"created_at":"2019-02-22T11:35:03.000Z","updated_at":"2025-03-26T22:52:04.000Z","dependencies_parsed_at":"2023-01-21T12:45:37.500Z","dependency_job_id":null,"html_url":"https://github.com/ankitdhall/learning_embeddings","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/ankitdhall%2Flearning_embeddings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitdhall%2Flearning_embeddings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitdhall%2Flearning_embeddings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitdhall%2Flearning_embeddings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankitdhall","download_url":"https://codeload.github.com/ankitdhall/learning_embeddings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248774980,"owners_count":21159534,"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":["cvpr-2020","fine-grained-classification","hyperbolic-embeddings","image-classification","non-euclidean-geometry","representation-learning"],"created_at":"2024-10-15T01:44:49.106Z","updated_at":"2025-04-13T20:11:38.170Z","avatar_url":"https://github.com/ankitdhall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Hierarchical Image Classification using Entailment Cone Embeddings](https://ankitdhall.github.io/project/learning-representations-for-images-with-hierarchical-labels/)\n\u003ca href=\"https://ankitdhall.github.io\" target=\"_blank\"\u003eAnkit Dhall\u003c/a\u003e, \u003ca href=\"https://las.inf.ethz.ch/people/anastasia-makarova\" target=\"_blank\"\u003eAnastasia Makarova\u003c/a\u003e, \u003ca href=\"https://people.csail.mit.edu/oct/\" target=\"_blank\"\u003eOctavian Ganea\u003c/a\u003e, \u003ca href=\"http://da.inf.ethz.ch/people/DarioPavllo/\" target=\"_blank\"\u003eDario Pavllo\u003c/a\u003e, Michael Greeff, \u003ca href=\"https://las.inf.ethz.ch/krausea\" target=\"_blank\"\u003eAndreas Krause\u003c/a\u003e\n\n![alt text](https://ankitdhall.github.io/publication/learning-representations-for-images-with-hierarchical-labels/featured_huc45c56e50f3be3419f4018ba4fe72357_373657_720x0_resize_lanczos_2.png \"Jointly embeddings images and hierarchical labels on a Poincare disk in 2D\")  \n*Fig. 1: Jointly embeddings images and hierarchical labels on a Poincare disk in 2D*\n\nMore information about the project (paper, dataset and slides) can be found on the [project page](https://ankitdhall.github.io/project/learning-representations-for-images-with-hierarchical-labels/).\n\n# Related publications and dataset\n- [Learning Representations for Images With Hierarchical Labels, Master Thesis](https://arxiv.org/abs/2004.00909)\n- [Hierarchical Image Classification using Entailment Cone Embeddings @CVPR 2020, DiffCVML workshop](https://arxiv.org/abs/2004.03459)\n- [ETHEC Hierarchical dataset](https://www.researchcollection.ethz.ch/handle/20.500.11850/365379)\n\n# Usage\nCreate a virtual environment using the `requirements.txt` file:\n```\nvirtualenv -p python3 venv\nsource venv/bin/activate\npip install -r learning_embeddings/requirements_3.6.txt\npip install opencv-python\npip install gitpython\n```  \n\nUse branch `Adam1x` to run experiments with the ETHEC dataset:  \n`git checkout Adam1x`  \n\nSplits for the ETHEC dataset can be found in `splits` folder. Experiments in this repository were conducted using **v0.1** of the ETHEC dataset.  \n\nSample command:  \n`python learning_embeddings/network/ethec_experiments.py --experiment_name exp_test --experiment_dir exp --image_dir ETHEC_dataset_v0.1/ETHEC_dataset/IMAGO_build_test_resized/ --n_epochs 1 --model resnet18 --loss multi_level --set_mode train`\n\n# Predicting Taxonomy for Organisms\n\n![alt text](https://ankitdhall.github.io/project/learning-representations-for-images-with-hierarchical-labels/featured_hu84feb2bf561f49e98504fe25e8752a1b_2231317_720x0_resize_lanczos_2.png \"The ETHEC dataset hierarchy\")  \n*Fig. 2: The ETHEC dataset hierarchy*\n\nOne of the main applications of this work is to assist natural history collections, museums and organizations that preserve large numbers of historical and extant biodiversity specimens to digitize and organize their collections. Hobbyists create their personal collections most of which are eventually donated to public institutions. Before integration, these specimens need to be sorted taxonomically by specialists who have little time and are expensive. If this resource intensive task could be preceded by a pre-sorting procedure, for instance, where these specimens are categorized by unskilled labour based on their family, sub-family, genus, and species it would expedite and economize the process.\n\nThanks to the the [ETH Library Lab](https://www.librarylab.ethz.ch/) the research conducted on the thesis will be turned into classification app that can be used by hobbyists, collectors, and researchers alike to speed up and economize classification and segregation of entomological specimens. More information about the app will be made available soon!\n\n# References\nIf you find this useful for your research, please consider citing the following in your publication:\n```\n@misc{dhall2020hierarchical,\n    title={Hierarchical Image Classification using Entailment Cone Embeddings},\n    author={Ankit Dhall and Anastasia Makarova and Octavian Ganea and Dario Pavllo and Michael Greeff and Andreas Krause},\n    year={2020},\n    eprint={2004.03459},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV}\n}\n\n@misc{dhall2020hierarchical,\n    title={Hierarchical Image Classification using Entailment Cone Embeddings},\n    author={Ankit Dhall and Anastasia Makarova and Octavian Ganea and Dario Pavllo and Michael Greeff and Andreas Krause},\n    year={2020},\n    eprint={2004.03459},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV}\n}\n\n@MISC{20.500.11850/365379,\n\tauthor = {Dhall, Ankit},\n\tpublisher = {ETH Zurich},\n\tyear = {2019},\n\tlanguage = {en},\n\tcopyright = {In Copyright - Non-Commercial Use Permitted},\n\tsize = {5.98 GB},\n\taddress = {Zurich},\n\tDOI = {10.3929/ethz-b-000365379},\n\ttitle = {ETH Entomological Collection (ETHEC) Dataset [Palearctic Macrolepidoptera, Spring 2019]},\n}\n\n```\n\n![alt text](https://ankitdhall.github.io/project/learning-representations-for-images-with-hierarchical-labels/ec_2d_labels.png \"Embedding label hierarchy with euclidean entailment cones in 2D\")\n*Fig. 3: Embedding label hierarchy with euclidean entailment cones in 2D*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitdhall%2Flearning_embeddings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitdhall%2Flearning_embeddings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitdhall%2Flearning_embeddings/lists"}