clallier/nesting-tasks-2d
Nesting Tasks Dataset for 2D Nesting Efficiency Estimation This is the official Hugging Face Hub version of the 2D Nesting Tasks Dataset originally published on Zenodo (DOI: 10.5281/zenodo.7030786), in 2022, during the my PhD research. π₯ Authors & Affiliations Corentin Lallier (University of Bordeaux / @ Lectra) β π Google Scholar | πΌ LinkedIn | π» GitHub | π ORCID Laurent VΓ©zard (Data Science Manager @ Lectra) β π Google Scholar | πΌ LinkedIn Bruno Pinaudβ¦ See the full description on the dataset page: https://huggingface.co/datasets/clallier/nesting-tasks-2d.
Nesting Tasks Dataset for 2D Nesting Efficiency Estimation
This is the official Hugging Face Hub version of the 2D Nesting Tasks Dataset originally published on Zenodo (DOI: 10.5281/zenodo.7030786), in 2022, during the my PhD research.
π₯ Authors & Affiliations
- Corentin Lallier (University of Bordeaux / @ Lectra) β π Google Scholar | πΌ LinkedIn | π» GitHub | π ORCID
- Laurent VΓ©zard (Data Science Manager @ Lectra) β π Google Scholar | πΌ LinkedIn
- Bruno Pinaud (Associate Professor @ University of Bordeaux / LaBRI) β π« LaBRI Page | π ORCID
- Guillaume Blin (Professor @ University of Bordeaux / LaBRI) β π« LaBRI Page | π ORCID
This dataset is designed for training machine learning surrogate models (such as Graph Neural Networks) to estimate 2D irregular nesting efficiency (material utilization) without running computationally expensive operations research packing heuristics.
π Dataset Summary
2D irregular cutting and packing (nesting) is a critical optimization problem in industries like textiles, apparel, and sheet-metal manufacturing. Traditionally, calculating the layout and material utilization of a set of irregular polygons requires running complex nesting heuristics, which can take seconds to minutes per run.
This dataset provides 100,000 unique nesting tasks containing high-level task descriptions, irregular polygon shapes, constraints, and target nesting efficiencies. This enables the training of neural networks to predict material utilization instantly, facilitating rapid layout evaluations.
𧬠Data Schema & Description
The dataset is divided into four modern, secure, and highly optimized Apache Parquet files:
1. tasks.parquet (Nesting high-level descriptors)
Contains global metrics and metadata for each nesting task.
2. parts.parquet (Description of parts to be nested)
Describes the specific instances of parts allocated to each nesting task.
3. shapes.parquet (Coordinate shapes of irregular polygons)
Detailed geometry coordinate boundaries for all irregular parts.
4. constraints.parquet (Spacing, rotation, and alignment parameters)
Geometric spacing boundaries and physical placement constraints.
π How to Load and Explore the Dataset
π Exploring Directly on Hugging Face Data Studio / SQL Explorer
You can run SQL queries directly on your browser using DuckDB over the hosted Parquet tables:
- Query the train dataset split from tasks table
SELECT
tasks_index,
duration,
efficiency,
sheet_width,
sheet_length,
sheet_type
FROM tasks
WHERE is_train = true
LIMIT 500;- Query parts and shapes geometry for a specific task:
SELECT
p.tasks_index,
p.part_id,
p.shape_hash,
s.raw AS shape_vertices,
s.sizes AS vertex_sizes
FROM
parts p
JOIN
shapes s ON p.shape_hash = s.shape_hash
WHERE
p.tasks_index = 228
ORDER BY
p.part_id ASC;- Query constraints parameters for a specific task:
SELECT
tasks_index,
type AS constraint_type,
parts_1,
parts_2,
y_min,
y_max,
r1_start,
r1_end,
is_frozen
FROM
constraints
WHERE
tasks_index = 228;π Loading via the Hugging Face Datasets Library
You can also download or stream these relational tables directly from the Hugging Face Hub using their specific dataset configuration names:
from datasets import load_dataset
# Load individual tables using configuration subsets
tasks_ds = load_dataset("clallier/nesting-tasks-2d", name="tasks")
parts_ds = load_dataset("clallier/nesting-tasks-2d", name="parts")
shapes_ds = load_dataset("clallier/nesting-tasks-2d", name="shapes")
constraints_ds = load_dataset("clallier/nesting-tasks-2d", name="constraints")
print(tasks_ds)π Loading via Pandas
Since the dataset is stored in standard Apache Parquet format, loading takes a single line of python code:
import pandas as pd
# Load the high-level nesting tasks and labels
tasks_df = pd.read_parquet('tasks.parquet')
# Load corresponding geometric parts
parts_df = pd.read_parquet('parts.parquet')
# Load irregular polygon shape definitions
shapes_df = pd.read_parquet('shapes.parquet')
# Load spacing and alignment constraints
constraints_df = pd.read_parquet('constraints.parquet')
# Filter splits using the pre-defined boolean masks in tasks.parquet
train_df = tasks_df[tasks_df['is_train']]
val_df = tasks_df[tasks_df['is_val']]
test_df = tasks_df[tasks_df['is_test']]
print(f"Loaded {len(tasks_df)} irregular nesting tasks:")
print(f" Train instances : {len(train_df)}")
print(f" Validation instances : {len(val_df)}")
print(f" Test instances : {len(test_df)}")π οΈ Handling Missing Values (Nulls)
In the binary Apache Parquet format, missing optional parameters (such as unassigned x_offset or y_min values in constraints.parquet) are stored natively as `NULL` slots using Parquet's definition levels.
Different programming languages and frameworks load these binary NULLs into their own native type-safe representations:
- Python (Pandas):
- Native numerical columns (like
x_offsetof typefloat64) represent missing values as `NaN` (float representation). - Object or list columns (like
y_minof typeobject) represent missing values as `None`. - Tip: You can check for both formats simultaneously using a single call to
df.isna()ordf.isnull(). - Rust (Polars / Arrow):
- Parsed directly into native, type-safe optional wrappers: `Option<f64>` for float parameters and `Option<Vec<f64>>` for geometric coordinate lists.
- C++ (Arrow):
- Represented as null slots in the Arrow array validity bitmap (
IsValid(index) == false).
π Citation & Credits
If you use this dataset in your research or industrial applications, please cite the original Zenodo record:
@dataset{lallier2022nesting,
author = {Lallier, Corentin and V{\'e}zard, Laurent and Pinaud, Bruno and Blin, Guillaume},
title = {Nesting tasks dataset for 2d-nesting efficiency estimation},
month = aug,
year = 2022,
publisher = {Zenodo},
version = {1.1.0},
doi = {10.5281/zenodo.7030786},
url = {https://doi.org/10.5281/zenodo.7030786}
}