sunkaiwen/sketch2stl-parts-tabular
Viewer • Updated • 434 • 103
Binary classifier trained with AutoGluon Tabular on CAD geometric feature data from sunkaiwen/sketch2stl-parts-tabular to predict whether a CAD part is extrudable.
The model is trained on original part geometries combined with filtered single-parent synthetic variants. We report metrics on the held-out test partition (df_test)
and validation partition (df_val). Artifacts include (1) a cloudpickled predictor and (2) a zipped native AutoGluon predictor directory for robust reuse.
extrudable (1 = extrudable, 0 = not_extrudable) autogluon.tabular autogluon_predictor.pkl (cloudpickled predictor) autogluon_predictor_dir.zip (zipped native predictor directory)Use the code below to get started with the model.
import pathlib
import shutil
import zipfile
import huggingface_hub as hf
from autogluon.tabular import TabularPredictor
# Set your Hugging Face model repository ID
REPO = "sunkaiwen/sketch2stl-parts-autogluon-predictor"
ZIPNAME = "autogluon_predictor_dir.zip"
dest = pathlib.Path("hf_download")
dest.mkdir(exist_ok=True)
# Download zipped predictor directory from Hugging Face Hub
zip_path = hf.hf_hub_download(
repo_id=REPO,
filename=ZIPNAME,
repo_type="model",
local_dir=str(dest),
local_dir_use_symlinks=False,
)
# Extract to local folder
extract_dir = dest / "predictor_dir"
if extract_dir.exists():
shutil.rmtree(extract_dir)
extract_dir.mkdir(parents=True, exist_ok=True)
with zipfile.ZipFile(zip_path, "r") as zf:
zf.extractall(str(extract_dir))
# Load the trained predictor
predictor = TabularPredictor.load(str(extract_dir))
# Example usage: Generate predictions on test CAD part features
X_test = df_test[FEATURE_COLUMNS]
preds = predictor.predict(X_test) # Predicted binary label (0 = not_extrudable, 1 = extrudable)
probs = predictor.predict_proba(X_test)[1] # Estimated probability of being extrudable
extrudable"best_quality" (ensembles across boosted trees, kNN, neural nets, etc.) 1.0, Weighted F1 = 1.0 1.0, Weighted F1 = 1.0