This invention provides a method,
system, and
computer equipment for the detection and classification of hyperspectral anomalies in Chinese medicinal materials, relating to the field of Chinese medicinal material testing. The method includes: reading hyperspectral data; performing
foreground detection on the hyperspectral data using a multi-scale
spatial spectrum fusion method to obtain a foreground
mask of the abnormal region; automatically sampling with three-dimensional patches to collect N three-dimensional patch arrays of the foreground
mask region; setting up a three-dimensional
convolutional neural network with a band self-attention mechanism, inputting the foreground
mask and the three-dimensional patch arrays into the neural network to generate a high-level
semantic feature vector; and finally outputting the
classification result by passing the high-level
semantic feature vector through a neighborhood
spatial spectrum-based self-supervised aggregation attention module. This invention, employing the above-mentioned method,
system, and
computer equipment for the detection and classification of hyperspectral anomalies in Chinese medicinal materials, achieves a new, efficient, accurate, and
automated method for detecting mold and
insect infestation in Chinese medicinal materials, significantly improving detection quality and the
system's practical value.