Code and Data


Download (2 MB)

Scripts/Apps: Python scripts (in 'scripts/') are used to perform a certain step of our algorithm. Each python script calls one C++ app (in 'code/apps/').
ScriptRelated appFunction
grammar_learning.pygrammar_learningLearn a probabilistic grammar from a set of annotated scene graphs (section 4.2).
scene_parsing.pyscene_parsingProduce an annotated hierarchy that is a valid parse of the input scene graphs according to the given probabilistic grammar (section 5).
visualizer.pyvisualizerAssist user to visualize and annotate a scene graph.

Libs: below is a list of the most relevant libraries. All libs are in 'code/pkgs/'.
DataStructureData structure of scene graph and probabilistic grammar.
DescriptorDefinition of shape descriptors and layout descriptors.
FittingScene parsing algorithm. 'Fitting/MaxSumBinarySolver' is the most relevant file.

Examples: we include two examples in 'examples'. Each example consists of training scene graphs (e.g. 'examples/0/training') and an input scene graph without annotation (i.e. 'examples/0/bedroom000032-input.hier'). The format of scene graph files (*.hier) can be found here.

    • The code for grammar learning and scene parsing does not have external dependencies. However, the visualizer code requires OpenGL and GLUT.
    • Type 'Make' in 'code/' to compile the code. If this step succeeds, three executables should be found in 'code/bin/$ARCH': grammar_learning, scene_parsing and visualizer.

Run examples
    • Copy bedroom models, which can be found in 'models/bedroom'(password is provided upon request), to 'examples/models/bedroom'. These models will be used in the examplar cases, but are not included in the code folder.
    • Type 'Make' in './' to run grammar learning and scene parsing on the examples. If this step suceeds, our code should produce 'examples/0/bedroom000032-pred.hier' and 'examples/1/bedroom000032-pred.hier', which are both predicted annotated hierarchies.

Visualize examples
    • Type 'python scripts/' to see usage.


Our dataset Scene graphs (10 MB) Models Structure

Sketch2Scene bedroom dataset Scene graphs (1 MB) Models Structure Paper


[PDF 12.7M 0.7M] [Bib]


Please cite the pages/papers below if you use the code or datasets:

[1] Trimble 3D Warehouse

[2] Sketch2Scene: Sketch-based Co-retrieval and Co-placement of 3D models
      Kun Xu, Kang Chen, Hongbo Fu, Wei-Lun Sun, Shi-Min Hu
      SIGGRAPH 2013

[3] Creating Consistent Scene Graphs Using a Probabilistic Grammar
      Tianqiang Liu, Siddhartha Chaudhuri, Vladimir G. Kim, Qi-Xing Huang, Niloy J. Mitra, Thomas Funkhouser
      SIGGRAPH Asia 2014


This code is built upon GAPS library, which is developed by Tom Funkhouser.
[Home] [Project page]