{"id":13422197,"url":"https://github.com/dragen1860/LearningToCompare-Pytorch","last_synced_at":"2025-03-15T11:31:17.685Z","repository":{"id":95699519,"uuid":"118453015","full_name":"dragen1860/LearningToCompare-Pytorch","owner":"dragen1860","description":"Pytorch Implementation for CVPR2018 Paper: Learning to Compare: Relation Network for Few-Shot Learning","archived":false,"fork":false,"pushed_at":"2018-02-15T06:50:45.000Z","size":31,"stargazers_count":250,"open_issues_count":2,"forks_count":48,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-22T23:30:41.732Z","etag":null,"topics":[],"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/dragen1860.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}},"created_at":"2018-01-22T12:16:26.000Z","updated_at":"2024-06-30T08:58:35.000Z","dependencies_parsed_at":"2023-05-21T15:31:14.611Z","dependency_job_id":null,"html_url":"https://github.com/dragen1860/LearningToCompare-Pytorch","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/dragen1860%2FLearningToCompare-Pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragen1860%2FLearningToCompare-Pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragen1860%2FLearningToCompare-Pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragen1860%2FLearningToCompare-Pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragen1860","download_url":"https://codeload.github.com/dragen1860/LearningToCompare-Pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221572050,"owners_count":16845568,"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":[],"created_at":"2024-07-30T23:00:38.970Z","updated_at":"2024-10-26T19:32:29.346Z","avatar_url":"https://github.com/dragen1860.png","language":"Python","funding_links":[],"categories":["Learning to Compare: Relation Network for Few-Shot Learning. CVPR 2018","Paper implementations｜论文实现","Paper implementations"],"sub_categories":["Other libraries｜其他库:","Other libraries:"],"readme":"# LearningToCompare\nPytorch Implementation for Paper: Learning to Compare: Relation Network for Few-Shot Learning\n\n# Howto\ndownload mini-imagenet and make it looks like:\n```shell\nmini-imagenet/\n├── images\n\t├── n0210891500001298.jpg  \n\t├── n0287152500001298.jpg \n\t...\n├── test.csv\n├── val.csv\n└── train.csv\n\nLearningToCompare-Pytorch/\n├── compare.py\n├── MiniImagenet.py\n├── Readme.md\n├── repnet.py\n├── train.py\n└── utils.py\n```\n\n\n```python\npython train.py\n```\n\n# NOTICE\ncurrent code support multi-gpus on single machine training, to disable it and train on single machine, \njust set device_ids=[0] and downsize batch size according to your gpu memory capacity.\nmake sure `ckpt` directory exists, otherwise `mkdir ckpt`.\n\n\n# mini-Imagenet\n\n| Model                               | Fine Tune | 5-way Acc. |        | 20-way Acc |        |\n|-------------------------------------|-----------|------------|--------|------------|--------|\n|                                     |           | 1-shot     | 5-shot | 1-shot     | 5-shot |\n| Matching Nets                       | N         | 43.56%     | 55.31% | 17.31%     | 22.69% |\n| Meta-LSTM                           |           | 43.44%     | 60.60% | 16.70%     | 26.06% |\n| MAML                                | Y         | 48.7%      | 63.11% | 16.49%     | 19.29% |\n| Meta-SGD                            |           | 50.49%     | 64.03% | 17.56%     | 28.92% |\n| TCML                                |           | 55.71%     | 68.88% | -          | -      |\n| Learning to Compare            | N         | 57.02%     | 71.07% | -          | -      |\n| **Ours, similarity ensemble**\t\t\t\t      | N         |  55.2%     |    68.8%      |          |        | \n| **Ours, feature ensemble**\t\t\t\t      | N         |  55.2%     |    70.1%      |          |        | \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragen1860%2FLearningToCompare-Pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragen1860%2FLearningToCompare-Pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragen1860%2FLearningToCompare-Pytorch/lists"}