StarVector - an open-source multimodal visual language model that supports image and text-to-SVG generation.
StarVector is an open-source multimodal visual language model, jointly developed by ServiceNow Research, Mila-Quebec AI Institute, and ETS Montreal, focusing on converting images and text into scalable vectors...
What is StarVector?
StarVector is an open-source, multimodal visual language model jointly developed by ServiceNow Research, Mila-Quebec AI Institute, and ETS Montreal. It focuses on converting images and text into Scalable Vector Graphics (SVG) code. The model employs a multimodal architecture, capable of processing both image and text information simultaneously, manipulating directly within the SVG code space to generate standard, editable SVG files. StarVector is trained on the SVG-Stack dataset, which contains over 2 million SVG samples, and is available in two sizes: StarVector-1B and StarVector-8B, to meet different needs.
StarVector's main functions
- Image-to-SVG conversionIt can directly convert images into SVG code, thus achieving image vectorization.
- Text-to-SVG generationIt can generate corresponding SVG graphics based on text instructions.
StarVector's technical principles
- Multimodal architectureStarVector employs a multimodal architecture that seamlessly integrates visual and language models. It extracts visual features from images using a visual encoder (such as a Vision Transformer or CLIP image encoder), and then maps these features to the embedding space of the language model via an adapter to generate visual tags. These visual tags, along with text embeddings, are input into the language model, enabling unified processing of images and text.
- Image encoding and visual tag generationImage encoders (such as Vision Transformers) segment input images into small patches and convert them into hidden features. These are then projected onto the embedding space of a language model via a non-linear adapter to form visual tags. This process captures key visual features of the image, such as shape, color distribution, and structural layout.
- Language Model and SVG Code GenerationStarVector uses a StarCoder-based language model. During training, the model undergoes supervised learning through a task of predicting the next label of the SVG code. During inference, the model regressively predicts the SVG code based on the visual labels of the input image.
- Training on large datasetsStarVector is trained on the SVG-Stack dataset, which contains over 2 million SVG samples. The dataset covers a diverse range of SVG samples, supporting various tasks from image to SVG and from text to SVG. StarVector introduces the SVG-Bench evaluation benchmark for comprehensive evaluation of model performance.
- performance advantagesStarVector excels in image-to-SVG and text-to-SVG tasks. The generated SVG files are more compact and semantically richer, effectively utilizing SVG primitives. In the SVG-Bench benchmark, StarVector outperforms traditional methods and deep learning baseline models across multiple metrics.
StarVector's project address
- Project official website:https://starvector.github.io/
- Github repository:https://github.com/joanrod/star-vector
- arXiv technical paper:https://arxiv.org/pdf/2312.11556
Application scenarios of StarVector
- Icon generationQuickly generate SVG icons from text descriptions or image inputs for use in web navigation bars, buttons, etc.
- Artistic CreationArtists can use StarVector to transform creative sketches or text descriptions into vector artworks, making them easier to edit and modify later.
- Animation ProductionThe generated SVG graphics can be used as basic elements for animation production and further developed into dynamic effects.
- Programming EducationStudents can learn to generate and edit SVG code through StarVector, improving their programming and graphic design skills.
- Technical chart generationGenerate technical diagrams, such as flowcharts and structure diagrams, from text descriptions for use in engineering documents and technical specifications.
- Data visualizationVisualize data as SVG graphics for easy display on web pages or in reports, while maintaining the editability and scalability of the graphics.