← All projects

Science

ML and MLOps

3D shape classifier with data versioning, experiment tracking and CI-gated deployment.

Done Sprint S8+S16 · 13 points
In short, no jargon for non-developersRead the summaryClose
What it is
An artificial intelligence that recognises the shape of a 3D object (cube, sphere, cylinder…), trained on thousands of examples.
What it is for
The principle of automatic recognition, applied to 3D shapes: sorting parts, recognising scanned objects.
What it shows
The whole cycle of an artificial intelligence project: data, training, measured accuracy (over 95 %) and controlled release.

Extends the 3D CNN from my PhD

Source code

How the pieces fit together

Diagram: DVC pipeline → Data (generates) ; Data → Models (train) ; Models → MLflow ; Models → ONNX (checked export) ; ONNX → Python API ; DVC pipeline → Project page (metrics, matrices). generates train checked export metrics, matrices DVC pipeline params.yaml, dvc.lock Data 6 shapes, 512 points Models scikit-learn, PyTorch MLflow local SQLite store ONNX pointnet.onnx, 300 KB Python API POST /v1/mesh/classify Project page results read at build

Results

Measured on 600 test point clouds (100 per class), never seen in training; recomputed by CI on every change to the project.

ModelAccuracyMacro F1Training (CPU)
Baseline: invariant descriptors + boosting (scikit-learn)97.2 %0.97133 s
PointNet (PyTorch)95.2 %0.951259 s
PointNet exported to ONNX (served by the API)95.2 %––

CI fails if the best accuracy, or the exported model's, drops below 90.0 %.

Confusion matrix, baseline
True class \ predictedspheretorusboxcylinderconecapsule
sphere10000000
torus01000000
box0089911
cylinder0049402
cone00001000
capsule00000100
Confusion matrix, PointNet
True class \ predictedspheretorusboxcylinderconecapsule
sphere10000000
torus01000000
box00881101
cylinder00128305
cone00001000
capsule00000100

Rows: the true class; columns: the predicted class; the diagonal counts the right answers. Nearly all errors come from boxes and cylinders being confused.

Tech stack

  • PyTorch
  • scikit-learn
  • DVC
  • MLflow
  • ONNX
  • GitHub Actions

Who does what

PyTorch
Trains the PointNet, a network that classifies a point cloud.
scikit-learn
The baseline: rotation-invariant descriptors and boosting, which beats the network here (97.2% against 95.2%).
DVC
Describes the pipeline (data, training, export, check) so that it replays identically; the data stays out of git.
MLflow
Keeps each training run's parameters, metrics and loss curve.
ONNX
The PointNet's export format, checked identical to PyTorch, which the API serves without PyTorch.
GitHub Actions
Replays the pipeline in CI and fails if accuracy drops below 90%.

Definition of Done

  • Code reviewed, diff by diff
  • Unit and integration tests green
  • Green CI on Linux, Windows and macOS when compiled
  • README, REVIEW.md and DECISIONS.md up to date
  • Texts in French and English
  • Demo deployed and tested on mobile