{"id":24064131,"url":"https://github.com/liu-yucheng/word-as-image-extended","last_synced_at":"2026-07-07T08:31:15.170Z","repository":{"id":211698835,"uuid":"729518818","full_name":"liu-yucheng/Word-As-Image-Extended","owner":"liu-yucheng","description":"Word as Image Extended","archived":false,"fork":false,"pushed_at":"2023-12-27T17:43:42.000Z","size":17324,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T20:50:03.510Z","etag":null,"topics":["ai","calligraphy","diffusion","extension","image-generation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liu-yucheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-09T13:41:59.000Z","updated_at":"2024-10-04T14:30:27.000Z","dependencies_parsed_at":"2023-12-26T12:55:00.325Z","dependency_job_id":null,"html_url":"https://github.com/liu-yucheng/Word-As-Image-Extended","commit_stats":null,"previous_names":["liu-yucheng/word-as-image-extended"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/liu-yucheng/Word-As-Image-Extended","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liu-yucheng%2FWord-As-Image-Extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liu-yucheng%2FWord-As-Image-Extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liu-yucheng%2FWord-As-Image-Extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liu-yucheng%2FWord-As-Image-Extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liu-yucheng","download_url":"https://codeload.github.com/liu-yucheng/Word-As-Image-Extended/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liu-yucheng%2FWord-As-Image-Extended/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35221308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","calligraphy","diffusion","extension","image-generation"],"created_at":"2025-01-09T10:07:13.583Z","updated_at":"2026-07-07T08:31:15.152Z","avatar_url":"https://github.com/liu-yucheng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word-As-Image-Extended\n\n- Word as image extended.\n- Extended from [Shiriluz/Word-As-Image](https://github.com/Shiriluz/Word-As-Image).\n- Ported to Windows PCs with NVIDIA GPU(s).\n- Extended calligraphy generation functions.\n- Supported multiple-line, Unicode text inputs. Line separator: `\"\\n\"`.\n\n# Copyright\n\n- Copyright (C) 2023 Yucheng Liu. GNU AGPL3/3+ license.\n\n# [Shiriluz/Word-As-Image README](https://github.com/Shiriluz/Word-As-Image)\n\n# Word-As-Image for Semantic Typography (SIGGRAPH 2023 - Honorable Mention Award)\n\n\n\n[![arXiv](https://img.shields.io/badge/📃-arXiv%20-red.svg)](https://arxiv.org/abs/2303.01818)\n[![webpage](https://img.shields.io/badge/🌐-Website%20-blue.svg)](https://wordasimage.github.io/Word-As-Image-Page/) \n[![Huggingface space](https://img.shields.io/badge/🤗-Demo%20-yellow.svg)](https://huggingface.co/spaces/SemanticTypography/Word-As-Image)\n[![Youtube](https://img.shields.io/badge/📽️-Video%20-orchid.svg)](https://www.youtube.com/watch?v=9D12a6RCQaw)\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"images/teaser.png\" width=\"100%\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\u003cbr\u003e\nA few examples of our \u003cb\u003eW\u003c/b\u003eord-\u003cb\u003eA\u003c/b\u003es-\u003cb\u003eI\u003c/b\u003emage illustrations in various fonts and for different textual concept. The semantically adjusted letters are created\ncompletely automatically using our method, and can then be used for further creative design as we illustrate here.\u003cbr\u003e\u003cbr\u003e\n\n\u003e Shir Iluz*, Yael Vinker*, Amir Hertz, Daniel Berio, Daniel Cohen-Or, Ariel Shamir    \n\u003e \\* Denotes equal contribution  \n\u003e\n\u003eA word-as-image is a semantic typography technique where a word illustration\npresents a visualization of the meaning of the word, while also\npreserving its readability. We present a method to create word-as-image\nillustrations automatically. This task is highly challenging as it requires\nsemantic understanding of the word and a creative idea of where and how to\ndepict these semantics in a visually pleasing and legible manner. We rely on\nthe remarkable ability of recent large pretrained language-vision models to\ndistill textual concepts visually. We target simple, concise, black-and-white\ndesigns that convey the semantics clearly.We deliberately do not change the\ncolor or texture of the letters and do not use embellishments. Our method\noptimizes the outline of each letter to convey the desired concept, guided by\na pretrained Stable Diffusion model. We incorporate additional loss terms\nto ensure the legibility of the text and the preservation of the style of the\nfont. We show high quality and engaging results on numerous examples\nand compare to alternative techniques.\n\n\n## Description\nOfficial implementation of Word-As-Image for Semantic Typography paper.\n\u003cbr\u003e\n\n## Setup\n\n1. Clone the repo:\n```bash\ngit clone https://github.com/WordAsImage/Word-As-Image.git\ncd Word-As-Image\n```\n2. Create a new conda environment and install the libraries:\n```bash\nconda create --name word python=3.8.15\nconda activate word\npip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113\nconda install -y numpy scikit-image\nconda install -y -c anaconda cmake\nconda install -y -c conda-forge ffmpeg\npip install svgwrite svgpathtools cssutils numba torch-tools scikit-fmm easydict visdom freetype-py shapely\npip install opencv-python==4.5.4.60  \npip install kornia==0.6.8\npip install wandb\npip install shapely\n```\n\n3. Install diffusers:\n```bash\npip install diffusers==0.8\npip install transformers scipy ftfy accelerate\n```\n4. Install diffvg:\n```bash\ngit clone https://github.com/BachiLi/diffvg.git\ncd diffvg\ngit submodule update --init --recursive\npython setup.py install\n```\n\n5. Paste your HuggingFace [access token](https://huggingface.co/settings/tokens) for StableDiffusion in the TOKEN file.\n## Run Experiments \n```bash\nconda activate word\ncd Word-As-Image\n\n# Please modify the parameters accordingly in the file and run:\nbash run_word_as_image.sh\n\n# Or run :\npython code/main.py --experiment \u003cexperiment\u003e --semantic_concept \u003cconcept\u003e --optimized_letter \u003cletter\u003e --seed \u003cseed\u003e --font \u003cfont_name\u003e --use_wandb \u003c0/1\u003e --wandb_user \u003cuser name\u003e \n```\n* ```--semantic_concept``` : the semantic concept to insert\n* ```--optimized_letter``` : one letter in the word to optimize\n* ```--font``` : font name, the \u003cfont name\u003e.ttf file should be located in code/data/fonts/\n\nOptional arguments:\n* ```--word``` : The text to work on, default: the semantic concept\n* ```--config``` : Path to config file, default: code/config/base.yaml\n* ```--experiment``` : You can specify any experiment in the config file, default: conformal_0.5_dist_pixel_100_kernel201\n* ```--log_dir``` : Default: output folder\n* ```--prompt_suffix``` : Default: \"minimal flat 2d vector. lineal color. trending on artstation\"\n\n### Examples\n```bash\npython code/main.py  --semantic_concept \"BUNNY\" --optimized_letter \"Y\" --font \"KaushanScript-Regular\" --seed 0\n```\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"images/KaushanScript-Regular_BUNNY_Y.svg\" width=\"22%\"\u003e\n\u003c/div\u003e\n\n\n```bash\npython code/main.py  --semantic_concept \"LEAVES\" --word \"NATURE\" --optimized_letter \"T\" --font \"HobeauxRococeaux-Sherman\" --seed 0\n```\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"images/HobeauxRococeaux-Sherman_NATURE_T.svg\" width=\"25%\"\u003e\n\u003c/div\u003e\n\n* Pay attention, as the arguments are case-sensitive, but it can handle both upper and lowercase letters depending on the input letters.\n\n\n## Tips\nIf the outcome does not meet your quality expectations, you could try the following options:\n\n1. Adjusting the weight 𝛼 of the L𝑎𝑐𝑎𝑝 loss, which preserves the letter's structure after deformation.\n2. Modifying the 𝜎 parameter of the low-pass filter used in the L𝑡𝑜𝑛𝑒 loss, which limits the degree of deviation from the original letter.\n3. Changing the number of control points, as this can influence the outputs.\n4. Experimenting with different seeds, as each may produce slightly different results.\n5. Changing the font type, as this can also result in various outputs.\n\n\n\n\n## Acknowledgement\nOur implementation is based ob Stable Diffusion text-to-image model from Hugging Face's [Diffusers](https://github.com/huggingface/diffusers) library, combined with [Diffvg](https://github.com/BachiLi/diffvg). The framework is built on [Live](https://github.com/Picsart-AI-Research/LIVE-Layerwise-Image-Vectorization).\n    \n## Citation\nIf you use this code for your research, please cite the following work: \n```\n@article{IluzVinker2023,\n    author = {Iluz, Shir and Vinker, Yael and Hertz, Amir and Berio, Daniel and Cohen-Or, Daniel and Shamir, Ariel},\n    title = {Word-As-Image for Semantic Typography},\n    year = {2023},\n    issue_date = {August 2023},\n    publisher = {Association for Computing Machinery},\n    address = {New York, NY, USA},\n    volume = {42},\n    number = {4},\n    issn = {0730-0301},\n    url = {https://doi.org/10.1145/3592123},\n    doi = {10.1145/3592123},\n    journal = {ACM Trans. Graph.},\n    month = {jul},\n    articleno = {151},\n    numpages = {11},\n    keywords = {semantic typography, SVG, stable diffusion, fonts}\n}\n```\n    \n## Licence\nThis work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliu-yucheng%2Fword-as-image-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliu-yucheng%2Fword-as-image-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliu-yucheng%2Fword-as-image-extended/lists"}