{"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/the-magnitude-vector-of-images-1","title":"The magnitude vector of images","arxiv_id":"2110.15188","date":"2021-10-28","proceeding":null,"authors":["Michael F. Adamer","Edward De Brouwer","Leslie O'Bray","Bastian Rieck"],"abstract":"The magnitude of a finite metric space has recently emerged as a novel invariant quantity, allowing to measure the effective size of a metric space. Despite encouraging first results demonstrating the descriptive abilities of the magnitude, such as being able to detect the boundary of a metric space, the potential use cases of magnitude remain under-explored. In this work, we investigate the properties of the magnitude on images, an important data modality in many machine learning applications. By endowing each individual images with its own metric space, we are able to define the concept of magnitude on images and analyse the individual contribution of each pixel with the magnitude vector. In particular, we theoretically show that the previously known properties of boundary detection translate to edge detection abilities in images. Furthermore, we demonstrate practical use cases of magnitude for machine learning applications and propose a novel magnitude model that consists of a computationally efficient magnitude computation and a learnable metric. By doing so, we address the computational hurdle that used to make magnitude impractical for many applications and open the way for the adoption of magnitude in machine learning research.","url_abs":"https://arxiv.org/abs/2110.15188v2","url_pdf":"https://arxiv.org/pdf/2110.15188v2.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":"the-magnitude-vector-of-images-1","repo_url":"https://github.com/mikeadamer/mag-metric","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"boundary-detection","task_name":"Boundary Detection"},{"task_slug":"descriptive","task_name":"Descriptive"},{"task_slug":"edge-detection","task_name":"Edge Detection"},{"task_slug":"outlier-detection","task_name":"Outlier Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.15188","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.15188"}},"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/mikeadamer/mag-metric","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"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":"140c20940b2ecc01","entry":"experiment","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"baselines/parameter_search.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/baselines/parameter_search.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"140c20940b2ecc01"}},{"code_sha256_prefix":"ba1a676807f4461e","entry":"get_training_image","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"magnitude_model/train_model_single_shot.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/magnitude_model/train_model_single_shot.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ba1a676807f4461e"}},{"code_sha256_prefix":"20f8f7ceb7f3ccf7","entry":"local_approx","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"theoretical/approx_benchmark.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/theoretical/approx_benchmark.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"20f8f7ceb7f3ccf7"}},{"code_sha256_prefix":"92c2a969a1a9a9df","entry":"magnitude_theoretical","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"theoretical/one_d_images.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/theoretical/one_d_images.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"92c2a969a1a9a9df"}},{"code_sha256_prefix":"8654a7f8b2a94e22","entry":"magnitude_theoretical_1d","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"theoretical/approx_benchmark.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/theoretical/approx_benchmark.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"8654a7f8b2a94e22"}},{"code_sha256_prefix":"e7ea72a8f4f51195","entry":"rank_1_approx","repo":"mikeadamer/mag-metric","repo_kind":"official","path":"theoretical/approx_benchmark.py","file_url":"https://github.com/mikeadamer/mag-metric/blob/HEAD/theoretical/approx_benchmark.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e7ea72a8f4f51195"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}