Abstract
Packing irregular shapes into a container with minimal wasted space is a classic NP-hard problem in operations research, critical for industries ranging from garment manufacturing to 3D texture mapping. GFPack++ introduces a novel diffusion-based framework that treats packing as a generative process. By learning a continuous "gradient field" of movement and integrating advanced attention mechanisms, GFPack++ achieves significantly higher space utilization and is an order of magnitude faster than previous diffusion-based packing methods. This approach supports continuous rotation and arbitrary container boundaries, overcoming major limitations of prior machine learning models.
Introduction
The challenge of 2D irregular packing involves arranging complex polygons within a boundary to maximize density. Traditional numerical solvers are often too computationally expensive for real-time applications, while early machine learning attempts struggled with three primary issues: restricted rotation (often limited to 90-degree increments), difficulty in representing complex geometric relationships, and a reliance on simple rectangular containers.
GFPack++ addresses these gaps by modeling the packing process as a simultaneous flow of all objects toward an optimal layout. This "velocity field" approach prevents the local optima common in sequential, greedy placement algorithms.
Methodology
GFPack++ is built upon a score-based diffusion model that iteratively refines the positions and orientations of polygons. The framework introduces several key technical innovations to enhance geometric reasoning and spatial awareness.
Attention-based Encoding
Unlike previous models that used rigid, distance-based graphs, GFPack++ employs a Transformer-based architecture for Relationship Encoding. This allows the model to dynamically learn spatial and geometric dependencies between all polygons and the container boundaries. For Geometry Encoding, the model utilizes a Graph Convolutional Network (GCN) paired with attention pooling to identify critical features, such as sharp corners or deep curves, that are essential for tight packing.
Continuous Rotation and Weighted Learning
To achieve tighter fits, GFPack++ represents orientation using sine and cosine components, enabling the prediction of any rotation angle. Furthermore, the authors implemented Utilization-Weighted Learning. By using a sigmoid-based weighting function during training, the model prioritizes learning from the highest-utilization examples, effectively shifting its output distribution toward more efficient layouts.
Experimental Results
The researchers evaluated GFPack++ across diverse datasets, including industrial garment shapes, dental models, and complex UV patches (Atlas). They also introduced new "Puzzle" datasets featuring both square and arbitrary boundaries.
- Superior Utilization: GFPack++ outperformed established baselines like XAtlas and NFP by 4% to 32% across various datasets.
- Efficiency: The model is one order of magnitude faster than the previous state-of-the-art diffusion-based packing method.
- Generalization: In tests involving irregular, non-rectangular containers, the model achieved an Intersection over Union (IoU) of up to 94.91%, demonstrating robust generalization to arbitrary boundaries.
Conclusion and Future Work
GFPack++ represents a significant advancement in neural packing, combining the generative power of diffusion models with the representational flexibility of attention mechanisms. While highly effective in 2D, extending this framework to 3D irregular packing remains a primary objective for future research. Additionally, moving toward self-supervised learning to reduce reliance on "teacher" algorithms could further enhance the model's autonomy and performance in real-time industrial settings.
Summary updated