Skip to content

Repository files navigation

SVGBuilder

     

  

📝 Introduction

This is the repository for the paper SVGBuilder: Component-Based Colored SVG Generation with Text-Guided Autoregressive Transformers, accepted by AAAI 2025.

Model

SVGBuilder is a component-based autoregressive framework for efficient text-to-SVG generation, leveraging modular graphic construction to produce high-quality colored vector graphics with dramatically reduced computational cost and up to 604× faster generation than traditional optimization-based methods.

⚙️ Installation

We use uv for extremely fast Python package management.

1. Install uv (if you haven't already):

Please refer to the official uv documentation for installation instructions.

2. Clone the repository:

git clone https://github.com/amcghm/SVGBuilder.git
cd SVGBuilder

3. Install dependencies:

uv sync

4. Download Pre-trained Models:

Download hpc.pt from align_sd and place it in the ./hpc directory:

# Place the downloaded hpc.pt here:
./hpc/hpc.pt

📥 Dataset

Our model is trained and evaluated on the ColorSVG-100K dataset.

You can access the ColorSVG-100K GitHub repository and download it from GitHub Releases.

After downloading, please unzip the dataset and place it in the ./data directory. The final directory structure should look like this:

data/ColorSVG-100K/

🛠️ Configuration

You can modify the training and dataset configurations (such as model paths, batch size, learning rate, etc.) by adjusting the config dictionary at the beginning of the train.py file.

🚀 Quick Start

Once everything is installed and configured, you can start the data processing and training pipeline. Note that a GPU is required for these steps.

1. Preprocess the data:

uv run preprocess.py

2. Build similarity triplets:

uv run build_sim_triplets.py

3. Train the model:

uv run train.py

📚 Citation

If you find our work helpful in your research, please cite our paper:

@inproceedings{chen2025svgbuilder,
  title     = {SVGBuilder: Component-Based Colored SVG Generation with Text-Guided Autoregressive Transformers},
  author    = {Chen, Zehao and Pan, Rong},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  volume    = {39},
  number    = {3},
  pages     = {2358--2366},
  year      = {2025}
}

⚖️ License

This project is licensed under the MIT License.

About

Implementation of the AAAI 2025 paper "SVGBuilder: Component-Based Colored SVG Generation with Text-Guided Autoregressive Transformers".

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages