File size: 3,771 Bytes
e22e97f e524a98 d890326 f368616 d890326 e524a98 d890326 e22e97f d890326 e524a98 d890326 a66ae72 d890326 e524a98 d890326 e524a98 d890326 e524a98 d890326 b542292 d890326 a66ae72 d890326 e524a98 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ---
configs:
- config_name: default
data_files:
- split: train
path: metadata.parquet
language:
- en
license: other
size_categories:
- n>1T
task_categories:
- robotics
- other
tags:
- 3d-printing
- gcode
- fdm
- prusaslicer
- manufacturing
dataset_info:
features:
- name: model_id
dtype: string
- name: name
dtype: string
- name: description
dtype: string
- name: tags
sequence: string
- name: printables_category
dtype: string
- name: image_paths
sequence: string
- name: gcode_paths
sequence: string
- name: license
dtype: string
- name: source
dtype: string
- name: shard_file
dtype: string
---
# FDM G-Codes Dataset
A massive, highly-diverse dataset of Fused Deposition Modeling (FDM) G-codes generated directly from Printables.
This dataset is specifically designed for training machine learning models on raw 3D printing manufacturing instructions (G-code). It can be used for tasks like G-code generation, print failure prediction, semantic analysis of toolpaths, and printer-agnostic slice classification.
## Dataset Generation
To ensure a highly robust and diverse set of training data, every original 3D model from the source dataset has been iteratively sliced into **multiple variants** (default: 10 per model) using PrusaSlicer.
The pipeline supports and natively slices `.stl`, `.obj`, `.3mf`, `.step`, and `.amf` files.
For each variant, a heavily randomized configuration profile is generated, shuffling the following parameters:
* **Printer Profiles**: Weighted heavily toward Generic FDM setups, but includes mixed geometry/bed-sizes from Prusa, Creality (Ender), Voron, Anycubic, Bambu, and Artillery.
* **Nozzle Diameters**: Ranging from 0.25mm to 0.8mm.
* **Filament Types**: Plausible temperature and bed profiles for PLA, PETG, ABS, ASA, and TPU.
* **Print Settings**: Randomization of layer heights, perimeters, solid layers, infill density (0-100%), infill patterns (grid, gyroid, honeycomb, cubic, etc.), speeds, and support structures.
This randomization forces downstream ML models to learn the underlying semantics of the G-code rather than overfitting to a specific printer's standard preset.
## Data Structure
The dataset is formatted using WebDataset-style `.tar` shards to allow for efficient streaming of millions of files.
### 1. Parquet Metadata (`metadata.parquet`)
The root metadata file acts as an index. It contains one row per original 3D model, retaining all the original Printables metadata (name, description, tags, category, license). It includes arrays for the relative paths to the images and the sliced variants inside the shards.
### 2. Tar Shards (`data/gcodes_*.tar`)
Inside the tar archives, files are grouped by the original `model_id`:
* `<model_id>/images/*.jpg`: The original preview images from Printables, standardized to **512x512 resolution in JPEG format**.
* `<model_id>/gcode/*.gcode`: The fully sliced G-code file containing the raw toolpaths.
* `<model_id>/gcode/*.settings.json`: A human-readable JSON file storing the randomized settings used to generate the corresponding G-code.
## Usage
Because of the massive scale of this dataset, downloading it entirely before training is likely impractical for most setups. We strongly recommend using [WebDataset](https://github.com/webdataset/webdataset) or Hugging Face's streaming API to stream the tar files dynamically during training.
### License & Attribution
The `.gcode` files inherit the licenses of their parent 3D models. Please refer to the `license` column in the metadata for the specific Creative Commons / Open Source license associated with each model. All models were originally sourced from Printables. |