{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/making-classification-competitive-for-deep","title":"Classification is a Strong Baseline for Deep Metric Learning","arxiv_id":"1811.12649","date":"2018-11-30","proceeding":null,"authors":["Andrew Zhai","Hao-Yu Wu"],"abstract":"Deep metric learning aims to learn a function mapping image pixels to embedding feature vectors that model the similarity between images. Two major applications of metric learning are content-based image retrieval and face verification. For the retrieval tasks, the majority of current state-of-the-art (SOTA) approaches are triplet-based non-parametric training. For the face verification tasks, however, recent SOTA approaches have adopted classification-based parametric training. In this paper, we look into the effectiveness of classification based approaches on image retrieval datasets. We evaluate on several standard retrieval datasets such as CAR-196, CUB-200-2011, Stanford Online Product, and In-Shop datasets for image retrieval and clustering, and establish that our classification-based approach is competitive across different feature dimensions and base feature networks. We further provide insights into the performance effects of subsampling classes for scalable classification-based training, and the effects of binarization, enabling efficient storage and computation for practical applications.","url_abs":"https://arxiv.org/abs/1811.12649v2","url_pdf":"https://arxiv.org/pdf/1811.12649v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"making-classification-competitive-for-deep","repo_url":"https://github.com/azgo14/classification_metric_learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"making-classification-competitive-for-deep","repo_url":"https://github.com/microsoft/computervision-recipes/blob/master/scenarios/similarity/02_state_of_the_art.ipynb","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"binarization","task_name":"Binarization"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"content-based-image-retrieval","task_name":"Content-Based Image Retrieval"},{"task_slug":"face-verification","task_name":"Face Verification"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":null,"task_name":"Triplet"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-retrieval-on-cars196","task":"Image Retrieval","dataset":"CARS196","model":"NormSoftmax2048 (ResNet-50)","rank_in_archive_order":3,"of":8,"metrics":{"R@1":"89.3"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-cub-200-2011","task":"Image Retrieval","dataset":"CUB-200-2011","model":"NormSoftmax2048 (ResNet-50)","rank_in_archive_order":7,"of":8,"metrics":{"R@1":"65.3"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-in-shop","task":"Image Retrieval","dataset":"In-Shop","model":"NormSoftmax2048 (ResNet-50)","rank_in_archive_order":5,"of":7,"metrics":{"R@1":"89.4"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-sop","task":"Image Retrieval","dataset":"SOP","model":"NormSoftmax2048 (ResNet-50)","rank_in_archive_order":9,"of":14,"metrics":{"R@1":"79.5"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1811.12649","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1811.12649"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/computervision-recipes/blob/master/scenarios/similarity/02_state_of_the_art.ipynb","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/azgo14/classification_metric_learning","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9946c564d23d70ad","entry":"evaluate_float_binary_embedding_faiss","repo":"azgo14/classification_metric_learning","repo_kind":"official","path":"evaluation/retrieval.py","file_url":"https://github.com/azgo14/classification_metric_learning/blob/HEAD/evaluation/retrieval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9946c564d23d70ad"}},{"code_sha256_prefix":"ae95303ae4e8d0ff","entry":"evaluate_recall_at_k","repo":"azgo14/classification_metric_learning","repo_kind":"official","path":"evaluation/retrieval.py","file_url":"https://github.com/azgo14/classification_metric_learning/blob/HEAD/evaluation/retrieval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae95303ae4e8d0ff"}},{"code_sha256_prefix":"a5d16b074b789eb9","entry":"extract_feature","repo":"azgo14/classification_metric_learning","repo_kind":"official","path":"metric_learning/extract_features.py","file_url":"https://github.com/azgo14/classification_metric_learning/blob/HEAD/metric_learning/extract_features.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a5d16b074b789eb9"}},{"code_sha256_prefix":"78d69a1bfc666621","entry":"test_nmi","repo":"azgo14/classification_metric_learning","repo_kind":"official","path":"evaluation/nmi.py","file_url":"https://github.com/azgo14/classification_metric_learning/blob/HEAD/evaluation/nmi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"78d69a1bfc666621"}},{"code_sha256_prefix":"ea2bfa65e1089264","entry":"test_nmi_faiss","repo":"azgo14/classification_metric_learning","repo_kind":"official","path":"evaluation/nmi.py","file_url":"https://github.com/azgo14/classification_metric_learning/blob/HEAD/evaluation/nmi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea2bfa65e1089264"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}