MobileViT-XXS — 3D Print Failure Detector
Binary image classifier: normal vs failure (spaghetti / bed detachment). Designed for on-device inference on Raspberry Pi 4 via ONNX Runtime (~200–400 ms/frame).
Labels
| ID | Label |
|---|---|
| 0 | failure |
| 1 | normal |
ONNX Inference (Raspberry Pi)
import onnxruntime as ort
import numpy as np
from PIL import Image
from transformers import MobileViTImageProcessor
processor = MobileViTImageProcessor.from_pretrained("Masamsa/3d-print-failure-mobilevit-xxs")
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
img = Image.open("frame.jpg").convert("RGB")
inputs = processor(images=img, return_tensors="np")
logits = sess.run(["logits"], dict(inputs))[0]
pred = int(np.argmax(logits, axis=-1)[0])
label = {0: "normal", 1: "failure"}[pred]
print(label)
Training Details
- Base:
apple/mobilevit-xx-small(1.3M params) - Image size: 256×256
- Best val macro-F1: 0.9011
- Near-balanced dataset (normal≈3.7K / failure≈3.3K) — standard cross-entropy loss
- Downloads last month
- 61
Model tree for Masamsa/3d-print-failure-mobilevit-xxs
Base model
apple/mobilevit-xx-small