2D irregular packing is a classic combinatorial optimization problem with various applications, such as material utilization and texture atlas generation. This NP-hard problem requires efficient algorithms to optimize space utilization. Conventional numerical methods suffer from slow convergence and high computational cost. Existing learning-based methods, such as the score-based diffusion model, also have limitations, such as no rotation support, frequent collisions, and poor adaptability to arbitrary boundaries, and slow inferring. The difficulty of learning from teacher packing is to capture the complex geometric relationships among packing examples, which include the spatial (position, orientation) relationships of objects, their geometric features, and container boundary conditions. Representing these relationships in latent space is challenging. We propose GFPack++, an attention-based gradient field learning approach that addresses this challenge. It consists of two pivotal strategies: \emph{attention-based geometry encoding} for effective feature encoding and \emph{attention-based relation encoding} for learning complex relationships. We investigate the utilization distribution between the teacher and inference data and design a weighting function to prioritize tighter teacher data during training, enhancing learning effectiveness. Our diffusion model supports continuous rotation and outperforms existing methods on various datasets. We achieve higher space utilization over several widely used baselines, one-order faster than the previous diffusion-based method, and promising generalization for arbitrary boundaries. We plan to release our source code and datasets to support further research in this direction.
翻译:二维不规则排样是一个经典的组合优化问题,在材料利用率、纹理图集生成等领域具有广泛应用。这一NP难问题需要高效算法以优化空间利用率。传统数值方法存在收敛速度慢、计算成本高的问题。现有的基于学习的方法(如基于分数的扩散模型)也存在局限,例如不支持旋转、频繁发生碰撞、对任意边界适应能力差以及推理速度慢。从教师排样中学习的难点在于捕捉排样样本间复杂的几何关系,这些关系包括物体的空间(位置、朝向)关系、几何特征以及容器边界条件。在隐空间中表示这些关系具有挑战性。我们提出了GFPack++,一种基于注意力的梯度场学习方法以应对这一挑战。该方法包含两个关键策略:用于有效特征编码的\emph{基于注意力的几何编码},以及用于学习复杂关系的\emph{基于注意力的关系编码}。我们研究了教师数据与推理数据之间的利用率分布,并设计了一个加权函数以在训练过程中优先学习更紧凑的教师数据,从而提升学习效果。我们的扩散模型支持连续旋转,并在多个数据集上超越了现有方法。相较于若干广泛使用的基线方法,我们实现了更高的空间利用率,推理速度比之前基于扩散的方法快一个数量级,并对任意边界展现出良好的泛化能力。我们计划开源代码与数据集,以支持该方向的进一步研究。