We propose a general framework for differentiating shapes represented in binary images with respect to their parameters. This framework functions as an automatic differentiation tool for shape parameters, generating both binary density maps for optical simulations and computing gradients when the simulation provides a gradient of the density map. Our algorithm enables robust gradient computation that is insensitive to the image's pixel resolution and is compatible with all density-based simulation methods. We demonstrate the accuracy, effectiveness, and generalizability of our differential shape algorithm using photonic designs with different shape parametrizations across several differentiable optical solvers. We also demonstrate a substantial reduction in optimization time using our gradient-based shape optimization framework compared to traditional black-box optimization methods.
翻译:我们提出了一种通用框架,用于对以二值图像表示的形状进行参数微分。该框架作为形状参数的自动微分工具,既能生成用于光学仿真的二值密度图,又能在仿真提供密度图梯度时计算形状参数梯度。我们的算法实现了稳健的梯度计算,其对图像像素分辨率不敏感,且兼容所有基于密度的仿真方法。我们通过在不同可微分光学求解器中使用多种形状参数化方案的光子设计,验证了微分形状算法的准确性、有效性和普适性。与传统黑盒优化方法相比,基于梯度的形状优化框架显著缩短了优化时间。