Home

Awesome

Functionality Preserving Shape Style Transfer

Project Page

Introduction

This archive contains C++ code for the Style Transfer project. Visual Studio 2013 or above is required to compile the code. Our code is released under GPL v3 license.

How to Compile

  1. Open Visual Studio solution build/Style.sln
  2. Select targeting configurations (Release | x64 is recommended)
  3. Build the solution by pressing F7
  4. Occasionally Visual Studio will complain about the error below. The reason for this error may be the heavy dependencies of other third party libraries in this project. If this happens, just build the solution one more time.

error C1002: compiler is out of heap space in pass 2

How to Run

  1. After compiling the project, the binary executables are inside folder output
  2. Download the demo data set from the project page. Unzip the file to anywhere you want. You should now have a folder named data.
  3. In Visual Studio, right click project StyleSynthesis > Properties. From the left-side panel, select Configuration Properties > Debugging. On the right-side window, make sure the Command Arguments and Working Directory are correct.
  4. The Working Directory should be the path to the folder data. The Command Arguments should be the path to the *.cfg configuration file within any demo case folder (path should be relative to the data folder)
  5. Run the program by pressing Ctrl+F5. Take a cup of coffee.
  6. After the program finishes running, the synthesized shapes should be in the output folder within each case folder.

Code Structure

The main entry point of the program is in file src/StyleSynthesis/main.cpp. The entire pipeline contains several steps handled by different classes. The class definitions of all those pipeline classes are inside folder src/StyleSynthesis/IO/Pipeline. Below is a brief explanation of the purpose of each class:

Third-party Libraries

  1. All third-party library header files and pre-built binary files are included in folder 3rdparty
  2. This project requires OpenGL. You will need an OpenGL capable graphics card and development environment
  3. All third-party libraries used in this project are listed below:

Other Notes

Zhaoliang Lun, Evangelos Kalogerakis, Rui Wang, Alla Sheffer, "Functionality Preserving Shape Style Transfer", ACM Transactions on Graphics (Proc. ACM SIGGRAPH ASIA 2016)