Teng Hu, Ran Yi, Baihong Qian, Jiangning Zhang, Paul L. Rosin, and Yu-Kun Lai
conda create -n live python=3.7
conda activate live
conda install -y pytorch torchvision -c pytorch
conda install -y numpy scikit-image
conda install -y -c anaconda cmake
conda install -y -c conda-forge ffmpeg
pip install svgwrite svgpathtools cssutils numba torch-tools scikit-fmm easydict visdom
pip install opencv-python==4.5.4.60 # please install this version to avoid segmentation fault.
cd DiffVG
git submodule update --init --recursive
python setup.py install
cd ..
Currently we are working on an improved version of SuperSVG and the complete code will be released after that project. If you want to reproduce the results in the paper, you can download the ckeckponits of our imporved coarse-stage model, which performs almost the same as the coarse+refine model in the paper.
Data prepare: Download the ImageNet dataset.
Put the downloaded Imagenet or any dataset you want into $path_to_the_dataset
.
Then, you can train the coarse-stage model by running:
python3 main_coarse.py --data_path=$path_to_the_dataset
After training, the checkpoints and logs are saved in the directory output_coarse
.
Coming soon
If you find this code helpful for your research, please cite:
@inproceedings{hu2024supersvg,
title={SuperSVG: Superpixel-based Scalable Vector Graphics Synthesis},
author={Teng Hu and Ran Yi and Baihong Qian and Jiangning Zhang and Paul L. Rosin and Yu-Kun Lai},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year={2024}
}