Inference is the step where a trained model looks at a recording and returns a class. Deepsona runs models in the ONNX format, which is the common export target of PyTorch, TensorFlow, scikit-learn and ML.NET — so a model trained by your data-science team can be dropped into Deepsona without conversion work or a matching framework installation.
| Item | Support |
|---|---|
| Model file | .onnx — classification and regression graphs |
| Input | A single float tensor; 2-D, 3-D and 4-D shapes are handled, dynamic dimensions included |
| Output | First output tensor, read as a flat list of per-class scores |
| Audio input | WAV, HEAD HDF (mono or multi-channel) |
| Compute | CPU by default; DirectML GPU acceleration optional |
batch_size dimension are recognised and handled — you do not
need to re-export with a fixed batch size.
In Step 1 — Load Model, browse to the .onnx file. As soon as it loads, the
status line reports the detected signature, for example:
Input: [1,1,16000] -> Output: [1,10] (10 classes) [batch]
Read it as: the model wants one batch of one channel with 16000 samples, and answers with 10 class scores. Use this to sanity-check two things before you go further — that the class count matches the number of labels you are about to enter, and that the expected input length is compatible with your recordings.
Measurement data rarely has exactly the shape a model was exported with. Deepsona adapts the data to the model instead of asking you to reshape anything, following the model's declared input shape:
| Declared input | How your data is mapped |
|---|---|
[batch, channels, samples] | Channels are used as recorded; each channel is truncated or zero-padded to the required length |
[batch, samples] | Channels are mixed down to mono, then truncated or zero-padded |
[batch, 1, time, frequency] | A spectrogram (colour map) is resampled by bilinear interpolation to the required time × frequency grid |
| 1-D feature curve | A level-vs-time or feature-vs-time curve is passed through, truncated or padded to length |
| Anything else | Data is flattened into the required element count |
Dynamic dimensions (declared as unknown in the model) are filled with the actual data dimensions: the leading dimension becomes the batch, the middle one the channel count, and the trailing one the sample count.
If the model was trained on normalised inputs, apply the same normalisation at inference time. Three modes are available:
| Mode | Transform | Use when |
|---|---|---|
| None | Values passed through unchanged | The model was trained on raw physical values |
| Min-Max | (x − min) / (max − min) | Training scaled each recording into a 0…1 range |
| Standard | (x − mean) / (L2 / √N) | Training used zero-mean, unit-scale inputs |
Normalisation is computed and applied per channel. Choosing a mode that differs from the one used in training is one of the most common causes of a model that "works in Python but not here".
Tick GPU (DirectML) in Step 1. DirectML works with any DirectX 12 capable graphics card, so no vendor-specific toolkit installation is required. If the device is unavailable, the model quietly runs on the CPU instead — inference never fails just because a GPU is missing.
Models output raw numbers (logits). Post-processing turns them into readable confidences. The options in Step 3 — Settings are applied in a fixed order: Sigmoid → Temperature → Winner Takes All → SoftMax.
| Option | Effect | Typical use |
|---|---|---|
| Sigmoid | 1 / (1 + e−x) | Multi-label models, where several classes may be true at once |
| SoftMax (ReLU) | max(0, x) / Σ max(0, x) | Default. Normalises positive scores to sum to 100 % |
| Winner Takes All | One-hot at the highest score | Hard pass/fail output, no confidence gradation wanted |
| Temperature | Scores divided by T (0.1…5.0) | T < 1 sharpens the distribution, T > 1 softens an over-confident model |
| Top-K | Keeps only the K highest classes | Models with hundreds of classes; 0 shows all |
Enter labels comma-separated in the same order as the model's output neurons, for example
OK, Whine, Knock, Rub. If you supply fewer labels than the model has classes, the remainder are
filled in as Class_4, Class_5… If you supply none, all classes are numbered.
Labels affect display and CSV export only; they never alter the prediction.
A single classification returns four things:
The shape of the per-class list is the diagnostic information. A clean single peak means the model is confident. Two classes close together mean the recording sits on a boundary and deserves a listen. A flat distribution across all classes usually means the input does not resemble the training data at all — check the recording length, channel, and normalisation mode.
Step 5 — Batch Classify applies the loaded model to a whole file list. Add WAV or HDF
files, press Run Batch and follow the progress bar; each row reports file name, predicted
label, confidence and status. Files that cannot be read are marked in their own row and do not stop the run.
Export CSV writes the columns File, PredictedLabel, Confidence, Status, ready for
a spreadsheet or a quality database.
The Model Zoo is a catalogue of well-known pre-trained acoustic models, kept outside the installation package
so the software stays small. Models live in %LocalAppData%\Deepsona\Models; where a download source
is configured they can be fetched on demand with a progress indication, otherwise place the .onnx
file into that folder manually and it is picked up.
| Model | Size | Purpose |
|---|---|---|
| PANNs-CNN14 | ~80 MB | General sound event classification, 527 classes |
| YAMNet | ~14 MB | Lightweight sound event classifier, 521 classes — good for quick screening |
| VGGish | ~280 MB | Produces 128-dimensional embeddings rather than classes |
Embeddings are a compact numerical fingerprint of a sound. They are useful when you have very few labels: compare two recordings by the cosine similarity of their embeddings to search an archive "by sound", or use embeddings as the input features of a small classifier trained on a handful of samples. The embedding front end uses a standardised log-Mel spectrogram (64 Mel bands, 25 ms frames, 10 ms hop, 125…7500 Hz), which matches the convention these public models expect.
AI classification is also available as a regular analysis node, so it can sit in a pipeline next to FFT, loudness and order analysis and be applied to a whole pool of files. The node accepts these parameters:
| Parameter | Meaning | Default |
|---|---|---|
OnnxModelPath | Path to the model file (required) | — |
ClassLabels | Comma-separated class names | numbered |
UseSigmoid | Apply sigmoid | false |
UseSoftMax | Apply SoftMax | true |
UseWTA | Apply Winner Takes All | false |
Normalization | None / MinMax / Standard | None |
The node produces a per-class score curve, a single value carrying the winning label and its confidence, and a log listing every class with both its post-processed and raw score — all of which can be picked up by the report tools.
| Symptom | Likely cause |
|---|---|
| All classes get almost the same score | Input does not resemble training data — check recording length, channel selection and normalisation mode |
| Model always answers with the same class | Training set was heavily imbalanced, or the wrong label order was entered |
| Confidence is always 100 % | Winner Takes All is enabled — switch it off to see the gradation |
| Class count does not match the labels | Read the signature line in Step 1 and align the label list with it |
| Results differ from the training framework | Normalisation mode or input length differs from the training front end |
| GPU seems to have no effect | No DirectX 12 device available; the CPU path was used silently |
© 2026 Deepsona. All Rights Reserved.