{"id":13738145,"url":"https://github.com/neka-nat/pytorch-hdml","last_synced_at":"2025-03-23T18:31:21.642Z","repository":{"id":75431759,"uuid":"203379467","full_name":"neka-nat/pytorch-hdml","owner":"neka-nat","description":"Hardness-Aware Deep Metric Learning (CVPR2019) in pytorch","archived":false,"fork":false,"pushed_at":"2021-05-02T14:06:10.000Z","size":21591,"stargazers_count":28,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T22:35:51.620Z","etag":null,"topics":["cars196","cub200","cvpr2019","deep-learning","deep-metric-learning","pytorch","triplet-loss"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neka-nat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-08-20T13:13:48.000Z","updated_at":"2023-01-08T18:03:42.000Z","dependencies_parsed_at":"2023-06-06T11:45:15.126Z","dependency_job_id":null,"html_url":"https://github.com/neka-nat/pytorch-hdml","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/neka-nat%2Fpytorch-hdml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fpytorch-hdml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fpytorch-hdml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neka-nat%2Fpytorch-hdml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neka-nat","download_url":"https://codeload.github.com/neka-nat/pytorch-hdml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245149210,"owners_count":20568849,"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":["cars196","cub200","cvpr2019","deep-learning","deep-metric-learning","pytorch","triplet-loss"],"created_at":"2024-08-03T03:02:12.387Z","updated_at":"2025-03-23T18:31:20.227Z","avatar_url":"https://github.com/neka-nat.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Hardness-Aware Deep Metric Learning\n\nThis is an unofficial implementation of [\"Hardness-Aware Deep Metric Learning\" (CVPR 2019 Oral)](https://arxiv.org/abs/1903.05503) in Pytorch.\n\n## Installation\n\n```\ncd pytorch-hdml\npip install pipenv\npipenv install\n```\n\n## Download dataset\n\n```\ncd data\npython cars196_downloader.py\npython cars196_converter.py\n```\n\n## Train CARS196 dataset\nExecute a training script. \nWhen executed, the tensorboard log is saved.\n\n```\npipenv shell\npython train_triplet.py\n```\n\n## Result triplet HDML\n\n### CARS196 result on training(99 classes, 30000 iterations)\n\n#### Loss\n![loss](assets/triplet_loss.png)\n\n#### t-SNE\n![tsne](assets/triplet_train_tsne.gif)\n\n### CARS196 result on testing(97 classes)\n\n#### t-SNE\n![tsne](assets/triplet_test_tsne.gif)\n\n\n## Todo\n\n- [ ] Implementation of Npair loss HDML\n\n## Reference\n\nOfficial tensorflow implementation https://github.com/wzzheng/HDML","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneka-nat%2Fpytorch-hdml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneka-nat%2Fpytorch-hdml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneka-nat%2Fpytorch-hdml/lists"}