StarVector: Generating Scalable Vector Graphics Code from Images and Text

Abstract

Scalable Vector Graphics (SVG) have become integral to modern image rendering applications due to their infinite scalability and versatility, especially in graphic design and web development. SVGs are essentially long strings of code that adhere to a structured syntax with validity constraints. With the rise of large language models, which excel at generating code in various languages, we aim to generate SVG code in a similar way. Our findings show that a vision-language model can be conditioned to produce valid SVG code that closely resembles input images, effectively enabling vectorization. Additionally, we harness the rich SVG syntax, encompassing all possible primitives—such as lines, paths, polygons, text, and effects like color gradients—that previous methods often missed. We briefly explain how the StarVector model operates, primarily leveraging a vision-language transformer architecture to generate SVG code. We also detail our training and inference procedures. Finally, we provide an interactive demo that allows users to input an image and generate its SVG code autoregressively, featuring real-time rendering that visually demonstrates the SVG generation process.

Cite

Text

Rodríguez et al. "StarVector: Generating Scalable Vector Graphics Code from Images and Text." AAAI Conference on Artificial Intelligence, 2025. doi:10.1609/AAAI.V39I28.35369

Markdown

[Rodríguez et al. "StarVector: Generating Scalable Vector Graphics Code from Images and Text." AAAI Conference on Artificial Intelligence, 2025.](https://mlanthology.org/aaai/2025/rodriguez2025aaai-starvector/) doi:10.1609/AAAI.V39I28.35369

BibTeX

@inproceedings{rodriguez2025aaai-starvector,
  title     = {{StarVector: Generating Scalable Vector Graphics Code from Images and Text}},
  author    = {Rodríguez, Juan A. and Puri, Abhay and Agarwal, Shubham and Laradji, Issam H. and Rajeswar, Sai and Vázquez, David and Pal, Christopher and Pedersoli, Marco},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year      = {2025},
  pages     = {29691-29693},
  doi       = {10.1609/AAAI.V39I28.35369},
  url       = {https://mlanthology.org/aaai/2025/rodriguez2025aaai-starvector/}
}