{"id":14525282,"url":"https://github.com/potamides/DeTikZify","last_synced_at":"2025-09-01T11:30:54.190Z","repository":{"id":240998958,"uuid":"724066757","full_name":"potamides/DeTikZify","owner":"potamides","description":"Synthesizing Graphics Programs for Scientific Figures and Sketches with TikZ","archived":false,"fork":false,"pushed_at":"2025-08-12T14:49:43.000Z","size":300,"stargazers_count":1496,"open_issues_count":11,"forks_count":76,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-08-12T16:33:10.352Z","etag":null,"topics":["draw","graph","huggingface","inverse-graphics","latex","llama","llm","multimodal","sketch","tikz","transformers","vectorization","visualization"],"latest_commit_sha":null,"homepage":"https://nllg-detikzify.hf.space","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potamides.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}},"created_at":"2023-11-27T10:27:53.000Z","updated_at":"2025-08-12T14:49:45.000Z","dependencies_parsed_at":"2024-07-21T16:25:11.226Z","dependency_job_id":"e7c94699-8a4f-4649-8e81-101faf876658","html_url":"https://github.com/potamides/DeTikZify","commit_stats":{"total_commits":86,"total_committers":3,"mean_commits":"28.666666666666668","dds":"0.39534883720930236","last_synced_commit":"e9534951d9fb9f6bdad1b1897a568bea4dee4afd"},"previous_names":["potamides/detikzify"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/potamides/DeTikZify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potamides%2FDeTikZify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potamides%2FDeTikZify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potamides%2FDeTikZify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potamides%2FDeTikZify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potamides","download_url":"https://codeload.github.com/potamides/DeTikZify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potamides%2FDeTikZify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273114746,"owners_count":25048253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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":["draw","graph","huggingface","inverse-graphics","latex","llama","llm","multimodal","sketch","tikz","transformers","vectorization","visualization"],"created_at":"2024-09-04T14:01:22.681Z","updated_at":"2025-09-01T11:30:54.183Z","avatar_url":"https://github.com/potamides.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# DeTi*k*Zify\u003cbr\u003e\u003csub\u003e\u003csup\u003eSynthesizing Graphics Programs for Scientific Figures and Sketches with Ti*k*Z\u003c/sup\u003e\u003c/sub\u003e\n[![OpenReview](https://img.shields.io/badge/View%20on%20OpenReview-8C1B13?labelColor=gray\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAgCAYAAADqgqNBAAAACXBIWXMAABMYAAATGAHPrZVxAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub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U5ErkJggg==)](https://openreview.net/forum?id=bcVLFQCOjc)\n[![arXiv](https://img.shields.io/badge/View%20on%20arXiv-B31B1B?logo=arxiv\u0026labelColor=gray)](https://arxiv.org/abs/2405.15306)\n[![Hugging Face](https://img.shields.io/badge/View%20on%20Hugging%20Face-blue?labelColor=gray\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAALEsAACxLAaU9lqkAAAAHdElNRQfoBRILLggNuk3UAAAKNklEQVRYw42WeXCU9RnHP7/32CO7m2M3gYVwQwMptAqWVDwwrSLToaVVi7UFWg+mM5UZtdoZay1Oq70tM+rYc3RqhxioFlBRZERGSZSjtiEakgqSAwo5dpNNdrPnu+/7/vrHbxNQccbfzM6+8zue4/s8z/d5BJ+wHn/8cRKJBLNmzeKOO+7gxIkT1NXVTZ4fPHzMF41O87iOI3u6TxbWrP6SNXHW2NjI+Pg4d999N/F4nDVr1lBfX8+nXk8//TRSSlavXo2UEiklmBUiMW7PKzhyve24jzlW+iUnP/qmkx97wynmdxZd+ZucLb8xNJyaNvFGSsn9998PwIEDBy6qS3x0Y/v27SxdupSFCxdO7o1l7IVBn36Hnum+UcSOzCH+L53xHiimQOjgq4GqxTDlSktGlr1ve8LNiZHRbVNrqvoBhBBIKdm/fz/XX3/9J3u+c+dOOjo6Jq1v/sdOM1+UG9xU7/uy7edS/nORlE0eKZ83pNzjl/LVoJR7A1K+4JVyuy5lU1DKvddK2fOcdKzM4UzeWQUIKeWkjj179lwcgVOnThGJRKisrATgzbeO+q68fPl95tCBB2h7KEDqHagJQFUAvAYIcf61BBwXshbEUzCuwdwNyEt+OmR5Z96/YvmSbW3tx91FixYhpeTIkSOEw2EA9AkDYrEYe/bsYd26dTzyq98b3/nWN39ont31Mw7f6Ufrhrk1EC4DU79Y5E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zs5Obr/9dnH06FGt/b3OBQs+U/dtn2Z9Q09/sJDh//hIvAeZ/4GTB281TFuJnLm2P69X75DSzSJxhaZV+XLd3xZndlcz/G8opsEMQmgeRJYiI8tybtns4zlL7jre8e5zKy5vOL127Vq3qalJ8uijj9La2sr69esnKMXY//obM4aGk1/P5J1fW0X7RdvKHbELmbaiVTiYKzhP9J05dxXgQY2c+ozaWt+5weHr8pbz56KVb7ULmWO2lT9cKDq70jn7kf6hkTUvvrRnWinptU2bNokjR46wdetWjK6uLkzTpKmpSS5fvpz9+/c7q677Uj9wDnjl1ttu8zY2ftkfDIb0s2fPWPfcfVcasC+99FJRX18vpZS0t7dbtdHqA0JoLX/445+CU6ZO9STHRu19r76ae/755/IluhI333yzvOaaa+TmzZtpaGggFoshEokETz31FLNnz6a1tZUnn3ySo0ePsnfvXtHR0cGxY8dEb2/vZGJfe+21cuXKlfKhhx6ivr4ey7Lo7u5my5YtoqWlhZaWlslSmD9/PsuWLZOLFy+WDz74IKZpct9993HTTTdx7tw5PB4P/wdyObJGug0H9QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0wNS0xOFQxMTozMzozNCswMDowMNKO6kUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMDUtMThUMTE6MzI6MTArMDA6MDD6exqpAAAAKHRFWHRkYXRlOnRpbWVzdGFtcAAyMDI0LTA1LTE4VDExOjQ2OjA4KzAwOjAwcvvAdgAAAABJRU5ErkJggg==)](https://huggingface.co/collections/nllg/detikzify-664460c521aa7c2880095a8b)\n[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1hPWqucbPGTavNlYvOBvSNBAwdcPZKe8F)\n\nCreating high-quality scientific figures can be time-consuming and challenging,\neven though sketching ideas on paper is relatively easy. Furthermore,\nrecreating existing figures that are not stored in formats preserving semantic\ninformation is equally complex. To tackle this problem, we introduce\n[DeTi*k*Zify](https://github.com/potamides/DeTikZify), a novel multimodal\nlanguage model that automatically synthesizes scientific figures as\nsemantics-preserving [Ti*k*Z](https://github.com/pgf-tikz/pgf) graphics\nprograms based on sketches and existing figures. We also introduce an\nMCTS-based inference algorithm that enables DeTi*k*Zify to iteratively refine\nits outputs without the need for additional training.\n\nhttps://github.com/potamides/DeTikZify/assets/53401822/203d2853-0b5c-4a2b-9d09-3ccb65880cd3\n\n## News\n* **2025-06-30**: We release [DeTi*k*Zify\u003csub\u003ev2.5\u003c/sub\u003e\n  (8b)](https://huggingface.co/nllg/detikzify-v2.5-8b), our latest model, which\n  builds on\n  [DeTi*k*Zify\u003csub\u003ev2\u003c/sub\u003e](https://huggingface.co/nllg/detikzify-v2-8b) using\n  [reinforment learning from\n  self-feedback](https://huggingface.co/nllg/detikzify-v2.5-8b#reinforcement-learning-from-self-feedback)\n  (RLSF). We make it the new default model in our [Hugging Face\n  Space](https://huggingface.co/spaces/nllg/DeTikZify). Check out the [model\n  card](https://huggingface.co/nllg/detikzify-v2.5-8b#model-card-for-detikzifyv25-8b)\n  for more information.\n* **2025-06-26**: Ti*k*Zero was accepted as a [highlight\n  paper](https://iccv.thecvf.com/virtual/2025/poster/51) at [ICCV\n  2025](https://iccv.thecvf.com)!\n* **2025-03-17**: We release\n  [Ti*k*Zero](https://huggingface.co/nllg/tikzero-adapter) adapters which plug\n  directly into [DeTi*k*Zify\u003csub\u003ev2\u003c/sub\u003e\n  (8b)](https://huggingface.co/nllg/detikzify-v2-8b) and enable zero-shot\n  text-conditioning, and\n  [Ti*k*Zero+](https://huggingface.co/nllg/tikzero-plus-10b) with additional\n  end-to-end fine-tuning. For more information see our\n  [paper](https://arxiv.org/abs/2503.11509) and usage examples [below](#usage).\n* **2024-12-05**: We release [DeTi*k*Zify\u003csub\u003ev2\u003c/sub\u003e\n  (8b)](https://huggingface.co/nllg/detikzify-v2-8b), our new DeTi*k*Zify model\n  that surpasses all previous versions in our evaluation. Check out the [model\n  card](https://huggingface.co/nllg/detikzify-v2-8b#model-card-for-detikzifyv2-8b)\n  for more information.\n* **2024-09-24**: DeTi*k*Zify was accepted at [NeurIPS\n  2024](https://neurips.cc/Conferences/2024) as a [spotlight\n  paper](https://neurips.cc/virtual/2024/poster/94474)!\n\n## Installation\n\n\u003e [!TIP]\n\u003e If you encounter difficulties with installation or inference on your own\n\u003e hardware, consider visiting our [Hugging Face\n\u003e Space](https://huggingface.co/spaces/nllg/DeTikZify) (please note that\n\u003e restarting the space can take up to 30 minutes). Should you experience long\n\u003e queues, you have the option to\n\u003e [duplicate](https://huggingface.co/spaces/nllg/DeTikZify?duplicate=true) it\n\u003e with a paid private GPU runtime or [run it\n\u003e locally](https://huggingface.co/spaces/nllg/DeTikZify?docker=true) with\n\u003e Docker. Additionally, you can try our demo on [Google\n\u003e Colab](https://colab.research.google.com/drive/1hPWqucbPGTavNlYvOBvSNBAwdcPZKe8F).\n\u003e However, setting up the environment there might take some time, and the free\n\u003e tier only supports inference for the 1b models.\n\nThe Python package of DeTi*k*Zify can be easily installed using\n[pip](https://pip.pypa.io/en/stable):\n```sh\npip install 'detikzify[legacy] @ git+https://github.com/potamides/DeTikZify'\n```\nThe `[legacy]` extra is only required if you plan to use the\nDeTi*k*Zify\u003csub\u003ev1\u003c/sub\u003e models. If you only plan to use\nDeTi*k*Zify\u003csub\u003ev2\u003c/sub\u003e you can remove it. If your goal is to run the included\n[examples](examples), it is easier to clone the repository and install it in\neditable mode like this:\n ```sh\ngit clone https://github.com/potamides/DeTikZify\npip install -e DeTikZify[examples]\n ```\nIn addition, DeTi*k*Zify requires a full\n[TeX Live 2023](https://www.tug.org/texlive) installation,\n[ghostscript](https://www.ghostscript.com), and\n[poppler](https://poppler.freedesktop.org) which you have to install through\nyour package manager or via other means.\n\n## Usage\n\n\u003e [!TIP]\n\u003e For interactive use and general [usage tips](detikzify/webui#usage-tips),\n\u003e we recommend checking out our [web UI](detikzify/webui), which can be started\n\u003e directly from the command line (use `--help` for a list of all options):\n\u003e ```sh\n\u003e python -m detikzify.webui --light\n\u003e ```\n\nIf all required dependencies are installed, the full range of DeTi*k*Zify\nfeatures such as compiling, rendering, and saving Ti*k*Z graphics, and\nMCTS-based inference can be accessed through its programming interface:\n\u003cdetails open\u003e\u003csummary\u003eDeTi\u003ci\u003ek\u003c/i\u003eZify Example\u003c/summary\u003e\n\n```python\nfrom operator import itemgetter\n\nfrom detikzify.model import load\nfrom detikzify.infer import DetikzifyPipeline\n\nimage = \"https://w.wiki/A7Cc\"\npipeline = DetikzifyPipeline(*load(\n    model_name_or_path=\"nllg/detikzify-v2.5-8b\",\n    device_map=\"auto\",\n    torch_dtype=\"bfloat16\",\n))\n\n# generate a single TikZ program\nfig = pipeline.sample(image=image)\n\n# if it compiles, rasterize it and show it\nif fig.is_rasterizable:\n    fig.rasterize().show()\n\n# run MCTS for 10 minutes and generate multiple TikZ programs\nfigs = set()\nfor score, fig in pipeline.simulate(image=image, timeout=600):\n    figs.add((score, fig))\n\n# save the best TikZ program\nbest = sorted(figs, key=itemgetter(0))[-1][1]\nbest.save(\"fig.tex\")\n```\n\u003c/details\u003e\n\nThrough [Ti*k*Zero](https://huggingface.co/nllg/tikzero-adapter) adapters and\n[Ti*k*Zero+](https://huggingface.co/nllg/tikzero-plus-10b) it is also possible\nto synthesize graphics programs conditioned on text (cf. our\n[paper](https://arxiv.org/abs/2503.11509) for\ndetails). Note that this currently only supported through the programming\ninterface:\n\n\u003cdetails open\u003e\u003csummary\u003eTi\u003ci\u003ek\u003c/i\u003eZero+ Example\u003c/summary\u003e\n\n```python\nfrom detikzify.model import load\nfrom detikzify.infer import DetikzifyPipeline\n\ncaption = \"A multi-layer perceptron with two hidden layers.\"\npipeline = DetikzifyPipeline(*load(\n    model_name_or_path=\"nllg/tikzero-plus-10b\",\n    device_map=\"auto\",\n    torch_dtype=\"bfloat16\",\n))\n\n# generate a single TikZ program\nfig = pipeline.sample(text=caption)\n\n# if it compiles, rasterize it and show it\nif fig.is_rasterizable:\n    fig.rasterize().show()\n```\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003eTi\u003ci\u003ek\u003c/i\u003eZero Example\u003c/summary\u003e\n\n```python\nfrom detikzify.model import load, load_adapter\nfrom detikzify.infer import DetikzifyPipeline\n\ncaption = \"A multi-layer perceptron with two hidden layers.\"\npipeline = DetikzifyPipeline(\n    *load_adapter(\n        *load(\n            model_name_or_path=\"nllg/detikzify-v2-8b\",\n            device_map=\"auto\",\n            torch_dtype=\"bfloat16\",\n        ),\n        adapter_name_or_path=\"nllg/tikzero-adapter\",\n    )\n)\n\n# generate a single TikZ program\nfig = pipeline.sample(text=caption)\n\n# if it compiles, rasterize it and show it\nif fig.is_rasterizable:\n    fig.rasterize().show()\n```\n\u003c/details\u003e\n\nMore involved examples, for example for evaluation and training, can be found\nin the [examples](examples) folder.\n\n## Model Weights \u0026 Datasets\nWe upload all our DeTi*k*Zify models and datasets to the [Hugging Face\nHub](https://huggingface.co/collections/nllg/detikzify-664460c521aa7c2880095a8b)\n(Ti*k*Zero models are available\n[here](https://huggingface.co/collections/nllg/tikzero-67d1952fab69f5bd172de1fe)).\nHowever, please note that for the public release of the\n[DaTi*k*Z\u003csub\u003ev2\u003c/sub\u003e](https://huggingface.co/datasets/nllg/datikz-v2)\nand [DaTi*k*Z\u003csub\u003ev3\u003c/sub\u003e](https://huggingface.co/datasets/nllg/datikz-v3)\ndatasets, we had to remove a considerable portion of Ti*k*Z drawings\noriginating from [arXiv](https://arxiv.org), as the [arXiv non-exclusive\nlicense](https://arxiv.org/licenses/nonexclusive-distrib/1.0/license.html) does\nnot permit redistribution. We do, however, release our [dataset creation\nscripts](https://github.com/potamides/DaTikZ) and encourage anyone to recreate\nthe full version of DaTi*k*Z themselves.\n\n## Citation\nIf DeTi*k*Zify and Ti*k*Zero have been beneficial for your research or\napplications, we kindly request you to acknowledge this by citing them as\nfollows:\n\n```bibtex\n@inproceedings{belouadi2024detikzify,\n    title={{DeTikZify}: Synthesizing Graphics Programs for Scientific Figures and Sketches with {TikZ}},\n    author={Jonas Belouadi and Simone Paolo Ponzetto and Steffen Eger},\n    booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},\n    year={2024},\n    url={https://openreview.net/forum?id=bcVLFQCOjc}\n}\n```\n\n```bibtex\n@misc{belouadi2025tikzero,\n    title={{TikZero}: Zero-Shot Text-Guided Graphics Program Synthesis},\n    author={Jonas Belouadi and Eddy Ilg and Margret Keuper and Hideki Tanaka and Masao Utiyama and Raj Dabre and Steffen Eger and Simone Paolo Ponzetto},\n    year={2025},\n    eprint={2503.11509},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL},\n    url={https://arxiv.org/abs/2503.11509},\n}\n```\n\n## Acknowledgments\nThe implementation of the DeTi*k*Zify model architecture is based on\n[LLaVA](https://github.com/haotian-liu/LLaVA) and\n[AutomaTikZ](https://github.com/potamides/AutomaTikZ) (v1), and [Idefics\n3](https://huggingface.co/HuggingFaceM4/Idefics3-8B-Llama3) (v2). Our MCTS\nimplementation is based on\n[VerMCTS](https://github.com/namin/llm-verified-with-monte-carlo-tree-search).\nThe Ti*k*Zero architecture draws inspiration from\n[Flamingo](https://deepmind.google/discover/blog/tackling-multiple-tasks-with-a-single-visual-language-model/)\nand [LLaMA\n3.2-Vision](https://ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotamides%2FDeTikZify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotamides%2FDeTikZify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotamides%2FDeTikZify/lists"}