CADENA

CADENA reconstructs a 3D mesh as a parametric CAD program. Instead of emitting the whole program in one pass, it grows the operation sequence one step at a time, executing the partial program and comparing the target with the currently built geometry before choosing the next operation.

Checkpoints

This repository holds both training stages as subfolders.

Subfolder Stage
sft Supervised, final checkpoint of the second stage
rl Reinforcement learning against executed geometry — the paper's CADENA-RL
from transformers import AutoModelForVision2Seq, AutoProcessor

model = AutoModelForVision2Seq.from_pretrained("kulibinai/cadena", subfolder="rl")
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct")

Or fetch one stage only:

hf download kulibinai/cadena --include 'rl/*' --local-dir ./ckpt

Both are Qwen2-VL-2B policies, 4.4 GB each in bfloat16.

Input

The model observes eight renders of the target tiled into a single image: six axis-aligned views and two isometric ones. The target occupies the green channel and the geometry built so far the red channel, so the residual — what is still missing — is what the policy actually reads.

Results

CADENA-RL outperforms prior methods on DeepCAD, Fusion 360, MCB and CADENA-Bench. The margin grows with geometric complexity: it is modest on sketch–extrude corpora and substantially larger on real mechanical parts. Reinforcement learning against executed geometry improves reconstruction accuracy while lowering the invalid rate, since an operation that fails to build receives no reward.

See the paper for the full tables.

Usage

Inference is stepwise and needs the DSL runtime, so use the repository rather than a bare generate call:

git clone https://github.com/zhemdi/cadena && cd cadena
pip install -r requirements.txt
MODEL_PATH=./ckpt/rl DATASET_PATH=data/stepwise_hf/wrapped/meshes ./inference/run.sh

Defaults reproduce the paper's main-results setting: greedy decoding, an operation budget of 20, E = 12 candidates per operation, and the returned program is the prefix with the highest IoU against the target.

Limitations

  • Programs are CadQuery, so CADENA inherits its limitations; in corner cases a construction tree valid in CadQuery does not transfer to industrial CAD.
  • Accuracy is uneven across part families — revolved and patterned geometry (gears, bearings, springs, fasteners) remains the hardest.

License

MIT.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kulibinai/cadena

Base model

Qwen/Qwen2-VL-2B
Finetuned
(368)
this model

Space using kulibinai/cadena 1

Paper for kulibinai/cadena