{"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/few-shot-font-generation-via-transferring","title":"Few shot font generation via transferring similarity guided global style and quantization local style","arxiv_id":"2309.00827","date":"2023-09-02","proceeding":"ICCV 2023 1","authors":["Wei Pan","Anna Zhu","Xinyu Zhou","Brian Kenji Iwana","Shilin Li"],"abstract":"Automatic few-shot font generation (AFFG), aiming at generating new fonts with only a few glyph references, reduces the labor cost of manually designing fonts. However, the traditional AFFG paradigm of style-content disentanglement cannot capture the diverse local details of different fonts. So, many component-based approaches are proposed to tackle this problem. The issue with component-based approaches is that they usually require special pre-defined glyph components, e.g., strokes and radicals, which is infeasible for AFFG of different languages. In this paper, we present a novel font generation approach by aggregating styles from character similarity-guided global features and stylized component-level representations. We calculate the similarity scores of the target character and the referenced samples by measuring the distance along the corresponding channels from the content features, and assigning them as the weights for aggregating the global style features. To better capture the local styles, a cross-attention-based style transfer module is adopted to transfer the styles of reference glyphs to the components, where the components are self-learned discrete latent codes through vector quantization without manual definition. With these designs, our AFFG method could obtain a complete set of component-level style representations, and also control the global glyph characteristics. The experimental results reflect the effectiveness and generalization of the proposed method on different linguistic scripts, and also show its superiority when compared with other state-of-the-art methods. The source code can be found at https://github.com/awei669/VQ-Font.","url_abs":"https://arxiv.org/abs/2309.00827v2","url_pdf":"https://arxiv.org/pdf/2309.00827v2.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":"few-shot-font-generation-via-transferring","repo_url":"https://github.com/awei669/VQ-Font","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"disentanglement","task_name":"Disentanglement"},{"task_slug":"font-generation","task_name":"Font Generation"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"style-transfer-module","method_name":"Style Transfer Module"},{"method_slug":"vq-vae","method_name":"VQ-VAE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.00827","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.00827"}},"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":"deterministic:regex_extraction","url":"https://github.com/awei669/VQ-Font","reach":null}],"summary":{"ran":10,"ran_draft_wrong":4,"unverified":6},"by_repo_kind":{"official":{"samples":20,"ran":14,"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":"2a39482d4753164c","entry":"CombMemory","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"2a39482d4753164c"}},{"code_sha256_prefix":"71c7a04d62e507d5","entry":"ComponentAttentiomModule","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71c7a04d62e507d5"}},{"code_sha256_prefix":"6f8966274a44440a","entry":"ContentEncoder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f8966274a44440a"}},{"code_sha256_prefix":"2473ec6f9dc355ab","entry":"ConvBlock","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2473ec6f9dc355ab"}},{"code_sha256_prefix":"a17d741f7612e43f","entry":"Decoder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a17d741f7612e43f"}},{"code_sha256_prefix":"5e15b825d420a8be","entry":"Get_style_components","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"5e15b825d420a8be"}},{"code_sha256_prefix":"c14e6958f34825b9","entry":"Integrator","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c14e6958f34825b9"}},{"code_sha256_prefix":"8aa95f8d6107478a","entry":"Memory","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8aa95f8d6107478a"}},{"code_sha256_prefix":"67f9da40971cc102","entry":"ReferenceEncoder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67f9da40971cc102"}},{"code_sha256_prefix":"cc3471e8a4b12fd9","entry":"ResBlock","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc3471e8a4b12fd9"}},{"code_sha256_prefix":"3cdb5263748b9863","entry":"comp_enc_builder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","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":"3cdb5263748b9863"}},{"code_sha256_prefix":"f3e23976ff6aa2b4","entry":"content_enc_builder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","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":"f3e23976ff6aa2b4"}},{"code_sha256_prefix":"790a4be48cafa62e","entry":"dispatcher","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"790a4be48cafa62e"}},{"code_sha256_prefix":"e8ff56712f5536e3","entry":"spectral_norm","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.py","link_basis":"first_harvest_node","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":"e8ff56712f5536e3"}},{"code_sha256_prefix":"5e3adcaee1617921","entry":"Generator","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"5e3adcaee1617921"}},{"code_sha256_prefix":"2485473d4c08af0a","entry":"activ_dispatch","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"2485473d4c08af0a"}},{"code_sha256_prefix":"02206912d32f5f94","entry":"dec_builder","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"02206912d32f5f94"}},{"code_sha256_prefix":"4d790cc6e758867e","entry":"norm_dispatch","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"4d790cc6e758867e"}},{"code_sha256_prefix":"ba17bd55a8d2146a","entry":"pad_dispatch","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"ba17bd55a8d2146a"}},{"code_sha256_prefix":"940b095eee518c40","entry":"w_norm_dispatch","repo":"awei669/VQ-Font","repo_kind":"official","path":"model/generator.py","file_url":"https://github.com/awei669/VQ-Font/blob/HEAD/model/generator.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":"940b095eee518c40"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}