Skip to main content

Reusing Existing Models

Overview

You do not always need to train a model from scratch. When you already have a trained model, Clarity lets you build on it instead of starting over. This is useful when:

  • More data arrives for the same classes you already trained on
  • The class list changes — classes are added, removed, merged, split, or replaced

Reusing an existing model is often faster than retraining from scratch, and in many cases delivers similar or better quality.

Choosing a Starting Point

Before you train, choose how the model should start:

Starting pointWhen to use
Train from scratchNo prior model exists, or you want a clean baseline with no inherited weights
Resume trainingYou have a prior model and the same classes as your new dataset — only the data changed
Transfer learningYou have a prior model but the class list changed (added, removed, merged, split, or replaced)

If you are unsure and the class list is unchanged, resume training is the default choice.

Resume Training

Resume training continues an existing model on new or updated data. The model keeps everything it already learned and trains further on the selected dataset.

When to use

  • You trained a model on partial data and the full dataset is now available
  • You collected more samples for the same classes
  • Your dataset grew but the class names and count stayed the same

How to configure

  1. Select Resume training (or equivalent starting-point option) in model settings
  2. Choose the source model to continue from — use the best-performing version
  3. Set how many additional epochs to train beyond the loaded checkpoint

What to expect

  • Full data for all classes: Quality is typically on par with retraining from scratch, with less training time
  • Partial or under-collected data for some classes: Resume is the fastest option, but classes whose sample count dropped may partially forget what they learned. Turn augmentation ON to reduce this effect — added spectral variety helps compensate for fewer unique samples

Augmentation tip

When resuming on a dataset where some classes have far fewer samples than before, enable data augmentation. In controlled studies, augmentation recovered most of the quality loss that plain resume showed on under-collected classes.

Transfer Learning

Transfer learning reuses an existing model when the class list has changed. Clarity loads the prior model's learned features and rebuilds the output layer to match your new taxonomy.

When to use

  • Adding new classes to an existing model
  • Removing classes you no longer need
  • Merging several classes into one broader category
  • Splitting one class into finer categories
  • Replacing all classes with a different set from the same domain (e.g., different material types on the same sensor)

How to configure

  1. Select Transfer learning as the starting point
  2. Choose the source model to transfer from
  3. Set the output layer initialization:
    • Keep existing classes' knowledge (mapped) — recommended when some classes carry over from the source model. The model preserves what it already knows about shared classes
    • Reset the output layer (random) — use when every class is new (a full swap), but the data comes from the same domain. The model keeps its general feature understanding but starts the decision layer fresh
  4. For merged classes, provide a merge mapping that tells the model which old classes fold into each new one

Fine-tune all layers during training — this is the recommended setting for every scenario below.

Scenario guide

Taxonomy changeOutput layer initialization
Add classesKeep existing classes' knowledge
Remove classesKeep existing classes' knowledge
Merge classesKeep existing classes' knowledge + merge mapping
Split classesKeep existing classes' knowledge
Replace all classes (same domain)Reset the output layer

What to expect

Transfer typically matches or beats training from scratch on the new taxonomy, and often reaches its best checkpoint sooner. The largest time savings occur when every class is new but the data domain is the same — the model's general understanding of the spectra carries over even though the categories changed.

Watch per-class metrics for carried classes (classes that exist in both the old and new taxonomy) to catch any forgetting during expansion.

When to Use Which

Use this quick guide to pick the right starting point:

  1. Do you have a trained model to build on?

    • No → Train from scratch (turn augmentation ON for best results)
    • Yes → go to step 2
  2. Did the class list change?

    • No, same classesResume training
      • Full data for all classes → resume directly
      • Some classes have much less data than before → resume with augmentation ON
    • Yes, classes changedTransfer learning
      • Some classes carry over → keep existing classes' knowledge
      • Every class is new (same domain) → reset the output layer
      • Classes were merged → keep existing classes' knowledge + provide merge mapping

Best Practices

  • Start from the best checkpoint — always select the best-performing source model version, not an early or mid-training checkpoint
  • Turn augmentation ON when resuming on partial or under-collected data
  • Keep existing classes' knowledge for transfer unless every class is new
  • Provide a merge mapping when merging classes — do not rely on the model to infer which old classes combine
  • Review per-class metrics after training — pay special attention to classes that lost samples (resume) or classes that were carried over (transfer)
  • Compare with a scratch baseline when trying a new reuse strategy for the first time on your dataset

See Also