Source code for the Style Transfer project: transfer the style from one 3D shape to another 3D shape while preserving functionality of the shape.
Switch branches/tags
Nothing to show
Clone or download
Happy Lun
Latest commit f8af7c3 Oct 28, 2017
Permalink
Failed to load latest commit information.
3rdparty Migrated to GitHub. Oct 28, 2017
build Migrated to GitHub. Oct 28, 2017
src Migrated to GitHub. Oct 28, 2017
CHANGELOG Migrated to GitHub. Oct 28, 2017
COPYING Migrated to GitHub. Oct 28, 2017
LICENSE Migrated to GitHub. Oct 28, 2017
README.md Migrated to GitHub. Oct 28, 2017

README.md

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:

  • Pre-Processing
    • PipelineMeshIO: pre-process input meshes
    • PipelineCurveIO: extract feature curves from meshes
    • PipelineSegmentIO: hierarchically segment input meshes
    • PipelineGraphIO: build context graph for compatibility measure
    • PipelineFeatureIO: compute shape features
    • PipelineSimilarityIO: compute stuffs related to style similarity
  • Learning
    • PipelineTrainPartIO: organize data for learning part compatibility
    • PipelineTrainLearningIO: learn weights for part compatibility
    • PipelineTrainCurveIO: learn weights for curve compatibility
    • PipelineTrainValidationIO: learn stuffs for validation
  • Style Transfer
    • PipelineMatchPartIO: transfer style by element substitution/addition/removal
    • PipelineMatchCurveIO: transfer style by curve-based deformation

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

  • If you would like to use our code, please cite the following paper:

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