FDM-gcodes / README.md
kpoc's picture
Update README.md
a66ae72 verified
|
Raw
History Blame Contribute Delete
3.77 kB
metadata
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 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.