← All workProject 01 of 05

JEPA Neuropathy Classifier

ML pipeline in Python that classifies diabetic peripheral neuropathy from plantar pressure data, using self-supervised (JEPA) features plus clinical data in an SVM classifier.

Stack
Python · Transformer (JEPA pretraining) · scikit-learn SVM · XGBoost
Links

Problem

Can a model learn useful features from foot pressure maps without labels, then help tell apart walking events with and without diabetic peripheral neuropathy?

Approach

Each step is stored as four pressure maps. I crop them to the foot, resize them to 39×20, and rotate the foot upright. A transformer encoder learns from the maps with no labels (JEPA: it predicts hidden patches from the visible ones). Its output, plus clinical features, goes into an SVM or XGBoost model. Predictions are averaged per patient. Evaluation uses 5-fold cross-validation grouped by patient, so the same person is never in both training and test.

  • Context: the encoder sees these
  • Target: predicted, not seen

Masking strategy

Half of the patches (32 of 65) are picked at random as targets.

The context encoder only sees the context patches and predicts what the target patches look like. The answers come from an EMA copy of the encoder. No labels are used.

One 39×20 pressure map split into 3×4 patches (13×5 = 65). Same grid, regions and ratios as the code. The foot shape and values are made up.
  1. Four pressure maps per walking event
  2. Crop to contact region, resize to 39×20, rotate foot axis vertical
  3. Z-score per fold (fit on train only)
  4. Transformer encoder pretrained with JEPA (3×4 patches, EMA target encoder, no labels)
  5. Mean-pooled embeddings + tabular features
  6. RBF SVM / XGBoost classifier
  7. Per-patient averaging

What I’d do differently

The SVM uses fixed settings (C = 1.0). I’d add nested cross-validation so they’re tuned inside each training fold without touching the test patients.

Keyboard

This site moves like Vim. Keys work anywhere except while typing in a field.

Move

j
Next section (3j skips three)
k
Previous section
gg
Top of the page (3gg = section 3)
G
Bottom of the page (3G = section 3)
h
Previous project
l
Next project
Enter
Open the focused project

Find

/
Search this page
n
Next match
N
Previous match

Do

:
Command line (Tab completes)
yy
Copy this page’s URL
?
Show this keymap
Esc
Clear keys, search and messages

Commands :work :experience :education :beyond :certificates :contact :now :cv :email :github :linkedin :help :q