twarner/dcode-sd-gcode-v3
Text-to-Image
•
Updated
•
64
•
1
image
imagewidth (px) 120
8.83k
| label
class label 103
classes |
|---|---|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
0n01440764
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
|
1n01518878
|
A dataset of ImageNet-Sketch images paired with generated G-code for training text-to-gcode diffusion models.
This dataset enables training models that convert text descriptions directly into G-code for CNC machines, plotters, and polargraph drawing robots.
| Feature | Value |
|---|---|
| Source Images | ImageNet-Sketch |
| Classes | 1,000 ImageNet categories |
| Images | ~50,000 black/white sketches |
| G-code Files | ~200,000 (4 algorithms × images) |
| Algorithms | spiral, crosshatch, squares, trace |
images/
n01440764/ # ImageNet synset ID
ILSVRC2012_val_00000293.JPEG
...
n01443537/
...
gcode/
n01440764/
spiral/
ILSVRC2012_val_00000293_spiral_0.gcode
ILSVRC2012_val_00000293_spiral_1.gcode
crosshatch/
...
squares/
...
trace/
...
| Algorithm | Description |
|---|---|
| spiral | Concentric spiral from center, density varies with brightness |
| crosshatch | Multi-angle hatching lines at configurable angles |
| squares | Concentric squares sized by local brightness |
| trace | Binary edge detection with scan-line tracing |
from datasets import load_dataset
# Load the dataset
ds = load_dataset("twarner/dcode-imagenet-sketch")
# Access image and corresponding gcode
sample = ds["train"][0]
print(sample["image_path"])
print(sample["gcode_path"])
print(sample["caption"]) # "a sketch of a goldfish"
This dataset was used to train dcode-sd-gcode-v3, an end-to-end text-to-gcode diffusion model.
Full project documentation, hardware build guide, and interactive demo:
🔗 teddywarner.org/Projects/Polargraph/#dcode
@misc{dcode2024,
author = {Teddy Warner},
title = {dcode: Text-to-Gcode Diffusion Model},
year = {2026},
url = {https://teddywarner.org/Projects/Polargraph/#dcode}
}
MIT License