No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-22 20:00:22 +00:00
1000 readme and cleanup 2026-11-22 19:53:07 +00:00
1000_material added models 2026-11-22 20:17:37 +01:00
2000 readme and cleanup 2026-11-22 19:53:07 +00:00
2000_material added models 2026-11-22 20:17:37 +01:00
orgdata readme and cleanup 2026-11-22 19:53:07 +00:00
orgdata_material added models 2026-11-22 20:17:37 +01:00
.gitignore readme and cleanup 2026-11-22 19:53:07 +00:00
README.md Update README.md 2026-11-22 20:00:22 +00:00

VNA-Master models

Trained checkpoints for the master's-thesis microwave material-classification experiments. The repository contains 24 models: six dataset variants, each with four architectures.

The training and evaluation scans are exactly the ones in the published Hugging Face dataset; no additional measurements, relabelling or excluded samples were used. All models were trained with the code repository above.

Directory layout

Each top-level directory is one dataset variant. Its name encodes the label column and the synthetic target:

Folder Label column Classes Meaning
orgdata trash_type 11 Original data, no synthetic rows.
1000 trash_type 11 Augmentation target of 1000 rows per class.
2000 trash_type 11 Augmentation target of 2000 rows per class.
orgdata_material material_type 5 Original data, no synthetic rows.
1000_material material_type 5 Augmentation target of 1000 rows per class.
2000_material material_type 5 Augmentation target of 2000 rows per class.

A folder without a suffix is the fine trash type task. A folder ending in _material is the coarse material type task. The number is the per-class target used by the augmentation; augmentation only adds rows to classes below the target, never removes measured rows, and leaves classes already above the target unchanged.

Inside every variant there are four model directories plus eval_results.csv:

Entry Content
Feature_MLP/ MLP on the 65-dimensional feature vector.
PCA-MLP/ PCA projection of the feature vector followed by an MLP.
Autoencoder-Classifier/ Feature autoencoder plus classifier head.
Hybrid_CNN-MLP/ CNN on the spectrum fused with the feature MLP.
eval_results.csv One row per evaluation scan and model (440 rows per variant).

Each model directory contains:

  • model.pt – checkpoint with weights, normalisation statistics, label names and the training configuration;
  • params.json – configuration, split sizes and provenance;
  • report.txt – held-out test metrics, per-class table and confusion matrix;
  • history.csv – epoch-wise training history;
  • curve.png – loss/accuracy curves.

Dataset variants and splits

Folder Train Val Test Synthetic target
orgdata 6449 809 803 –
1000 8992 812 814 1000/class
2000 17600 859 795 2000/class
orgdata_material 6449 807 805 –
1000_material 6942 810 809 1000/class
2000_material 8841 811 808 2000/class

Train, validation and test splits are stratified on the original scans. Synthetic rows are added to the training split only; validation and test contain measured rows only.

Training configuration

Shared settings across the architectures: 65 input features, batch size 32, dropout 0.3, Adam with learning rate 0.001 and weight decay 0.0001, at most 60 epochs with early stopping (patience 12), and per-class loss weights computed from the class imbalance when one remains after augmentation. The MLP uses hidden layers 128,64; the autoencoder uses latent dimension 32 and 40 pretraining epochs; the hybrid model uses CNN channels 16,32 and a 64-unit MLP head. PCA-MLP keeps the components that explain the configured variance threshold. Training ran on Apple MPS; checkpoints load on CPU through the provided code.

Evaluation

report.txt reports the in-distribution held-out test split. Because that split contains repeated scans of the same samples, it overstates generalisation; use it as an optimisation diagnostic, not as the head-line result.

The transfer numbers are in eval_results.csv. Every model of a variant is scored on the same 110-scan evaluation set. For trash_type the set contains 10 scans per subtype; for material_type it contains 40 plastic, 30 cardboard, 20 composite, 10 glass and 10 metal scans. Accuracy in percent:

Variant Feature MLP PCA-MLP Autoencoder Hybrid CNN-MLP
orgdata 23.6 35.5 30.9 23.6
1000 23.6 40.0 17.3 24.5
2000 31.8 37.3 23.6 28.2
orgdata_material 45.5 48.2 60.0 46.4
1000_material 42.7 45.5 50.9 43.6
2000_material 44.5 49.1 32.7 42.7

These values are the ones discussed in the thesis: the coarse material task is easier than the fine trash-type task, and more synthetic data does not improve accuracy monotonically.

Loading a model

from train_frontend import infer

ckpt = infer.load_checkpoint("orgdata/Feature_MLP/model.pt")
probs = infer.predict_many(ckpt, features, spectra)

features are rows built by train_frontend.data.feature_vector; spectra are the corresponding |S11| dB arrays. The checkpoint stores the label names and the preprocessing statistics, so no separate scaler is needed. The same checkpoints can be selected in the training frontend's Eval tab.