In this paper, we present a new method for solving the inverse constructive solid geometry (CSG) problem, which aims to generate a programmatic representation of a scene from its unstructured representation (e.g., a raster image). Our method, called metric program synthesis, hinges on the observation that many programs in the inverse CSG domain produce similar (but not identical) images. Based on this observation, we propose clustering programs based on a distance metric and constructing a version space that compactly represents "approximately correct" programs. Given a "close enough" program sampled from this version space, our approach uses a distance-guided repair algorithm to find a program that exactly matches the given image. We have implemented our proposed metric program synthesis technique in a tool called SyMetric and evaluate it in the inverse CSG domain. Our evaluation on 40 benchmarks shows that SyMetric can effectively solve inverse CSG problems that are beyond scope for existing synthesis techniques. In particular, SyMetric solves 78% of these benchmarks whereas the closest competitor can only solve 8%. Our evaluation also shows the benefits of similarity-based clustering and other salient features of our approach through a series of ablation studies.
翻译:在本文中,我们提出了一个解决反向建设性固体几何(CSG)问题的新方法,目的是从一个无结构的图像(如光栅图像)中产生一个场景的方案代表。我们的方法,称为光学程序合成,其依据的观察是,在反的CSG域的许多程序产生相似(但并不完全相同)的图像。基于这一观察,我们建议基于一个距离的衡量标准进行分组程序,并构建一个“大致正确”程序的版本空间。鉴于从这个版本空间抽样的“足够接近”程序,我们的方法使用远程指导修复算法来找到一个与给定图像完全吻合的程序。我们用一个名为SyMetri的工具应用了我们拟议的矩阵综合方案技术,并在CSG的反面领域对此进行了评估。我们对40个基准的评估表明,SyMetricr可以有效地解决超出现有合成技术范围的反向CSG问题。特别是,SyMetric解决了这些基准的78%,而最接近的比较器只能解决8%。我们的评估还显示了以一系列方式进行类似组合和其他突出特征研究的好处。