Deep learning for image processing typically treats input imagery as pixels in some color space. This paper proposes instead to learn from program traces of procedural fragment shaders -- programs that generate images. At each pixel, we collect the intermediate values computed at program execution, and these data form the input to the learned model. We investigate this learning task for a variety of applications: our model can learn to predict a low-noise output image from shader programs that exhibit sampling noise; this model can also learn from a simplified shader program that approximates the reference solution with less computation, as well as learn the output of postprocessing filters like defocus blur and edge-aware sharpening. Finally we show that the idea of learning from program traces can even be applied to non-imagery simulations of flocks of boids. Our experiments on a variety of shaders show quantitatively and qualitatively that models learned from program traces outperform baseline models learned from RGB color augmented with hand-picked shader-specific features like normals, depth, and diffuse and specular color.
翻译:用于图像处理的深度学习通常将输入图像作为某种颜色空间的像素处理。 本文建议取而代之的是学习程序碎片阴影( 产生图像的程序) 的程序痕迹。 在每一个像素中, 我们收集程序执行时计算出来的中间值, 这些数据形成对所学模型的输入。 我们为各种应用调查了这一学习任务: 我们的模型可以学习从显示抽样噪音的透镜程序中预测低噪音输出图像; 这个模型也可以从一个简化的遮光程序中学习, 它能以较少的计算来接近参考解决方案, 并且学习后处理过滤器的输出, 比如焦亮的模糊和边缘敏锐的放大。 最后, 我们显示, 从程序轨迹中学习的想法甚至可以应用到非模拟的野鸟群的模拟。 我们在各种遮光器上进行的实验可以以定量和定性的方式显示, 从程序中学习的模型可以追溯出以普通、 深度、 扩散和 光谱颜色 等手选的变色特性所强化的 RGB 基模型。