{"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/smooth-ap-smoothing-the-path-towards-large","title":"Smooth-AP: Smoothing the Path Towards Large-Scale Image Retrieval","arxiv_id":"2007.12163","date":"2020-07-23","proceeding":"ECCV 2020 8","authors":["Andrew Brown","Weidi Xie","Vicky Kalogeiton","Andrew Zisserman"],"abstract":"Optimising a ranking-based metric, such as Average Precision (AP), is notoriously challenging due to the fact that it is non-differentiable, and hence cannot be optimised directly using gradient-descent methods. To this end, we introduce an objective that optimises instead a smoothed approximation of AP, coined Smooth-AP. Smooth-AP is a plug-and-play objective function that allows for end-to-end training of deep networks with a simple and elegant implementation. We also present an analysis for why directly optimising the ranking based metric of AP offers benefits over other deep metric learning losses. We apply Smooth-AP to standard retrieval benchmarks: Stanford Online products and VehicleID, and also evaluate on larger-scale datasets: INaturalist for fine-grained category retrieval, and VGGFace2 and IJB-C for face retrieval. In all cases, we improve the performance over the state-of-the-art, especially for larger-scale datasets, thus demonstrating the effectiveness and scalability of Smooth-AP to real-world scenarios.","url_abs":"https://arxiv.org/abs/2007.12163v2","url_pdf":"https://arxiv.org/pdf/2007.12163v2.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":"smooth-ap-smoothing-the-path-towards-large","repo_url":"https://github.com/interestingzhuo/foodretreival","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"smooth-ap-smoothing-the-path-towards-large","repo_url":"https://github.com/Andrew-Brown1/Smooth_AP","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-instance-retrieval","task_name":"Image Instance Retrieval"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"vehicle-re-identification","task_name":"Vehicle Re-Identification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-retrieval-on-sop","task":"Image Retrieval","dataset":"SOP","model":"Smooth-AP","rank_in_archive_order":8,"of":14,"metrics":{"R@1":"80.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-inaturalist","task":"Image Retrieval","dataset":"iNaturalist","model":"Smooth-AP","rank_in_archive_order":9,"of":10,"metrics":{"R@1":"67.2","R@16":"90.3","R@32":"93.1","R@5":"81.8"},"uses_additional_data":false},{"leaderboard":"/sota/vehicle-re-identification-on-vehicleid-large","task":"Vehicle Re-Identification","dataset":"VehicleID Large","model":"Smooth-AP","rank_in_archive_order":5,"of":10,"metrics":{"Rank-1":"91.9","Rank-5":"96.2"},"uses_additional_data":false},{"leaderboard":"/sota/vehicle-re-identification-on-vehicleid-medium","task":"Vehicle Re-Identification","dataset":"VehicleID Medium","model":"Smooth-AP","rank_in_archive_order":5,"of":9,"metrics":{"Rank-1":"93.3","Rank-5":"96.4"},"uses_additional_data":false},{"leaderboard":"/sota/vehicle-re-identification-on-vehicleid-small","task":"Vehicle Re-Identification","dataset":"VehicleID Small","model":"Smooth-AP","rank_in_archive_order":5,"of":13,"metrics":{"Rank-1":"94.9","Rank-5":"97.6"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2007.12163","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2007.12163"}},"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/Andrew-Brown1/Smooth_AP","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/interestingzhuo/foodretreival","reach":null}],"summary":{"ran_honours":2},"by_repo_kind":{"listed":{"samples":2,"ran":2,"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":"b7c1e0e2088a865e","entry":"compute_aff","repo":"Andrew-Brown1/Smooth_AP","repo_kind":"listed","path":"src/Smooth_AP_loss.py","file_url":"https://github.com/Andrew-Brown1/Smooth_AP/blob/HEAD/src/Smooth_AP_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b7c1e0e2088a865e"}},{"code_sha256_prefix":"4b3a13b8aba7b6dc","entry":"sigmoid","repo":"Andrew-Brown1/Smooth_AP","repo_kind":"listed","path":"src/Smooth_AP_loss.py","file_url":"https://github.com/Andrew-Brown1/Smooth_AP/blob/HEAD/src/Smooth_AP_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4b3a13b8aba7b6dc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}