{"id":13737983,"url":"https://github.com/clovaai/symmetrical-synthesis","last_synced_at":"2025-10-06T16:30:54.405Z","repository":{"id":50756727,"uuid":"238364437","full_name":"clovaai/symmetrical-synthesis","owner":"clovaai","description":"Official Tensorflow implementation of \"Symmetrical Synthesis for Deep Metric Learning\" (AAAI 2020)","archived":false,"fork":false,"pushed_at":"2021-10-08T09:31:18.000Z","size":10676,"stargazers_count":71,"open_issues_count":0,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-07T10:47:58.807Z","etag":null,"topics":["aaai2020","cars196","cub200-2011","deep-learning","image-clustering","image-retrieval","metric-learning","stanford-online-products","synthesis","tensorflow"],"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/clovaai.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}},"created_at":"2020-02-05T04:03:08.000Z","updated_at":"2024-06-19T17:48:35.000Z","dependencies_parsed_at":"2022-09-03T04:50:23.574Z","dependency_job_id":null,"html_url":"https://github.com/clovaai/symmetrical-synthesis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clovaai/symmetrical-synthesis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Fsymmetrical-synthesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Fsymmetrical-synthesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Fsymmetrical-synthesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Fsymmetrical-synthesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clovaai","download_url":"https://codeload.github.com/clovaai/symmetrical-synthesis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Fsymmetrical-synthesis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278643347,"owners_count":26021088,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aaai2020","cars196","cub200-2011","deep-learning","image-clustering","image-retrieval","metric-learning","stanford-online-products","synthesis","tensorflow"],"created_at":"2024-08-03T03:02:08.096Z","updated_at":"2025-10-06T16:30:49.394Z","avatar_url":"https://github.com/clovaai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Symmetrical Synthesis for Deep Metric Learning\n\nOfficial Tensorflow implementation of Symmetrical Synthesis for Deep Metric Learning (AAAI 2020)\n\n**Geonmo Gu\\*, Byungsoo Ko\\*** (* Authors contributed equally.)\n\n@NAVER/LINE Vision\n\n- [Paper](https://arxiv.org/abs/2001.11658) | [Supplementary Video](https://www.youtube.com/watch?v=X9mJJKDokEU\u0026feature=youtu.be) | [Poster](https://www.slideshare.net/ByungSooKo1/poster-symmetrical-synthesis-for-deep-metric-learning-aaai2020) | [Spotlight PPT](https://www.slideshare.net/ByungSooKo1/spotlight-ppt-symmetrical-synthesis-for-deep-metric-learning-aaai2020)\n\n## Overview\n### Symmetrical Synthesis\nSymmetrical Synthesis (Symm) is a novel method of synthetic hard sample generation for deep metric learning.\n\n\u003cimg src=\"figures/teaser.png\"\u003e\n\n### How it Works\nAfter some iterations, symmetrical synthesis generates synthetic points around the class clusters, which are used as hard samples to push the other class with stronger power.\n\n\u003cimg src=\"figures/Supplementary_video.gif\"\u003e\n\n### Experimental Results\n\n\u003cimg src=\"figures/results.png\"\u003e\n\n## Getting Started\n\n### Requirements\n\n```\n$ pip3 install -r requirements.txt\n```\n\n### Prepare Data\n\n1. Download pretrained GoogleNet model. [ref](https://github.com/Wei2624/Feature_Embed_GoogLeNet)\n```\n$ wget https://github.com/Wei2624/Feature_Embed_GoogLeNet/raw/master/tf_ckpt_from_caffe.mat\n```\n2. Download CAR DB and cook.\n\n```\n$ wget http://ai.stanford.edu/~jkrause/car196/car_ims.tgz\n$ tar -xzf car_ims.tgz\n$ mv car_ims\n$ wget http://ai.stanford.edu/~jkrause/car196/cars_annos.mat\n\n# on ../symm_public folder\n$ cd dataset\n$ python3 cooking_CARS.py --car_folder=/your/car_ims/folder \\\n--save_path=/your/converted/carDB/will/be/saved/here\n```\n\n### Train a Model\n\n- **Available losses**: N-pair, Symm + N-pair, Angular, Symm + Angular\n\n#### Symm + N-pair\n```\n$ python3 train.py --backbone=googlenet \\\n--pretrained_model_path=/your/folder/tf_ckpt_from_caffe.mat \\\n--image_path=/your/converted/carDB/will/be/saved/here \\\n--run_gpu=0 \\\n--save_path=/your/trained/model/will/be/saved/here \\\n--losses=symm_npair --dim_features=512 \\\n--input_size=227 --learning_rate=0.0001 \\\n--decay_steps=5000 --decay_stop_steps=15000 \\\n--decay_stop_value=0.00001 --decay_ratio=0.5 \\\n--save_model_steps=100\n```\n\n### Test a Model\n```\n$ python3 test.py --run_gpu=1 --model_path=/your/trained/model/will/be/saved/here \\\n--image_path=/your/converted/carDB/will/be/saved/here \\\n--batch_size=512 --backbone=googlenet \\\n--pretrained_model_path=/your/folder/tf_ckpt_from_caffe.mat \\\n--log_path=eval_log_car \\\n--input_size=227 --start_idx=0 --dim_features=512\n```\n+ Best recall@1: 0.77 (0.765 in paper)\n\n### Check Test Results\n```\n$ tensorboard --logdir=eval_log_car --port=10000\n```\n\n## Acknowledgements\n\n+ **Googlenet backbone**\n  + https://github.com/wzzheng/HDML/blob/master/lib/GoogleNet_Model.py\n  + https://github.com/Wei2624/Feature_Embed_GoogLeNet\n  \n## Citation\nIf you find *Symmetrical Synthesis* useful in your research, please consider to cite the following paper.\n\n```\n@inproceedings{gu2020symmetrical,\n    title={Symmetrical Synthesis for Deep Metric Learning},\n    author={Geonmo Gu and Byungsoo Ko},\n    booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},\n    year={2020}\n}\n```\n\n## License\n\n```\nCopyright (c) 2020-present NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovaai%2Fsymmetrical-synthesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclovaai%2Fsymmetrical-synthesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovaai%2Fsymmetrical-synthesis/lists"}