Automatic bacterium classification method and system based on multispectral image analysis
The automatic bacterial classification method combining multispectral image analysis with the SVM model solves the problems of low bacterial classification accuracy and noise sensitivity in the existing technology, and achieves high-precision and rapid bacterial identification and detection.
Patent Information
- Application Number
- CN202510801349.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-10-10
AI Technical Summary
Existing bacterial classification methods rely on single spectral features, which makes it difficult to fully capture bacterial spectral differences. In addition, the classification accuracy is low under noisy and complex backgrounds, and the scope of application is limited.
Multispectral image analysis combined with support vector machine (SVM) model was used to train five SVM classification models through five-fold cross validation. The voting mechanism was used to make the final classification decision and perform standardization and noise suppression on the spectral feature data of pixel blocks.
It significantly improves the accuracy and noise resistance of bacterial classification, supports rapid and automated pathogen detection, and is suitable for multi-species samples and complex background environments.
Smart Images

Figure CN120765989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bacteria classification, and in particular to a method and system for automatic bacteria classification based on multispectral image analysis. Background Art
[0002] Bacterial classification has important applications in medical diagnosis, environmental monitoring, and food safety. Traditional bacterial classification methods rely primarily on artificial culture, biochemical tests, or microscopic observation, which are time-consuming, complex, and susceptible to subjective factors. In recent years, optical imaging-based technologies have been gradually introduced, but most rely on a single spectrum or visible light band, making it difficult to fully capture the differences in bacterial spectral characteristics, resulting in limited classification accuracy. In addition, the interference of background noise in complex samples and inconsistent lighting conditions further reduce the robustness of existing methods.
[0003] Existing machine learning-based classification methods (such as support vector machines) have been tried for bacterial identification, but they typically rely on a single feature extraction strategy, struggle to effectively integrate the complementarity of multispectral information, and suffer from deficiencies in noise suppression and feature optimization. These issues significantly degrade classification performance when dealing with mixed samples of multiple bacterial species or data with low signal-to-noise ratios, limiting their application in rapid detection scenarios.
[0004] Therefore, there is an urgent need for an automated bacterial classification system and method that can comprehensively utilize multispectral data, efficiently suppress noise and improve classification accuracy to meet the needs of clinical and industrial fields for rapid and accurate pathogen detection. Summary of the Invention
[0005] The present invention provides a method and system for automatic bacteria classification based on multispectral image analysis, which is used to solve the problems of low recognition accuracy, strong noise sensitivity and limited scope of application in existing bacteria classification technologies.
[0006] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0007] According to a first aspect of the present invention, there is provided a method for automatic bacterial classification based on multispectral image analysis, the method comprising:
[0008] Acquire multispectral image data of target bacterial samples;
[0009] Preprocessing the acquired multispectral image data to generate pixel block spectral feature data;
[0010] A bacterial classification model was constructed based on a support vector machine. Five SVM classification models were trained using five-fold cross-validation. During the five-fold cross-validation training process, the dataset was automatically divided into five non-overlapping subsets. Four of the subsets were selected as training sets for each fold training, and the remaining subset was used as a test set. Each time the training set was re-divided, the mean and variance were calculated based on the spectral feature data of the training set pixel blocks and stored. The five SVM classification models were trained and stored using the spectral feature data of the training set pixel blocks.
[0011] The newly acquired spectral feature data of the pixel blocks to be classified are standardized by calling the mean and variance according to the five SVM classification models, and then input into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism.
[0012] Generate classification confidence based on the final classification results and output a classification report file.
[0013] In some exemplary embodiments, the method further comprises:
[0014] Generate a graphical display of the classification results, including classification labels and confidence information.
[0015] In some exemplary embodiments, the preprocessing of the acquired spectral image data includes:
[0016] Background subtraction: Perform pixel-level division operation based on input spectral data and background spectral data to generate background-subtracted spectral data;
[0017] Normalization: Normalize the spectral data after background subtraction to ensure that the pixel value range is consistent;
[0018] Noise suppression: Clip pixels smaller than a preset threshold in the normalized spectral data to ensure that the pixel value is not less than 1;
[0019] Binarization segmentation: binarize the noise-suppressed spectral data to generate a binary mask of the region of interest;
[0020] Sample collection: The image is divided into blocks and sorted from large to small according to the number of effective pixels. Based on the block average sampling strategy, the top 50% of the area with the largest number of effective pixels is selected from the binary mask. The spectral feature vector of each pixel block is extracted from the pixel block spectral feature data; the spectral feature vector of each pixel block is composed of the spectral reflectance values of multiple bands.
[0021] In some exemplary embodiments, the support vector machine-based bacterial classification model is constructed, pixel block spectral feature data is input into the bacterial classification model for classification, and a voting mechanism is combined with a majority voting principle to determine the final classification result, including:
[0022] The pre-processed pixel block spectral feature vectors are input into five SVM classification models for preliminary classification to generate classification results;
[0023] When there are differences in the classification results of multiple SVM classification models for the same input sample, the final decision is made based on the majority voting principle through a voting mechanism.
[0024] In some exemplary embodiments, the classification confidence calculation is specifically:
[0025] The classification results of the original input image are scored, and the calculation formula is:
[0026]
[0027] Among them, S i is the classification confidence of the i-th pixel block, P ij is the classification result of pixel block i in the jth SVM model, and n is the number of classified pixel blocks;
[0028] The classification confidence is normalized according to the number of classified pixel blocks to eliminate the influence of the number of pixel blocks on the classification results.
[0029] According to a second aspect of the present invention, there is provided a bacteria automatic classification system based on multispectral image analysis, comprising:
[0030] Spectral image acquisition module, used to obtain multispectral image data of target bacterial samples;
[0031] A data preprocessing module is used to preprocess the acquired multispectral image data to generate pixel block spectral feature data;
[0032] A classification model construction module is used to construct a bacterial classification model based on a support vector machine. Five SVM classification models are trained using five-fold cross-validation. During the five-fold cross-validation training process, the data set is automatically divided into five non-overlapping subsets. During each fold training, four of the subsets are selected as training sets, and the remaining subset is used as a test set. Each time the training set is re-divided, the mean and variance are calculated based on the spectral feature data of the training set pixel blocks and stored. The spectral feature data of the training set pixel blocks are used to train and store the above five SVM classification models.
[0033] The classification and voting module is used to call the mean and variance of the newly acquired pixel block to be classified according to the five SVM classification models for normalization, and then input them into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism.
[0034] The result output module is used to generate classification confidence based on the final classification results and output the classification report file.
[0035] In some exemplary embodiments, the data preprocessing module includes:
[0036] A background subtraction unit is connected to the spectral data input terminal, and is used to perform background subtraction on the spectral data based on a pixel-level division operation between the input spectral data and the background spectral data, and transmit the subtracted spectral data to the standardization unit;
[0037] The normalization unit is connected to the background subtraction unit and is used to normalize the spectral data after background subtraction to reduce data deviation, and transmit the normalized data to the noise suppression unit;
[0038] The noise suppression unit is connected to the normalization unit and is used to clip the pixels smaller than the threshold in the normalized data to ensure that the pixel value is not less than 1 during the background subtraction process, and pass the clipped data to the threshold segmentation unit;
[0039] a threshold segmentation unit connected to the noise suppression unit, for converting the normalized spectral data into a binary image to generate a binary mask of a region of interest (ROI), and transmitting the mask data to the sample acquisition unit;
[0040] The sample acquisition unit is used to divide the image into blocks, sort them from large to small according to the number of effective pixels, select the top 50% of the area with the largest number of effective pixels from the binary mask based on the block average sampling strategy, and extract the spectral feature vector of each pixel block from the pixel block spectral feature data; wherein, the spectral feature vector of each pixel block is composed of the spectral reflectance values of multiple bands.
[0041] According to a third aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for automatic bacterial classification based on multispectral image analysis described in the first aspect is implemented.
[0042] According to a fourth aspect of the present invention, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for automatic bacterial classification based on multispectral image analysis described in the first aspect is implemented.
[0043] According to a fifth aspect of the present invention, there is provided an electronic device, comprising:
[0044] processor; and
[0045] a memory for storing executable instructions of the processor;
[0046] Wherein, the processor is configured to implement the automatic bacteria classification method based on multispectral image analysis described in the first aspect above by executing the executable instructions.
[0047] The embodiments of the present invention provide an automatic bacterial classification method and system based on multispectral image analysis. By deeply integrating multispectral analysis with machine learning technology, they provide an efficient and reliable solution for bacterial classification, which has important clinical and industrial application value.
[0048] Compared with the existing technology, it has the following advantages:
[0049] 1. High-precision classification: The combination of multispectral data fusion and SVM model significantly improves the ability to distinguish different bacterial species (especially morphologically similar strains);
[0050] 2. Strong noise resistance: Through background correction and noise suppression technology, the impact of background interference in complex samples is effectively reduced;
[0051] 3. Efficient automation: Full-process automation supports rapid detection needs and is suitable for scenarios such as pathogen screening and environmental monitoring;
[0052] 4. Scalability: The modular design facilitates the integration of new algorithms or expansion to other microbial classification tasks.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present invention, and together with the description, serve to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and it is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0055] Figure 1 A schematic diagram of a process flow of an automatic bacteria classification method based on multispectral image analysis according to an exemplary embodiment of the present invention;
[0056] Figure 2 A schematic diagram of a preprocessing method flow according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0058] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0059] In view of the shortcomings and deficiencies of the existing technology, this example embodiment provides a method for automatic bacterial classification based on multispectral image analysis. Figure 1 As shown, the following steps may be specifically included:
[0060] Step S1, obtaining multispectral image data of a target bacterial sample;
[0061] Step S2, preprocessing the acquired multispectral image data to generate pixel block spectral feature data;
[0062] Step S3: constructing a bacterial classification model based on a support vector machine, and training five SVM classification models using five-fold cross-validation. During the five-fold cross-validation training process, the pixel block spectral feature data set is automatically divided into five non-overlapping subsets. During each fold training, four of the subsets are selected as training sets, and the remaining subset is selected as a test set. Each time the training set is re-divided, the mean and variance are calculated based on the training set pixel block spectral feature data and stored. The five SVM classification models are trained and stored using the training set pixel block spectral feature data.
[0063] Step S4: The newly acquired spectral feature data of the pixel blocks to be classified are standardized by calling the mean and variance according to the five SVM classification models, and then input into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism;
[0064] Step S5: Generate classification confidence based on the final classification result and output a classification report file.
[0065] Below, each step in this exemplary implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0066] In step S1, multispectral image data of a target bacterial sample is acquired.
[0067] Specifically, multispectral image data of the target bacterial sample is obtained, covering the visible light to near-infrared band (400nm~1000nm) to fully capture the spectral characteristics of the bacteria.
[0068] Specifically, the bacteria include Escherichia coli, Staphylococcus aureus, Shigella, etc.
[0069] In step S2, the acquired multispectral image data is preprocessed to generate pixel block spectral feature data.
[0070] Exemplarily, preprocessing includes background subtraction, normalization, noise suppression, threshold segmentation and sample collection.
[0071] Specifically, such as Figure 2 As shown, the following steps are included:
[0072] Step S21: Background subtraction: performing pixel-level division operation based on the input spectrum data and the background spectrum data to generate spectrum data after background subtraction;
[0073] Step S22: normalization processing: normalizing the spectral data after background subtraction to ensure that the pixel value range is consistent;
[0074] The spectral data were normalized using the formula:
[0075]
[0076] Among them, I is the original pixel value, I min and I max are the minimum and maximum pixel values, respectively.
[0077] Step S23: Noise suppression: Clipping pixels in the normalized spectral data that are smaller than a preset threshold value to ensure that the pixel value is not less than 1 and that the effective signal is not submerged by noise.
[0078] Step S24: Binarization segmentation: binarize the noise-suppressed spectral data to generate a binary mask of the region of interest (ROI);
[0079] In one embodiment, the spectral data is binarized and segmented using the Otsu algorithm to generate a binary mask of the region of interest (ROI).
[0080] Step S25: Sample collection: Divide the image into blocks and sort them from large to small according to the number of effective pixels. Based on the block average sampling strategy, select the top 50% of the areas with the largest number of effective pixels from the binary mask, and extract the spectral feature vector of each pixel block from the pixel block spectral feature data; wherein, each pixel block spectral feature vector is composed of spectral reflectance values of multiple bands.
[0081] In step S3, a bacterial classification model is constructed based on a support vector machine, and five SVM classification models are trained using five-fold cross-validation. During the five-fold cross-validation training process, the pixel block spectral feature data set will be automatically divided into five non-overlapping subsets. During each fold training, four subsets will be selected as training sets, and the remaining subset will be selected as a test set. Each time the training set is re-divided, the mean and variance are calculated based on the training set pixel block spectral feature data and stored, and the five SVM classification models are trained and stored using the training set pixel block spectral feature data.
[0082] In step S4, the newly acquired spectral feature data of the pixel blocks to be classified are standardized by calling the mean and variance according to the five SVM classification models, and then input into the corresponding models for classification. The final classification result is determined according to the majority voting principle in combination with the voting mechanism.
[0083] Specifically, the spectral feature vectors of the pixel blocks classified by the preprocessing are respectively input into five SVM classification models for preliminary classification to generate classification results;
[0084] When there are differences in the classification results of multiple SVM classification models for the same input sample, the final decision is made based on the majority voting principle through a voting mechanism.
[0085] The voting mechanism is used to perform weighted fusion on the classification results. The formula is:
[0086]
[0087] Among them, ω i is the weight of the i-th model, y i is the predicted category, and ii is the indicator function.
[0088] In step S5, a classification confidence is generated according to the final classification result, and a classification report file is output.
[0089] Among them, the classification confidence calculation formula is:
[0090] The classification results of the original input image are scored, and the calculation formula is:
[0091]
[0092] Among them, S iis the classification confidence of the i-th pixel block, P ij is the classification result of pixel block i in the jth SVM model, and n is the number of classified pixel blocks;
[0093] The classification confidence is normalized according to the number of classified pixel blocks to eliminate the influence of the number of pixel blocks on the classification results.
[0094] Export the classification results (including matching scores and confidence levels) as an Excel report in the following format:
[0095]
[0096] Exemplarily, the method further includes step S6, generating a graphical display of the classification result, including the classification label and confidence information.
[0097] Specifically, the classification results are printed to the visual front-end through the back-end based on the Python Flask architecture and the front-end based on JS, JSON, CSS, and HTML languages.
[0098] The present invention adopts a multispectral image analysis method, which not only significantly improves the recognition accuracy of the bacterial classification system for samples of different bacterial species, but also effectively reduces the impact of background noise on the classification effect, thereby broadening its application in the field of rapid detection of pathogens.
[0099] Example 1
[0100] Taking a clinical sample as an example, the specific implementation steps are as follows:
[0101] Data acquisition: Use a multispectral camera to acquire 10 band images of the sample (such as 450nm, 550nm, 650nm, etc.).
[0102] Preprocessing:
[0103] Subtract the background (e.g., slide spectrum).
[0104] Normalize to the range [0,1] and clip noisy pixels.
[0105] Generate ROI mask and extract spectral features of 5×5 pixel blocks.
[0106] Classification and matching:
[0107] The feature vector is input into the SVM model and preliminarily classified as "Escherichia coli".
[0108] The Euclidean distance to the database template is calculated, and the matching score is 0.92.
[0109] The final classification is confirmed through a voting mechanism.
[0110] Result output: Generate Excel report.
[0111] It should be noted that, as another aspect, the present application also provides an automatic bacterial classification system based on multispectral image analysis, comprising:
[0112] Spectral image acquisition module, used to obtain multispectral image data of target bacterial samples;
[0113] A data preprocessing module is used to preprocess the acquired multispectral image data to generate pixel block spectral feature data;
[0114] A classification model construction module is used to construct a bacterial classification model based on a support vector machine. Five SVM classification models are trained using five-fold cross-validation. The five-fold cross-validation training process automatically divides the dataset into a test set and a training set during each fold of training. Each time the training set is re-divided, the mean and variance are calculated based on the spectral feature data of the training set pixel blocks and stored. The five SVM classification models are trained and stored using the spectral feature data of the training set pixel blocks.
[0115] The classification and voting module is used to call the mean and variance of the newly acquired pixel block to be classified according to the five SVM classification models for normalization, and then input them into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism.
[0116] The result output module is used to generate classification confidence based on the final classification results and output the classification report file.
[0117] Among them, the data preprocessing module includes:
[0118] A background subtraction unit is connected to the spectral data input terminal, and is used to perform background subtraction on the spectral data based on a pixel-level division operation between the input spectral data and the background spectral data, and transmit the subtracted spectral data to the standardization unit;
[0119] The normalization unit is connected to the background subtraction unit and is used to normalize the spectral data after background subtraction to reduce data deviation, and transmit the normalized data to the noise suppression unit;
[0120] The noise suppression unit is connected to the normalization unit and is used to clip the pixels smaller than the threshold in the normalized data to ensure that the pixel value is not less than 1 during the background subtraction process, and pass the clipped data to the threshold segmentation unit;
[0121] a threshold segmentation unit connected to the noise suppression unit, for converting the normalized spectral data into a binary image to generate a binary mask of a region of interest (ROI), and transmitting the mask data to the sample acquisition unit;
[0122] The sample acquisition unit is connected to the threshold segmentation unit and is used to divide the image into blocks, sort them from large to small according to the number of effective pixels, select the top 50% of the area with the largest number of effective pixels from the binary mask based on the block average sampling strategy, and extract the spectral feature vector of each pixel block from the pixel block spectral feature data; wherein, the spectral feature vector of each pixel block is composed of the spectral reflectance values of multiple bands.
[0123] The result output module includes:
[0124] A visualization generation unit, used to generate a graphical display of the classification results, including classification labels and confidence information;
[0125] A report generation unit, connected to the visualization generation unit, is used to export the classification results into a report file in Excel format;
[0126] The data storage unit is connected to the report generation unit and is used to store the generated report files and classification result data.
[0127] It should be noted that, as another aspect, the present application also provides a storage medium, which may be included in an electronic device or may exist independently without being incorporated into the electronic device. The storage medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.
[0128] In one embodiment, the present application provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0129] Furthermore, the above-described figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention and are not intended to be limiting. It is readily understood that the processes illustrated in the above-described figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0130] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the claims.
[0131] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings and that various modifications and variations can be made without departing from the scope thereof, which is limited only by the appended claims.
Claims
1. A method for automatic bacterial classification based on multispectral image analysis, characterized in that: The method comprises: Acquire multispectral image data of target bacterial samples; Preprocessing the acquired multispectral image data to generate pixel block spectral feature data; A bacterial classification model was constructed based on a support vector machine. Five SVM classification models were trained using five-fold cross-validation. During the five-fold cross-validation training process, the pixel block spectral feature data set was automatically divided into five non-overlapping subsets. During each fold training, four of the subsets were selected as training sets, and the remaining subset was used as a test set. Each time the training set was re-divided, the mean and variance were calculated based on the training set pixel block spectral feature data and stored. The five SVM classification models were trained and stored using the training set pixel block spectral feature data. The newly acquired spectral feature data of the pixel blocks to be classified are standardized by calling the mean and variance according to the five SVM classification models, and then input into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism. Generate classification confidence based on the final classification results and output a classification report file.
2. The method according to claim 1, characterized in that The method further comprises: Generate a graphical display of the classification results, including classification labels and confidence information.
3. The method according to claim 1, characterized in that The preprocessing of the acquired spectral image data includes: Background subtraction: Perform pixel-level division operation based on input spectral data and background spectral data to generate background-subtracted spectral data; Normalization: Normalize the spectral data after background subtraction to ensure that the pixel value range is consistent; Noise suppression: Clip pixels smaller than a preset threshold in the normalized spectral data to ensure that the pixel value is not less than 1; Binarization segmentation: binarize the noise-suppressed spectral data to generate a binary mask of the region of interest; Sample collection: The image is divided into blocks and sorted from large to small according to the number of effective pixels. Based on the block average sampling strategy, the top 50% of the area with the largest number of effective pixels is selected from the binary mask. The spectral feature vector of each pixel block is extracted from the pixel block spectral feature data; the spectral feature vector of each pixel block is composed of the spectral reflectance values of multiple bands.
4. The method according to claim 1, wherein The support vector machine-based bacterial classification model is constructed, pixel block spectral feature data is input into the bacterial classification model for classification, and the final classification result is determined according to the majority voting principle in combination with the voting mechanism, including: The pre-processed pixel block spectral feature vectors are input into five SVM classification models for preliminary classification to generate classification results; When there are differences in the classification results of multiple SVM classification models for the same input sample, the final decision is made based on the majority voting principle through a voting mechanism.
5. The method according to claim 1, characterized in that The classification confidence calculation is specifically as follows: The classification results of the original input image are scored, and the calculation formula is: Among them, S i is the classification confidence of the i-th pixel block, P ij is the classification result of pixel block i in the jth SVM model, and n is the number of classified pixel blocks; The classification confidence is normalized according to the number of classified pixel blocks to eliminate the influence of the number of pixel blocks on the classification results.
6. An automatic bacterial classification system based on multispectral image analysis, characterized in that: include: Spectral image acquisition module, used to obtain multispectral image data of target bacterial samples; A data preprocessing module is used to preprocess the acquired multispectral image data to generate pixel block spectral feature data; A classification model construction module is used to construct a bacterial classification model based on a support vector machine. Five SVM classification models are trained using five-fold cross-validation. During the five-fold cross-validation training process, the dataset is automatically divided into five non-overlapping subsets. During each fold training, four of the subsets are selected as training sets, and the remaining subset is used as a test set. Each time the training set is re-divided, the mean and variance are calculated based on the spectral feature data of the training set pixel blocks and stored. The five SVM classification models are trained and stored using the spectral feature data of the training set pixel blocks. The classification and voting module is used to call the mean and variance of the newly acquired pixel block to be classified according to the five SVM classification models for normalization, and then input them into the corresponding models for classification. The final classification result is determined by the majority voting principle in combination with the voting mechanism. The result output module is used to generate classification confidence based on the final classification results and output the classification report file.
7. The system according to claim 1, wherein: The data preprocessing module includes: A background subtraction unit is connected to the spectral data input terminal, and is used to perform background subtraction on the spectral data based on a pixel-level division operation between the input spectral data and the background spectral data, and transmit the subtracted spectral data to the standardization unit; The normalization unit is connected to the background subtraction unit and is used to normalize the spectral data after background subtraction to reduce data deviation, and transmit the normalized data to the noise suppression unit; The noise suppression unit is connected to the normalization unit and is used to clip the pixels smaller than the threshold in the normalized data to ensure that the pixel value is not less than 1 during the background subtraction process, and pass the clipped data to the threshold segmentation unit; a threshold segmentation unit connected to the noise suppression unit, for converting the normalized spectral data into a binary image to generate a binary mask of a region of interest (ROI), and transmitting the mask data to the sample acquisition unit; The sample acquisition unit is used to divide the image into blocks, sort them from large to small according to the number of effective pixels, select the top 50% of the area with the largest number of effective pixels from the binary mask based on the block average sampling strategy, and extract the spectral feature vector of each pixel block from the pixel block spectral feature data; wherein, the spectral feature vector of each pixel block is composed of the spectral reflectance values of multiple bands.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for automatic bacteria classification based on multispectral image analysis according to any one of claims 1 to 6 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for automatic bacterial classification based on multispectral image analysis according to any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the automatic bacteria classification method based on multispectral image analysis according to any one of claims 1 to 6 by executing the executable instructions.