The application discloses a
foreign matter detection method based on
hyperspectral imaging, which comprises the following steps: carrying out slice and
wavelet transform pretreatment on a hyperspectral image of a sample to be detected, and carrying out double-path
parallel detection after the pretreatment; on one hand, straight line segments in the image slice are extracted through a first detection
branch, and broken line segments are merged and reconstructed; on the other hand, the sensitivity to small foreign matters is improved through a second detection
branch, the network is focused on small suspicious areas, and the
detection rate of small foreign matters is improved; after the double-path
parallel detection, whether the corresponding
foreign matter candidate frame corresponds to the same
foreign matter is judged according to the intersection and union ratio, and unified threshold judgment is carried out; finally, in combination with a preset filtering rule, effective foreign matters can be accurately screened out, and the types, positions and confidence of the foreign matters are determined, and the
false positive rate of the detection result is low. On this basis, the application further discloses corresponding
computer equipment and a foreign matter detection
system. The application is especially suitable for foreign matter detection of
kelp seedlings, seaweed and other algal products with a flexible and thin structure.