{"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/ca-jaccard-camera-aware-jaccard-distance-for","title":"CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification","arxiv_id":"2311.10605","date":"2023-11-17","proceeding":"CVPR 2024 1","authors":["Yiyu Chen","Zheyi Fan","Zhaoru Chen","Yixuan Zhu"],"abstract":"Person re-identification (re-ID) is a challenging task that aims to learn discriminative features for person retrieval. In person re-ID, Jaccard distance is a widely used distance metric, especially in re-ranking and clustering scenarios. However, we discover that camera variation has a significant negative impact on the reliability of Jaccard distance. In particular, Jaccard distance calculates the distance based on the overlap of relevant neighbors. Due to camera variation, intra-camera samples dominate the relevant neighbors, which reduces the reliability of the neighbors by introducing intra-camera negative samples and excluding inter-camera positive samples. To overcome this problem, we propose a novel camera-aware Jaccard (CA-Jaccard) distance that leverages camera information to enhance the reliability of Jaccard distance. Specifically, we design camera-aware k-reciprocal nearest neighbors (CKRNNs) to find k-reciprocal nearest neighbors on the intra-camera and inter-camera ranking lists, which improves the reliability of relevant neighbors and guarantees the contribution of inter-camera samples in the overlap. Moreover, we propose a camera-aware local query expansion (CLQE) to mine reliable samples in relevant neighbors by exploiting camera variation as a strong constraint and assign these samples higher weights in overlap, further improving the reliability. Our CA-Jaccard distance is simple yet effective and can serve as a general distance metric for person re-ID methods with high reliability and low computational cost. Extensive experiments demonstrate the effectiveness of our method.","url_abs":"https://arxiv.org/abs/2311.10605v2","url_pdf":"https://arxiv.org/pdf/2311.10605v2.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":"ca-jaccard-camera-aware-jaccard-distance-for","repo_url":"https://github.com/chen960/ca-jaccard","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"person-re-identification","task_name":"Person Re-Identification"},{"task_slug":"person-retrieval","task_name":"Person Retrieval"},{"task_slug":"re-ranking","task_name":"Re-Ranking"},{"task_slug":"unsupervised-person-re-identification","task_name":"Unsupervised Person Re-Identification"},{"task_slug":"unsupervised-vehicle-re-identification","task_name":"Unsupervised Vehicle Re-Identification"},{"task_slug":"vehicle-re-identification","task_name":"Vehicle Re-Identification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/person-re-identification-on-msmt17","task":"Person Re-Identification","dataset":"MSMT17","model":"CA-Jaccard","rank_in_archive_order":11,"of":43,"metrics":{"Rank-1":"86.2","Rank-5":"90.5","mAP":"74.1"},"uses_additional_data":false},{"leaderboard":"/sota/person-re-identification-on-market-1501","task":"Person Re-Identification","dataset":"Market-1501","model":"CA-Jaccard","rank_in_archive_order":19,"of":135,"metrics":{"Rank-1":"96.2","Rank-5":"98.1","mAP":"94.5"},"uses_additional_data":true},{"leaderboard":"/sota/unsupervised-person-re-identification-on-12","task":"Unsupervised Person Re-Identification","dataset":"MSMT17","model":"CA-Jaccard","rank_in_archive_order":5,"of":12,"metrics":{"Rank-1":"75.1","Rank-10":"87.3","Rank-5":"84.3","mAP":"44.3"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-person-re-identification-on-4","task":"Unsupervised Person Re-Identification","dataset":"Market-1501","model":"CA-Jaccard","rank_in_archive_order":7,"of":23,"metrics":{"MAP":"86.1","Rank-1":"94.4","Rank-10":"98.7","Rank-5":"97.9"},"uses_additional_data":false},{"leaderboard":"/sota/vehicle-re-identification-on-veri-776","task":"Vehicle Re-Identification","dataset":"VeRi-776","model":"CA-Jaccard","rank_in_archive_order":10,"of":17,"metrics":{"Rank-1":"97.6","Rank-5":"98.3","mAP":"81.4"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.10605","atlas_url":"https://app.syntology.ai/?focus=2311.10605","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.10605"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/chen960/ca-jaccard","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":"10ba7332fd4a54eb","entry":"cm","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/cm.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/cm.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10ba7332fd4a54eb"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/resnet_ibn_a.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/resnet_ibn_a.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"7e822f939fbe184f","entry":"process_dir","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/datasets/dukemtmcreid.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/datasets/dukemtmcreid.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e822f939fbe184f"}},{"code_sha256_prefix":"c7f5d45660e6ec13","entry":"resnet101_ibn_a","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/resnet_ibn_a.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/resnet_ibn_a.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7f5d45660e6ec13"}},{"code_sha256_prefix":"93cbdbc352d644d9","entry":"resnet50_ibn_a","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/resnet_ibn_a.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/resnet_ibn_a.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93cbdbc352d644d9"}},{"code_sha256_prefix":"5c5d2f6f3c01ba6c","entry":"build_pooling_layer","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/pooling.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/pooling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c5d2f6f3c01ba6c"}},{"code_sha256_prefix":"fbb5efeed7ebfd09","entry":"extract_cnn_feature","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/evaluators.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/evaluators.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fbb5efeed7ebfd09"}},{"code_sha256_prefix":"962810c012a60817","entry":"extract_features","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/evaluators.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/evaluators.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"962810c012a60817"}},{"code_sha256_prefix":"4560dc753fea5981","entry":"label_generator_kmeans","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/models/kmeans.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/models/kmeans.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4560dc753fea5981"}},{"code_sha256_prefix":"b6d5887f94b1db25","entry":"pairwise_distance","repo":"chen960/ca-jaccard","repo_kind":"official","path":"caj/evaluators.py","file_url":"https://github.com/chen960/ca-jaccard/blob/HEAD/caj/evaluators.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6d5887f94b1db25"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}