{"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/cdm-a-reliable-metric-for-fair-and-accurate","title":"Image Over Text: Transforming Formula Recognition Evaluation with Character Detection Matching","arxiv_id":"2409.03643","date":"2024-09-05","proceeding":"CVPR 2025 1","authors":["Bin Wang","Fan Wu","Linke Ouyang","Zhuangcheng Gu","Rui Zhang","Renqiu Xia","Bo Zhang","Conghui He"],"abstract":"Formula recognition presents significant challenges due to the complicated structure and varied notation of mathematical expressions. Despite continuous advancements in formula recognition models, the evaluation metrics employed by these models, such as BLEU and Edit Distance, still exhibit notable limitations. They overlook the fact that the same formula has diverse representations and is highly sensitive to the distribution of training data, thereby causing unfairness in formula recognition evaluation. To this end, we propose a Character Detection Matching (CDM) metric, ensuring the evaluation objectivity by designing an image-level rather than a LaTeX-level metric score. Specifically, CDM renders both the model-predicted LaTeX and the ground-truth LaTeX formulas into image-formatted formulas, then employs visual feature extraction and localization techniques for precise character-level matching, incorporating spatial position information. Such a spatially-aware and character-matching method offers a more accurate and equitable evaluation compared with previous BLEU and Edit Distance metrics that rely solely on text-based character matching. Experimentally, we evaluated various formula recognition models using CDM, BLEU, and ExpRate metrics. Their results demonstrate that the CDM aligns more closely with human evaluation standards and provides a fairer comparison across different models by eliminating discrepancies caused by diverse formula representations. Code is available at https://github.com/opendatalab/UniMERNet/tree/main/cdm.","url_abs":"https://arxiv.org/abs/2409.03643v2","url_pdf":"https://arxiv.org/pdf/2409.03643v2.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":"cdm-a-reliable-metric-for-fair-and-accurate","repo_url":"https://github.com/opendatalab/unimernet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.03643","atlas_url":"https://app.syntology.ai/?focus=2409.03643","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.03643"}},"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/opendatalab/unimernet","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":4,"ran_fixture":1,"ran_violates":1,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"official":{"samples":10,"ran":8,"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":"992489a59b9e08d0","entry":"apply_to_sample","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/datasets/data_utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/datasets/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"992489a59b9e08d0"}},{"code_sha256_prefix":"7d214655954e2bc6","entry":"getAttMap","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/common/gradcam.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/common/gradcam.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d214655954e2bc6"}},{"code_sha256_prefix":"4d1d9c47619920ba","entry":"is_url","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/common/utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/common/utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4d1d9c47619920ba"}},{"code_sha256_prefix":"98589643273920ba","entry":"main_process","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/common/dist_utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/common/dist_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"98589643273920ba"}},{"code_sha256_prefix":"f0d0d2447408bb09","entry":"move_to_cuda","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/datasets/data_utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/datasets/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f0d0d2447408bb09"}},{"code_sha256_prefix":"791c72070c0b1cfb","entry":"node_to_dict","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/common/config.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/common/config.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"791c72070c0b1cfb"}},{"code_sha256_prefix":"9d94c9c2524f4a1b","entry":"prepare_sample","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/datasets/data_utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/datasets/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9d94c9c2524f4a1b"}},{"code_sha256_prefix":"cb33571427334815","entry":"tile","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/models/base_model.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/models/base_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cb33571427334815"}},{"code_sha256_prefix":"0ec9fc2025c16f65","entry":"all_gather_with_grad","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/models/base_model.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/models/base_model.py","link_basis":"harvester_set","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":"0ec9fc2025c16f65"}},{"code_sha256_prefix":"643539116e049080","entry":"download_cached_file","repo":"opendatalab/unimernet","repo_kind":"official","path":"unimernet/common/dist_utils.py","file_url":"https://github.com/opendatalab/unimernet/blob/HEAD/unimernet/common/dist_utils.py","link_basis":"harvester_set","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":"643539116e049080"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}