Table of Contents
Fetching ...

ERX: A Fast Real-Time Anomaly Detection Algorithm for Hyperspectral Line Scanning

Samuel Garske, Bradley Evans, Christopher Artlett, KC Wong

TL;DR

ERX introduces a fast, real-time anomaly detector for hyperspectral line-scanning that combines sparse random projection, exponentially moving background statistics, and Cholesky-based distance computation to achieve real-time performance on edge hardware. It addresses scalability to high-band data, adaptability to changing scenery, and robustness to geometric distortions, validated on three large datasets and deployed on a Jetson Xavier NX where ERX outperforms competing RX-based methods in speed and detection. The work includes extensive ablations on dimensionality reduction and momentum to illuminate trade-offs between speed and accuracy, and provides open-source code and three novel datasets to support future research in real-time HAD for line-scanning systems. The practical impact lies in enabling onboard, automated anomaly detection for drones and small satellites with robust performance under non-ideal imaging conditions, along with directions for adaptive thresholds and object-level analyses.

Abstract

Detecting unexpected objects (anomalies) in real time has great potential for monitoring, managing, and protecting the environment. Hyperspectral line-scan cameras are a low-cost solution that enhance confidence in anomaly detection over RGB and multispectral imagery. However, existing line-scan algorithms are too slow when using small computers (e.g. those onboard a drone or small satellite), do not adapt to changing scenery, or lack robustness against geometric distortions. This paper introduces the Exponentially moving RX algorithm (ERX) to address these issues, and compares it with four existing RX-based anomaly detection methods for hyperspectral line scanning. Three large and more complex datasets are also introduced to better assess the practical challenges when using line-scan cameras (two hyperspectral and one multispectral). ERX was evaluated using a Jetson Xavier NX edge computing module (6-core CPU, 8GB RAM, 20W power draw), achieving the best combination of speed and detection performance. ERX was 9 times faster than the next-best algorithm on the dataset with the highest number of bands (108 band), with an average speed of 561 lines per second on the Jetson. It achieved a 29.3% AUC improvement over the next-best algorithm on the most challenging dataset, while showing greater adaptability through consistently high AUC scores regardless of the camera's starting location. ERX performed robustly across all datasets, achieving an AUC of 0.941 on a drone-collected hyperspectral line scan dataset without geometric corrections (a 16.9% improvement over existing algorithms). This work enables future research on the detection of anomalous objects in real time, adaptive and automatic threshold selection, and real-time field tests. The datasets and the Python code are openly available at: https://github.com/WiseGamgee/HyperAD, promoting accessibility and future work.

ERX: A Fast Real-Time Anomaly Detection Algorithm for Hyperspectral Line Scanning

TL;DR

ERX introduces a fast, real-time anomaly detector for hyperspectral line-scanning that combines sparse random projection, exponentially moving background statistics, and Cholesky-based distance computation to achieve real-time performance on edge hardware. It addresses scalability to high-band data, adaptability to changing scenery, and robustness to geometric distortions, validated on three large datasets and deployed on a Jetson Xavier NX where ERX outperforms competing RX-based methods in speed and detection. The work includes extensive ablations on dimensionality reduction and momentum to illuminate trade-offs between speed and accuracy, and provides open-source code and three novel datasets to support future research in real-time HAD for line-scanning systems. The practical impact lies in enabling onboard, automated anomaly detection for drones and small satellites with robust performance under non-ideal imaging conditions, along with directions for adaptive thresholds and object-level analyses.

Abstract

Detecting unexpected objects (anomalies) in real time has great potential for monitoring, managing, and protecting the environment. Hyperspectral line-scan cameras are a low-cost solution that enhance confidence in anomaly detection over RGB and multispectral imagery. However, existing line-scan algorithms are too slow when using small computers (e.g. those onboard a drone or small satellite), do not adapt to changing scenery, or lack robustness against geometric distortions. This paper introduces the Exponentially moving RX algorithm (ERX) to address these issues, and compares it with four existing RX-based anomaly detection methods for hyperspectral line scanning. Three large and more complex datasets are also introduced to better assess the practical challenges when using line-scan cameras (two hyperspectral and one multispectral). ERX was evaluated using a Jetson Xavier NX edge computing module (6-core CPU, 8GB RAM, 20W power draw), achieving the best combination of speed and detection performance. ERX was 9 times faster than the next-best algorithm on the dataset with the highest number of bands (108 band), with an average speed of 561 lines per second on the Jetson. It achieved a 29.3% AUC improvement over the next-best algorithm on the most challenging dataset, while showing greater adaptability through consistently high AUC scores regardless of the camera's starting location. ERX performed robustly across all datasets, achieving an AUC of 0.941 on a drone-collected hyperspectral line scan dataset without geometric corrections (a 16.9% improvement over existing algorithms). This work enables future research on the detection of anomalous objects in real time, adaptive and automatic threshold selection, and real-time field tests. The datasets and the Python code are openly available at: https://github.com/WiseGamgee/HyperAD, promoting accessibility and future work.
Paper Structure (31 sections, 23 equations, 26 figures, 4 tables)

This paper contains 31 sections, 23 equations, 26 figures, 4 tables.

Figures (26)

  • Figure 2: A line-scan camera capturing one line of pixels at a time as it's platform (e.g., a drone) moves over the area of interest. These lines form a hyperspectral image, or datacube, with the depth dimension $b$ representing the spectral bands for each pixel.
  • Figure 3: A standard window (left) versus a double window (right). The central pixel (blue) is analysed, with each approach estimating the local mean and covariance from the surrounding pixels.
  • Figure 4: ERX algorithm flowchart. SRP is sparse random projection, and $\bm{\hat{\mu}}_t$ and $\bm{\hat{K}}_t$ are the mean and covariance of the current line. $\bm{\mu}_t$ and $\bm{K}_t$ are the background mean and covariance, and EMA refers to the exponentially moving averages. $\bm{\delta}_t$ is the Mahalanobis distance vector of all pixels in the line.
  • Figure 5: Conceptual comparison of ERX's exponentially moving averages (EMAs), versus equal weighting. EMAs prioritise newer lines and forget older ones (top), unlike equally weighted methods, which treat all lines uniformly (middle). The plot (bottom) displays the weight profiles for all lines in the example scene, with the most recent captured at time $t$.
  • Figure 6: The beach dataset RGB image (top) and anomaly ground truth image (bottom).
  • ...and 21 more figures