Git Product home page Git Product logo

iconshop's Introduction

IconShop: Text-Guided Vector Icon Synthesis with Autoregressive Transformers

Setup

git clone https://github.com/kingnobro/IconShop.git
cd IconShop

Environment

To set up our environment, please run:

conda env create -f environment.yml
conda activate iconshop

Please refer to cairosvg's documentation for additional requirements of CairoSVG. For example:

  • on Ubuntu: sudo apt-get install libcairo2-dev.
  • on macOS: brew install cairo libffi.

Dataset

We have cleaned up the FIGR-8-SVG by command simplification, removing the black bounding box, and resizing the icons.

Download the labels and SVG files from Google Drive and place them in the ./dataset folder. You need to unzip the FIGR-SVG-svgo.zip.

The resulting file structure should be:

./dataset
├── FIGR-SVG-train.csv
├── FIGR-SVG-valid.csv
├── FIGR-SVG-test.csv
└── FIGR-SVG-svgo
    ├── 100000-200.svg
    ├── 1000003-200.svg
    └── ...

There are some other useful files in the Google Drive link. Please check the Readme.md and download them as needed.

Training

I use 8 RTX 3090 (or 2 A100) to train the model.

Feel free to adjust the batch size, number of epochs, and learning rate. The training will take several days, so I did not spend a lot of time optimizing these parameters.

bash scripts/train.sh

Use the following command to check the loss curve:

bash scripts/log.sh

Sample

bash scripts/sample.sh

Download our pretrained models and unzip it under proj_log/FIGR_SVG. This model is trained with 100 epochs.

Please note that the results presented in the paper may differ from those of this pretrained model (e.g., the same prompt will create different outputs). Due to copyright issues, access to the model described in the paper is available upon request for research purposes only.

Miscellaneous

  • Our code is based on SkexGen and DeepSVG (for read and write SVG data).
  • Acknowledgement: We would like to express our sincere gratitude to OPPO for their generous support of our work.

iconshop's People

Contributors

kingnobro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

iconshop's Issues

data preprocess

Hi, nice work!
I downloaded your data following the instructions.
However, it seems like the preprocessed data is not structured as a path sequence.
For example if I open ""
this is the text file:
\n \n
image

As can be seen, the SVG is constructed weirdly, without paths.
Did you use this data for training? or did you apply some additional preprocess to FIGR8?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.