image2gcode
Image2Gcode: image → G-code (2D / 2.5D)
Paper: Z. Wang, Y. Jadhav, P. Pak, A. Barati Farimani, Image2Gcode: Image-to-G-code generation for additive manufacturing using diffusion-transformer model, Additive Manufacturing Letters 17 (2026) 100374.
What's bundled. The paper's preprocessing, keypoint representation, post-processing and validation are reproduced exactly. The trained DDPM (DinoV2 + 1-D U-Net) is available from the authors on request. In its place, generate is a deterministic perimeter-plus-infill generator that emits the same keypoint and G-code format, so model samples drop in later (references/ddpm_hook.md). Tell the user which generator produced their toolpath.
Scope matches the paper: parts described by one cross-section, or a few layer-wise consistent ones (plates, brackets, gaskets, coasters, 2.5D extrusions). For full 3-D parts, use CAD (parametric-part-cad) and a slicer.
Setup: pip install opencv-python-headless shapely numpy matplotlib. I = scripts/i2g.py.