ShapeCoder: Discovering Abstractions for Visual Programs from Unstructured Primitives

R. Kenny Jones, Paul Guerrero, Niloy J. Mitra, Daniel Ritchie
5/9/2023
cs.GRcs.AIcs.CV

No official code found. Best implementation: rkjones4/ShapeCoder (30 stars, last commit 2023-09-29).

Abstract

Programs are an increasingly popular representation for visual data, exposing compact, interpretable structure that supports manipulation. Visual programs are usually written in domain-specific languages (DSLs). Finding "good" programs, that only expose meaningful degrees of freedom, requires access to a DSL with a "good" library of functions, both of which are typically authored by domain experts. We present ShapeCoder, the first system capable of taking a dataset of shapes, represented with unstructured primitives, and jointly discovering (i) useful abstraction functions and (ii) programs that use these abstractions to explain the input shapes. The discovered abstractions capture common patterns (both structural and parametric) across the dataset, so that programs rewritten with these abstractions are more compact, and expose fewer degrees of freedom. ShapeCoder improves upon previous abstraction discovery methods, finding better abstractions, for more complex inputs, under less stringent input assumptions. This is principally made possible by two methodological advancements: (a) a shape to program recognition network that learns to solve sub-problems and (b) the use of e-graphs, augmented with a conditional rewrite scheme, to determine when abstractions with complex parametric expressions can be applied, in a tractable manner. We evaluate ShapeCoder on multiple datasets of 3D shapes, where primitive decompositions are either parsed from manual annotations or produced by an unsupervised cuboid abstraction method. In all domains, ShapeCoder discovers a library of abstractions that capture high-level relationships, remove extraneous degrees of freedom, and achieve better dataset compression compared with alternative approaches. Finally, we investigate how programs rewritten to use discovered abstractions prove useful for downstream tasks.

View on arXivView PDF

Code Implementations(1)

rkjones4/ShapeCoderCommunity100%

ShapeCoder: Discovering Abstractions for Visual Programs from Unstructured Primitives -- SIGGRAPH 2023

304Rust, PythonApr 25, 20233 years agoNOASSERTION

Cite this paper

@article{jones2023shapecoder,
  title  = {ShapeCoder: Discovering Abstractions for Visual Programs from Unstructured Primitives},
  author = {R. Kenny Jones and Paul Guerrero and Niloy J. Mitra and Daniel Ritchie},
  year   = {2023},
  eprint = {2305.05661},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.05661v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.05661.svg)](https://codeofpaper.com/paper/2305.05661)

Discussion