Papers › Coarse-to-Fine: Learning Compact Discriminative Representation for Single-Stage Image Retrieval

Coarse-to-Fine: Learning Compact Discriminative Representation for Single-Stage Image Retrieval

8 Aug 2023ICCV 2023 1arXiv:2308.04008archive 2025-07-28

Yunquan Zhu, Xinkai Gao, Bo Ke, Ruizhi Qiao, Xing Sun

Image retrieval targets to find images from a database that are visually similar to the query image. Two-stage methods following retrieve-and-rerank paradigm have achieved excellent performance, but their separate local and global modules are inefficient to real-world applications. To better trade-off retrieval efficiency and accuracy, some approaches fuse global and local feature into a joint representation to perform single-stage image retrieval. However, they are still challenging due to various situations to tackle, e.g., background, occlusion and viewpoint. In this work, we design a Coarse-to-Fine framework to learn Compact Discriminative representation (CFCD) for end-to-end single-stage image retrieval-requiring only image-level labels. Specifically, we first design a novel adaptive softmax-based loss which dynamically tunes its scale and margin within each mini-batch and increases them progressively to strengthen supervision during training and intra-class compactness. Furthermore, we propose a mechanism which attentively selects prominent local descriptors and infuse fine-grained semantic relations into the global representation by a hard negative sampling strategy to optimize inter-class distinctiveness at a global scale. Extensive experimental results have demonstrated the effectiveness of our method, which achieves state-of-the-art single-stage image retrieval performance on benchmarks such as Revisited Oxford and Revisited Paris. Code is available at https://github.com/bassyess/CFCD.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 21 code samples harvested from 2 repositories linked to this paper: 18 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 0 honoured, 0 violated, 17 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 10 samples from 1 repository, 9 ran (9 with no instrument failure; 0 where Syntology's instrument failed); found in paper text by Syntology: 11 samples from 1 repository, 9 ran (8 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

bassyess/cfcd officialmentioned in paperpytorchMITSyntology: 10 samples, 9 ran (0 instrument-failed) · 1 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested: 18 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 0 honoured, 0 violated, 17 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran; the contract check could not run
17ran
3unverified

Licence: 11 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

bassyess/cfcd official repository 10 samples, 9 ran (0 instrument-failed) · 1 unverified
cache_url core/io.py ran fingerprinted MIT (permissive) · f623b3e3625d4e42 · report fixture: signature url_or_file:str/0/str, cache_dir:str/0/str · returned str · level recorded 2026-09-24
complexity_batchnorm2d core/net.py ran MIT (permissive) · 4136b6e9df422178 · report fixture: signature cx:dict/0/?, w_in:int/0/int · returned dict · level recorded 2026-09-24
complexity_conv2d core/net.py ran MIT (permissive) · b299737079f619a1 · report fixture: signature cx:dict/0/?, w_in:int/0/int, w_out:int/0/int, k:int/0/int, stride:int/0/int, padding:int/0/int, groups:int/0/int, bias:bool/0/bool · returned dict · level recorded 2026-09-24
complexity_maxpool2d core/net.py ran MIT (permissive) · ee4b7c6aef3ebb1f · report fixture: signature cx:dict/0/?, k:int/0/int, stride:int/0/int, padding:int/0/int · returned dict · level recorded 2026-09-24
dump_log_data core/logging.py ran MIT (permissive) · 24756d5881b92c4f · report fixture: signature data:dict/0/?, data_type:str/0/str, prec:int/0/int · returned str · level recorded 2026-09-24
float_to_decimal core/logging.py ran MIT (permissive) · d163ebb8549c1402 · report fixture: signature data:dict/0/?, prec:int/0/int · returned dict · level recorded 2026-09-24
get_logger in 383 papers core/logging.py ran MIT (permissive) · 8e4e129cb77e7f8b · report fixture: signature name:str/0/str · returned Logger · level recorded 2026-09-24
time_string core/meters.py ran fingerprinted MIT (permissive) · 803bcd86e3301891 · report fixture: signature seconds:float/0/float · returned str · level recorded 2026-09-24
topk_errors core/meters.py ran MIT (permissive) · b997b70e1ac2c2f1 · report fixture: signature preds:Tensor/2/float, labels:Tensor/1/int, ks:list/1/int · returned list · level recorded 2026-09-24
download_url in 32 papers core/io.py unverified MIT (permissive) · e10bd0e3f25f2b57 · report
feymanpriv/DOLG-paddle found in paper text by Syntology 11 samples, 9 ran (1 instrument-failed) · 2 unverified
compute_ap in 13 papers revisitop/compute.py ran no licence file found · pointer only · a07ad22c46aa3105 · report fixture: signature ranks:ndarray/1/int, nres:int/0/int · returned float64 · level recorded 2026-09-24
config_imname in 5 papers revisitop/dataset.py ran no licence file found · pointer only · 49cf1f4ce52e9613 · report fixture: signature cfg:dict/0/?, i:int/0/int · returned str · level recorded 2026-09-26
config_qimname in 5 papers revisitop/dataset.py ran no licence file found · pointer only · 91c5ae2396603107 · report fixture: signature cfg:dict/0/?, i:int/0/int · returned str · level recorded 2026-09-26
configdataset revisitop/dataset.py ran no licence file found · pointer only · ba576e373d900666 · report fixture: signature dataset:str/0/str, dir_main:str/0/str · returned dict · level recorded 2026-09-24
global_search revisitop/example_evaluate.py ran no licence file found · pointer only · cac699a42dd367b4 · report fixture: signature features:dict/0/? · returned ndarray · level recorded 2026-09-24
normalize in 638 papers
census: 70 implementations from 82 papers, 51 distinct outputs across 11 buckets, one shared input per bucket
infer.py ran no licence file found · pointer only · ebcc600b4c421051 · report fixture: signature im:Tensor/3/float, mean:Tensor/1/float, std:Tensor/1/float · returned Tensor · level recorded 2026-09-24
process in 60 papers revisitop/example_evaluate.py ran no licence file found · pointer only · 959d3177b743555a · report fixture: signature fea_pickle_path:str/0/str, cfg:dict/0/? · returned dict · level recorded 2026-09-24
resize in 108 papers
census: 10 implementations from 14 papers, 5 distinct outputs across 2 buckets, one shared input per bucket
infer.py ran no licence file found · pointer only · 192cb22df1633f0e · report fixture: signature im:ndarray/3/int, size:int/0/int · returned ndarray · level recorded 2026-09-24
zero_pad in 9 papers infer.py ran; the contract check could not run (RAISES) fingerprinted no licence file found · pointer only · 8e712c383c677282 · report fixture: signature im:ndarray/3/float, pad_size:int/0/int · returned ndarray · level recorded 2026-09-22
compute_map revisitop/compute.py unverified no licence file found · pointer only · 5ff2df48c3c7db02 · report
load_checkpoint in 277 papers convertor/convert.py unverified no licence file found · pointer only · 72a59e3adb80fc0b · report

Tasks

Image RetrievalRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections