2026 · AI / ML / Computer Vision
Image-to-CadQuery
A research prototype that generates editable CadQuery code from a 2D part image.
- Part image
- CadQuery code generation
- Rendered geometry and IoU
Research prototypeGitHub ↗
Problem
A picture of a part does not give engineers editable dimensions or a parametric model.
My role
Built the training and evaluation pipeline and implemented additional model variants.
Approach
- Train a ResNet-18 and Transformer baseline to generate CadQuery tokens.
- Implement spatial cross-attention and a CLIP vision-prefix model as additional architectures.
- Execute generated code and compare the resulting mesh with the target using intersection over union (IoU).
Results
- The original baseline reported roughly 50% valid syntax and 0.78 mean IoU on only two test samples.
- The additional models and reinforcement-learning code are unit-tested and still need full training runs.
Stack
- Python
- PyTorch
- CadQuery
- CLIP
- pytest