StarVector: Generating Scalable Vector Graphics Code from Images and Text

Authors

  • Juan A. Rodriguez ServiceNow Research Mila - Quebec AI Institute École de Technologie Supérieure
  • Abhay Puri ServiceNow Research
  • Shubham Agarwal ServiceNow Research Mila - Quebec AI Institute
  • Issam H. Laradji ServiceNow Research
  • Sai Rajeswar ServiceNow Research Mila - Quebec AI Institute
  • David Vazquez ServiceNow Research
  • Christopher Pal ServiceNow Research Mila - Quebec AI Institute Canada CIFAR AI Chair
  • Marco Pedersoli ServiceNow Research École de Technologie Supérieure

DOI:

https://doi.org/10.1609/aaai.v39i28.35369

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.

Downloads

Published

2025-04-11

How to Cite

Rodriguez, J. A., Puri, A., Agarwal, S., Laradji, I. H., Rajeswar, S., Vazquez, D., … Pedersoli, M. (2025). StarVector: Generating Scalable Vector Graphics Code from Images and Text. Proceedings of the AAAI Conference on Artificial Intelligence, 39(28), 29691–29693. https://doi.org/10.1609/aaai.v39i28.35369