StarVector: 이미지에서 확장 가능한 벡터 그래픽스 코드 생성
StarVector: Generating Scalable Vector Graphics Code from Images
December 17, 2023
저자: Juan A. Rodriguez, Shubham Agarwal, Issam H. Laradji, Pau Rodriguez, David Vazquez, Christopher Pal, Marco Pedersoli
cs.AI
초록
확장 가능한 벡터 그래픽스(SVGs)는 무한한 해상도 확장성, 다양한 활용성 및 편집 기능으로 인해 현대 이미지 렌더링 애플리케이션에서 필수적인 요소가 되었습니다. SVGs는 특히 웹 개발 및 그래픽 디자인 분야에서 널리 사용되고 있습니다. 딥러닝을 활용한 기존의 SVG 모델링 접근법은 복잡한 SVGs를 생성하는 데 어려움을 겪으며, 광범위한 처리와 단순화가 필요한 간단한 SVGs로 제한되는 경우가 많습니다. 본 논문은 Code Generation 대형 언어 모델(CodeLLMs)과 비전 모델을 효과적으로 통합한 다중 모달 SVG 생성 모델인 StarVector를 소개합니다. 우리의 접근 방식은 CLIP 이미지 인코더를 사용하여 픽셀 기반 이미지에서 시각적 표현을 추출한 후, 어댑터 모듈을 통해 이를 시각적 토큰으로 변환합니다. 이러한 시각적 토큰은 SVG 토큰 임베딩 앞에 추가되며, StarCoder 모델이 다음 토큰 예측을 사용하여 시퀀스를 모델링함으로써 시각적 토큰과 코드 토큰을 정렬하는 방법을 효과적으로 학습합니다. 이를 통해 StarVector는 픽셀 이미지를 정확하게 표현하는 제한 없는 SVGs를 생성할 수 있습니다. StarVector의 성능을 평가하기 위해, 우리는 여러 데이터셋과 관련 메트릭을 통해 SVG 방법을 평가하는 포괄적인 벤치마크인 SVG-Bench를 제시합니다. 이 벤치마크 내에서, 우리는 대규모 실제 SVG 예제 데이터셋인 SVG-Stack을 포함한 새로운 데이터셋을 소개하고, 이를 사용하여 StarVector를 SVG를 위한 대형 기반 모델로 사전 학습시킵니다. 우리의 결과는 현재의 방법들에 비해 시각적 품질과 복잡성 처리에서 상당한 개선을 보여주며, SVG 생성 기술의 주목할 만한 발전을 나타냅니다. 코드 및 모델: https://github.com/joanrod/star-vector
English
Scalable Vector Graphics (SVGs) have become integral in modern image
rendering applications due to their infinite scalability in resolution,
versatile usability, and editing capabilities. SVGs are particularly popular in
the fields of web development and graphic design. Existing approaches for SVG
modeling using deep learning often struggle with generating complex SVGs and
are restricted to simpler ones that require extensive processing and
simplification. This paper introduces StarVector, a multimodal SVG generation
model that effectively integrates Code Generation Large Language Models
(CodeLLMs) and vision models. Our approach utilizes a CLIP image encoder to
extract visual representations from pixel-based images, which are then
transformed into visual tokens via an adapter module. These visual tokens are
pre-pended to the SVG token embeddings, and the sequence is modeled by the
StarCoder model using next-token prediction, effectively learning to align the
visual and code tokens. This enables StarVector to generate unrestricted SVGs
that accurately represent pixel images. To evaluate StarVector's performance,
we present SVG-Bench, a comprehensive benchmark for evaluating SVG methods
across multiple datasets and relevant metrics. Within this benchmark, we
introduce novel datasets including SVG-Stack, a large-scale dataset of
real-world SVG examples, and use it to pre-train StarVector as a large
foundation model for SVGs. Our results demonstrate significant enhancements in
visual quality and complexity handling over current methods, marking a notable
advancement in SVG generation technology. Code and models:
https://github.com/joanrod/star-vector