Automotive Maintenance / Spark Plugs - FOMO-AD Public

Spark Plugs - FOMO-AD

Images

About this project

Spark Plug Anomaly Detection – Edge Impulse Project

This project uses Edge Impulse’s Visual Anomaly Detection (FOMO-AD) block to detect deviations in spark plug appearance from a known normal condition. It is designed for lightweight, embedded deployments in predictive maintenance applications.

Note
This project also works well for classification like mechanical damage or carbon fouling 👉 Check out the companion project here: Spark Plug Condition Classification

Project Overview

  • Task: Visual Anomaly Detection
  • Input: Still images or frames extracted from video
  • Classes: Only normal samples used for training; all others treated as anomalies
  • Image resolution: 96x96

Use Case

The model is trained exclusively on images of spark plugs in normal condition. During inference, it flags any visual deviation as an anomaly, enabling early fault detection in systems where specific failure types may be unknown or difficult to label.

Dataset Structure

Only two labels are used:

frames/
├── normal/ # Training and test samples
├── anomaly/ # Test-only samples (includes all types of faulty spark plugs)
The `anomaly/` folder contains mixed spark plug faults such as:
  • Mechanical damage
  • Oil fouling
  • Pre-ignition damage
  • Carbon fouling
  • Electrode wear

These do not need to be subclassified for anomaly detection.

Impulse Design

Input Block

  • Type: Image
  • Dimensions: 96x96 pixels
  • Resize mode: Fit short axis

Learning Block

  • Type: Visual Anomaly Detection (FOMO-AD)
  • Scoring function: GMM (default for low-power), or PatchCore

Model Training Steps

  1. Upload normal samples for training.
  2. Upload both normal and anomaly samples to the test set.
  3. Train the Visual Anomaly Detection model using Edge Impulse Studio.
  4. Run model testing to view anomaly scores across the grid.

Confidence Threshold

After training:

  • Review test set results and anomaly heatmaps.
  • Adjust the confidence threshold based on max training-set anomaly score.

This threshold determines what qualifies as an anomaly at inference time.

no_anomaly_0156
no_anomaly_0280
no_anomaly_0011
no_anomaly_0152
no_anomaly_0318
no_anomaly_0097
no_anomaly_0310
no_anomaly2_0051

Run this model

On any device

Dataset summary

Data collected
897 items
Labels
no anomaly

Project info

Project ID 781690
License 3-Clause BSD
No. of views 2,260
No. of clones 5