Method and device for rapidly detecting microorganisms on surface of plastic package
Through fluorescence hyperspectral imaging system and image processing technology, the rapid and lossless problem of microbial pollution detection on the surface of plastic packaging is solved, and fast, accurate and reliable detection results are achieved, avoiding environmental pollution.
Patent Information
- Application Number
- CN202411187228.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to detect microbial contamination on the surface of plastic packaging quickly and conveniently, and most methods require professional operation, sample pretreatment, and may cause environmental pollution.
The fluorescence hyperspectral imaging system is used to combine image processing and spectral analysis technology to achieve rapid and non-destructive detection of microorganisms on the surface of plastic packaging through fluorescence hyperspectral image acquisition, data preprocessing, feature wavelength extraction and model establishment.
It realizes rapid, accurate and reliable detection of microbial contamination on the packaging surface, avoids sample preparation and chemical use, and reduces the risk of environmental pollution.
Smart Images

Figure CN119082254A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of packaging surface hygiene detection, and in particular to a method and device for rapid detection of microorganisms on the surface of plastic packaging. Background Art
[0002] At present, most of the research on microbial contamination is to directly test food, but in the storage, transportation and sales links, fresh meat is circulated in a packaged form. In the manufacturing, storage and transportation of packaged products, there are risks of multiple microbial contamination. These sources of contamination include microorganisms in the contents, manual contact operations, the surface of processing equipment and ambient air. Taking the new coronavirus as an example, if the packaging surface is contaminated by it, and the disinfection is not thorough or the sterilization is not strict, there will be a possibility of secondary contamination. This contamination may further affect the packaged food and increase health risks. At the same time, during the production, storage, distribution, retail and consumption processes, the contaminated packaging surface will widely spread pollutants, posing a threat to the health of practitioners and consumers.
[0003] Currently, there is an increasing demand for technologies to quickly and conveniently detect microbial contaminants to avoid food safety issues. The total viable count method is an important microbial detection method for meat quality and safety assessment. Genetic analysis-based methods such as enzyme-linked immunosorbent assay, polymerase chain reaction (including real-time fluorescent labeling technology, etc.) and DNA sequencing can also be used for microbial contamination detection.
[0004] However, most of these methods require professionals to operate, are damaging to samples, and require pretreatment, so there is a need to develop fast and non-destructive methods. Summary of the invention
[0005] The purpose of this application is to provide a method and device for rapid detection of microorganisms on the surface of plastic packaging to solve the technical defects in the above-mentioned prior art, realize rapid and non-destructive detection of microbial contamination on the surface of packaging film, improve speed, accuracy and reliability, do not require sample preparation, do not contain chemical substances, and will not cause environmental pollution.
[0006] The technical solution is as follows:
[0007] The first aspect provided by the present application provides a method for rapid detection of microorganisms on the surface of plastic packaging, the method comprising:
[0008] S1, using a fluorescence hyperspectral imaging system to collect sample fluorescence hyperspectral images and obtain characteristic wavelengths of material fluorescence images;
[0009] S2, using the characteristic wavelength of the material fluorescence image to process the image, obtain a binary image with the position of the marked data point after screening the non-zero spectral band data, apply K-means clustering and opening operation algorithm to segment the selected data image, and generate the final mask image as the final marked point image;
[0010] S3, performing data analysis on the fluorescence spectra of all pixels in S2 and preprocessing the fluorescence spectrum data;
[0011] S4, identifying and extracting characteristic wavelength variables from spectral data, and selecting the optimal characteristic wavelength variable;
[0012] S5, establish a discrimination model for microbial biofilm on the surface of plastic packaging based on the original fluorescence spectrum data, the preprocessed fluorescence spectrum data, and the fluorescence spectrum data after characteristic wavelength extraction, and compare to obtain the optimal discrimination model.
[0013] Furthermore, the fluorescence hyperspectral imaging system uses ultraviolet light source to excite imaging, and the collection process is all in a dark state.
[0014] Furthermore, the method for obtaining characteristic wavelength of material fluorescence image in S1 comprises the following steps:
[0015] The microbial liquid prepared according to the national standard is dripped on the surface of the plastic packaging to simulate contamination, and the fluorescence hyperspectral image of the surface of the plastic packaging sample is collected by using the fluorescence hyperspectral imaging system to obtain the original fluorescence hyperspectral image;
[0016] The image of each independent sample plate is cropped in a specific picture area, and then the full spectrum area data is filtered to be greater than zero to obtain non-zero spectrum data, thereby filtering out the region of interest ROI;
[0017] According to the F value of the one-way ANOVA between the region of interest ROI and other background areas, the most significant single band value X nm was selected to classify the image pixels as microbial inoculation points or background;
[0018] At a specific wavelength of X nm, the final binary image is created using the K-means clustering segmentation method and image opening operation;
[0019] The one-way ANOVA was performed again, and through multiple calculations of F values, a final stable most significant band value was obtained, which was recorded as the characteristic wavelength of the material fluorescence image.
[0020] Furthermore, the preprocessing method in S3 adopts normalization, standardization, moving window average smoothing, first-order derivative, and standard normal transformation.
[0021] Furthermore, the method for extracting characteristic wavelengths in S4 adopts an adaptive reweighted sampling CARS algorithm, a recursive feature elimination RFE algorithm, a random forest RF algorithm, and a principal component analysis-linear discriminant analysis PCA-LDA algorithm combined with a bootstrap method.
[0022] Furthermore, the bootstrap method sets the number of iterations to 100.
[0023] Furthermore, the modeling method in S5 adopts a support vector machine (SVM) algorithm, a decision tree (DT) algorithm, and a K-nearest neighbor (KNN) algorithm.
[0024] Furthermore, the SVM uses a Bayesian optimization method to select optimal parameter settings.
[0025] Furthermore, the KNN adopts network search cross-validation to perform parameter optimization, and the search space is set to [2, 10].
[0026] In a second aspect, the present application provides a device for rapid detection of microorganisms on the surface of plastic packaging, the device comprising:
[0027] Acquisition spectrum image module: used to acquire sample fluorescence hyperspectral images using a fluorescence hyperspectral imaging system and obtain characteristic wavelengths of material fluorescence images;
[0028] Image recognition and extraction module: used to process images using the characteristic wavelength of material fluorescence images, obtain a binary image with marked data point positions after screening non-zero spectral band data, apply K-means clustering and opening operation algorithms to segment the selected data image, and generate the final mask image as the final marked point image;
[0029] Spectral data preprocessing module: used to perform data analysis on the fluorescence spectra of all pixels in the image recognition and extraction module and preprocess the spectral data;
[0030] Characteristic wavelength extraction module: used to identify and extract characteristic wavelength variables from spectral data and select the optimal characteristic wavelength variables;
[0031] Model building module: used to build a discrimination model for microbial biofilm on the surface of plastic packaging based on the original fluorescence spectrum data, pre-processed fluorescence spectrum data, and spectrum data after characteristic wavelength extraction, and compare to obtain the optimal discrimination model.
[0032] The beneficial effects of the technical solution provided by this application include at least:
[0033] This application is based on fluorescence hyperspectral imaging technology. After obtaining the biofilm area through the image processing process, the biofilm detection model is constructed using the spectral preprocessing method and the spectral characteristic wavelength screening method. The modeling results are analyzed and evaluated, and the optimal modeling method is selected to confirm the possibility of real-time biofilm detection using fluorescence hyperspectral imaging technology. The image analysis method and modeling method used in this application realize rapid and non-destructive detection of microbial contamination on the packaging surface, and have been improved in terms of speed, accuracy and reliability. No sample preparation is required, no chemical substances are contained, and no environmental pollution is caused. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present disclosure, the drawings required for use in the description of the implementation methods will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A flow chart of a method for rapid detection of microorganisms on the surface of plastic packaging provided by an exemplary embodiment of the present application is shown;
[0036] Figure 2 A flowchart of obtaining characteristic wavelengths of a sample fluorescence image provided by an exemplary embodiment of the present application is shown;
[0037] Figure 3 A flow chart of establishing a model for distinguishing E. coli biofilm on the surface of plastic packaging provided by an exemplary embodiment of the present application is shown;
[0038] Figure 4 A schematic diagram of image recognition and extraction results is shown in an exemplary embodiment of the present application, taking polyethylene PE as an example;
[0039] Figure 5 A schematic diagram of image recognition and extraction results using nylon PA as an example is shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in this specification to clearly and completely describe the technical solutions in the implementation methods provided in this specification. Obviously, the described implementation methods are only part of the implementation methods, not all of the implementation methods. Based on the implementation methods provided in this specification, all other implementation methods obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In this application, a method for rapid detection of microorganisms on the surface of plastic packaging is used for hygienic detection of food processing surfaces, specifically detecting microbial contamination on the surface of food packaging films; based on fluorescence hyperspectral imaging technology, after obtaining the biofilm area through the image processing process, a spectral preprocessing method and a spectral characteristic wavelength screening method are used to construct a biofilm detection model, the modeling results are analyzed and evaluated, and the optimal modeling method is selected to confirm the possibility of real-time biofilm detection using fluorescence hyperspectral imaging technology. The image analysis method and modeling method used in this application realize rapid and non-destructive detection of microbial contamination on the surface of packaging films, and have been improved in terms of speed, accuracy and reliability, do not require sample preparation, do not contain chemical substances, and will not cause environmental pollution.
[0042] Figure 1 A flowchart of a method for rapid detection of microorganisms on the surface of plastic packaging provided by an exemplary embodiment of the present application is shown. Taking the detection of Escherichia coli on the surface of plastic packaging as an example, the method includes:
[0043] S1, collect spectral images, use the fluorescence hyperspectral imaging system to collect sample fluorescence hyperspectral images, and obtain the characteristic wavelengths of material fluorescence images.
[0044] like Figure 2 A flowchart for obtaining a characteristic wavelength of a sample fluorescence image provided by an exemplary embodiment of the present application is shown; a fluorescence hyperspectral imaging system is used to collect a sample fluorescence hyperspectral image, non-zero spectral band data is screened to obtain a screening graph, one-way ANOVA is used to obtain the most significant band (the first time), K-means clustering segmentation processing is performed on the screening graph at the significant band, image opening operation processing is performed to obtain a binary result graph, one-way ANOVA is used to obtain the most significant band, the two band values are compared, and when the bands are the same, the most significant band value is obtained to obtain the characteristic wavelength of the material fluorescence image; when the bands are not the same, K-means clustering segmentation processing is performed on the screening graph at the significant band again, image opening operation processing is performed to obtain a binary result graph, one-way ANOVA is used to obtain the most significant band, until, the two band values are compared, the bands are the same, the most significant band value is obtained, and the characteristic wavelength of the material fluorescence image is obtained.
[0045] It should be noted that microorganisms can produce fluorescent reactions after being excited by ultraviolet light.
[0046] S101, collecting sample images with contamination points;
[0047] The E. coli liquid prepared according to the national standard was dripped on the surface of the plastic packaging to simulate contamination. The fluorescence hyperspectral imaging system was used to collect the fluorescence hyperspectral image of the surface of the plastic packaging sample to obtain the original fluorescence hyperspectral image. The following equipment parameters were set in the experiment: the scanning platform moving speed was 11.53mm / s; the frame rate was 49.47Hz; the object distance between the plastic sample and the lens was 320mm; the exposure time of the hyperspectral camera was 11ms; and the excitation light wavelength was 365nm.
[0048] S102: Image processing;
[0049] S1021, cropping a specific picture area of the image of each independent sample plate, and then performing a screening operation on the full spectrum area data greater than zero to obtain non-zero spectrum data, thereby screening out the region of interest.
[0050] S1022. According to the F value of the one-way ANOVA between the region of interest (ROI) and other background regions, the most significant single band value is selected to classify the image pixel as the E. coli inoculation point or the background.
[0051] S1023. Under specific wavelength conditions, use a K-means clustering segmentation method and an image opening operation to create a final binary image.
[0052] S1024. Then, a one-way ANOVA is performed again, and a final stable most significant band value is obtained through multiple calculations of F values, which is recorded as the characteristic wavelength of the material fluorescence image.
[0053] In an optional embodiment, a 2 cm × 2 cm material sample cut in advance is covered on the surface of the mixed bacterial solution in the culture dish using tweezers, the culture dish is placed in a self-made culture device prepared in advance, and quickly placed in an artificial climate box at 15°C for constant temperature and humidity control culture for 72 hours, and the obtained plastic packaging sample is regarded as a positive sample. The positive sample after culture is taken out from the artificial climate box, and a fluorescence hyperspectral imaging system is used to collect a fluorescence hyperspectral image of the surface of the positive sample.
[0054] In an optional embodiment, E. coli liquid is used to simulate contamination, and the simulated concentration gradient is 10 1 , 10 2 , 10 3 , 10 4 CFU / mL.
[0055] It should be noted that in this step, image data processing is based on effective bands. The fluorescence hyperspectral imaging system uses ultraviolet light source to excite imaging, and the acquisition process is in a dark state.
[0056] S2, image recognition and extraction;
[0057] The image is processed using the characteristic wavelength of the material fluorescence image, and a binary image with the position of the marked data point is obtained after screening the non-zero spectral band data. The selected data image is segmented using the K-means clustering and opening operation algorithms to generate the final mask image as the final marked point image.
[0058] S3, spectral data preprocessing;
[0059] The fluorescence spectra of all pixels in S2 are analyzed and the fluorescence spectrum data are preprocessed.
[0060] In this application, normalization, standardization, moving window average smoothing, first-order derivative, and standard normal transformation are used to preprocess the spectral data.
[0061] S4, characteristic wavelength extraction;
[0062] Identify and extract characteristic wavelength variables from spectral data, and select the optimal characteristic wavelength variable.
[0063] In this application, the adaptive reweighted sampling CARS algorithm, recursive feature elimination RFE algorithm, random forest RF algorithm and principal component analysis-linear discriminant analysis PCA-LDA algorithm combined with the bootstrap method are used to identify and extract characteristic variables from spectral data and select the optimal characteristic wavelength variable.
[0064] In this application, the bootstrap method sets the number of iterations to 100.
[0065] S5, model building;
[0066] A discriminant model for microbial biofilm on the surface of plastic packaging was established based on the original fluorescence spectral data, the preprocessed fluorescence spectral data and the fluorescence spectral data after characteristic wavelength extraction, and the optimal discriminant model was obtained by comparison.
[0067] The support vector method (SVM), decision tree (DT) and K-nearest neighbor (KNN) algorithm were used to establish a discriminant model for Escherichia coli biofilm on the surface of plastic packaging for the original fluorescence spectral data, the preprocessed fluorescence spectral data and the spectral data after characteristic wavelength extraction, and the optimal discriminant model was obtained by comparison.
[0068] Figure 3A flowchart of establishing a discriminant model for Escherichia coli biofilm on the surface of plastic packaging provided by an exemplary embodiment of the present application is shown, and the specific steps are as follows: performing K-means clustering segmentation processing and opening operation processing on the screening image at the significant band; obtaining a marker point image; preprocessing the fluorescence spectrum data by normalization, standardization, moving window average smoothing, first-order derivative, and standard normal transformation, and selecting the optimal preprocessing method; extracting feature variables from the spectral data by using the adaptive reweighted sampling CARS algorithm, recursive feature elimination RFE algorithm, random forest RF algorithm, and principal component analysis-linear discriminant analysis PCA-LDA algorithm combined with the bootstrap method; establishing a support vector method SVM model, a decision tree DT model, and a K nearest neighbor KNN model for the original, preprocessed, and feature wavelength extracted spectral data.
[0069] In this application, the support vector machine (SVM) uses the Bayesian optimization method to select the optimal parameter settings.
[0070] In this application, the K-nearest neighbor (KNN) algorithm uses network search cross-validation to perform parameter optimization, and the search space is set to [2, 10].
[0071] In summary, the present application provides a method for rapid detection of microorganisms on the surface of plastic packaging, which is based on fluorescent hyperspectral imaging technology, will not damage the packaging, is a non-destructive testing instrument, and is environmentally friendly and pollution-free.
[0072] The image characteristic wavelength extraction method of Escherichia coli on the surface of plastic packaging film and the image analysis method used can be incorporated into the development of portable handheld imaging equipment for hygienic detection of food processing surfaces to achieve real-time rapid detection.
[0073] By using four preprocessing algorithms to preprocess the spectral data, the background noise and overlap of the original spectral data can be effectively reduced, and the differences between the spectra can be enhanced, so that the optimal data set can be selected from the four and the detection accuracy can be improved.
[0074] Using four characteristic band screening algorithms to extract features not only reduces redundant information in the data, improves the accuracy and reliability of the data, but also greatly reduces processing time and resource costs, making the data analysis process more efficient. By selecting the appropriate band screening algorithm, valuable information in spectral data can be better mined, providing more reliable data support for microbial detection.
[0075] Three modeling methods were used to establish a discriminant model, which fully utilized the multidimensional information of F-HSI data and extracted features from it, so that the model could accurately classify Escherichia coli biofilms on the surfaces of different plastic packaging materials.
[0076] In an exemplary embodiment, polyethylene PE is used as the plastic packaging, and the presence of Escherichia coli on the surface of polyethylene PE is detected in a laboratory.
[0077] Experimental verification:
[0078] Figure 4 FIG. 1 shows a schematic diagram of image recognition and extraction results of an exemplary embodiment of the present application, taking polyethylene PE as an example, wherein Figure 4 (a) is the grayscale image of the 550nm band after the surface of polyethylene PE material was inoculated with E. coli. Figure 4 (b) is the spectral screening result, Figure 4 (c) is the result image after K-means clustering segmentation and opening operation, that is, the final marked point image.
[0079] Table 1 shows the results of the prediction set accuracy evaluation of the E. coli biofilm classification model on the surface of polyethylene PE plastic materials after different pretreatment methods. In the spectral data preprocessing step, a good support vector method classification SVM model was established using the standardized full spectrum data, and its performance was better than the original data and the support vector method SVM model established by all other pretreatment methods. The full spectrum support vector method SVM model after standardized processing achieved an accuracy rate of 87.36% in the prediction set, which was 31.28% higher than the original data.
[0080] Table 1 Comparison of pretreatment methods of SVM model for Escherichia coli biofilm on polyethylene (PE) plastic surface
[0081]
[0082] Table 2 shows the classification accuracy results of the E. coli biofilm detection model on the surface of polyethylene PE plastic materials established by different band screening methods. In the characteristic wavelength extraction step, the detection model established by random forest RF among the four band screening methods showed higher accuracy than the other three methods, and the prediction set OA was above 86%, while the model of recursive feature elimination RFE method was relatively poor.
[0083] In the model building step, the RF-KNN model (Random Forest-K Neighbor Algorithm) of polyethylene PE material has better accuracy and robustness compared with other developed models, with a prediction set accuracy of 92.9% and an F1 score of 0.94.
[0084] Table 2 Effects of different band screening methods on the accuracy of the classification model of Escherichia coli biofilm on polyethylene PE plastic surface
[0085]
[0086] In one example, the plastic packaging used was nylon PA, and the presence of E. coli on the surface of nylon PA was tested in the laboratory.
[0087] Experimental verification:
[0088] Figure 5 FIG. 1 shows a schematic diagram of image recognition and extraction results of an exemplary embodiment of the present application, taking nylon PA as an example, wherein Figure 5 (a) is the grayscale image of the 540nm band after E. coli was inoculated on the surface of nylon PA material. Figure 5 (b) is the spectral screening result, Figure 5 (c) is the result image after K-means clustering segmentation and opening operation, that is, the final marked point image.
[0089] Table 3 shows the results of the prediction set accuracy evaluation of the E. coli biofilm classification model on the surface of nylon PA plastic materials after different pretreatment methods. In the spectral data preprocessing step, the optimal SVM support vector method model established using the standardized preprocessed spectrum obtained a prediction set accuracy of 90.26% in the prediction set, which was 18.40% higher than the SVM support vector method model of the original data. In contrast, the first-order derivative preprocessing reduced some important differences between the spectra related to the attributes of interest, and the results after the first-order derivative preprocessing were worse than those under the original data condition.
[0090] Table 3 Comparison of pretreatment methods for classification model of Escherichia coli biofilm on nylon PA plastic surface
[0091]
[0092] Table 4 shows the classification accuracy results of the E. coli biofilm detection model on the surface of nylon PA plastic materials established by using different band screening methods. In the characteristic wavelength extraction step, compared with the full spectrum support vector method SVM model, the overall accuracy of the support vector method SVM model after different band screening may fluctuate slightly, but the fluctuation range does not exceed 0.75%. It is worth noting that the use of band screening technology can effectively simplify the model structure and significantly shorten the calculation time.
[0093] In the model building step, the RF-KNN model (Random Forest-K Neighbor Algorithm), PCA-LDA-KNN model (Principal Component Analysis-Linear Discriminant Analysis-K Neighbor Algorithm) and PCA-LDA-SVM model (Principal Component Analysis-Linear Discriminant Analysis-Support Vector Method) showed excellent results, with the accuracy rates of 95%, 93% and 91% on the prediction set, respectively. Through the comprehensive evaluation of the prediction set parameters, it was found that the RFE recursive feature elimination RFE-KNN model prediction set accuracy rate was only 80%, with a specificity of 70%, but its performance was slightly insufficient compared to other models.
[0094] Table 4 Effects of different band screening methods on the accuracy of Escherichia coli biofilm classification model on nylon PA plastic surface
[0095]
[0096]
[0097] In summary, this application is based on fluorescence hyperspectral imaging technology. After obtaining the biofilm area through the image processing process, the spectral preprocessing method and the spectral characteristic wavelength screening method are used to construct a biofilm detection model, analyze and evaluate the modeling results, select the optimal modeling method, and confirm the possibility of real-time biofilm detection using fluorescence hyperspectral imaging technology. The image analysis method and modeling method used in this application realize rapid and non-destructive detection of microbial contamination on the surface of packaging films, and have been improved in terms of speed, accuracy and reliability. It does not require sample preparation, does not contain chemical substances, and will not cause environmental pollution. The detection method of this application can be incorporated into the development of portable handheld imaging equipment for hygienic detection of food processing surfaces.
[0098] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the present disclosure, rather than to limit the scope of the present invention.
[0099] It is understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the present disclosure.
[0100] It can be understood that the various implementation modes described in this specification can be implemented individually or in combination, and the present disclosure is not limited to this.
[0101] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0102] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for rapid detection of microorganisms on the surface of plastic packaging, characterized in that: The method comprises: S1, using a fluorescence hyperspectral imaging system to collect sample fluorescence hyperspectral images and obtain characteristic wavelengths of material fluorescence images; S2, using the characteristic wavelength of the material fluorescence image to process the image, obtain a binary image with the position of the marked data point after screening the non-zero spectral band data, apply K-means clustering and opening operation algorithm to segment the selected data image, and generate the final mask image as the final marked point image; S3, performing data analysis on the fluorescence spectra of all pixels in S2 and preprocessing the fluorescence spectrum data; S4, identifying and extracting characteristic wavelength variables from spectral data, and selecting the optimal characteristic wavelength variable; S5, establish a discrimination model for microbial biofilm on the surface of plastic packaging based on the original fluorescence spectrum data, the preprocessed fluorescence spectrum data, and the fluorescence spectrum data after characteristic wavelength extraction, and compare to obtain the optimal discrimination model.
2. The method according to claim 1, characterized in that The fluorescence hyperspectral imaging system uses ultraviolet light source to excite imaging, and the collection process is all in a dark state.
3. The method according to claim 1, characterized in that The method for obtaining characteristic wavelength of material fluorescence image in S1 comprises the following steps: The microbial liquid prepared according to the national standard is dripped on the surface of the plastic packaging to simulate contamination, and the fluorescence hyperspectral image of the surface of the plastic packaging sample is collected by using the fluorescence hyperspectral imaging system to obtain the original fluorescence hyperspectral image; The image of each independent sample plate is cropped in a specific picture area, and then the full spectrum area data is filtered to be greater than zero to obtain non-zero spectrum data, thereby filtering out the region of interest ROI; According to the F value of the one-way ANOVA between the region of interest ROI and other background areas, the most significant single band value X nm was selected to classify the image pixels as microbial inoculation points or background; At a specific wavelength of X nm, the final binary image is created using the K-means clustering segmentation method and image opening operation; The one-way ANOVA was performed again, and through multiple calculations of F values, a final stable most significant band value was obtained, which was recorded as the characteristic wavelength of the material fluorescence image.
4. The method according to claim 1, characterized in that: The preprocessing method in S3 adopts normalization, standardization, moving window average smoothing, first-order derivative, and standard normal transformation.
5. The method according to claim 1, characterized in that The method for extracting characteristic wavelengths in S4 adopts an adaptive reweighted sampling CARS algorithm, a recursive feature elimination RFE algorithm, a random forest RF algorithm, and a principal component analysis-linear discriminant analysis PCA-LDA algorithm combined with a bootstrap method.
6. The method according to claim 5, characterized in that The bootstrap method sets the number of iterations to 100.
7. The method according to claim 1, characterized in that The modeling method in S5 adopts support vector machine (SVM) algorithm, decision tree (DT) algorithm and K nearest neighbor (KNN) algorithm.
8. The method according to claim 7, characterized in that The SVM uses Bayesian optimization methods to select the optimal parameter settings.
9. The method according to claim 7, characterized in that: The KNN uses network search cross-validation to perform parameter optimization, and the search space is set to [2, 10].
10. A device for rapid detection of microorganisms on the surface of plastic packaging, characterized in that: The device comprises: Acquisition spectrum image module: used to acquire sample fluorescence hyperspectral images using a fluorescence hyperspectral imaging system and obtain characteristic wavelengths of material fluorescence images; Image recognition and extraction module: used to process images using the characteristic wavelength of material fluorescence images, obtain a binary image with marked data point positions after screening non-zero spectral band data, apply K-means clustering and opening operation algorithms to segment the selected data image, and generate the final mask image as the final marked point image; Spectral data preprocessing module: used to perform data analysis on the fluorescence spectra of all pixels in the image recognition and extraction module and preprocess the spectral data; Characteristic wavelength extraction module: used to identify and extract characteristic wavelength variables from spectral data and select the optimal characteristic wavelength variables; Model building module: used to build a discrimination model for microbial biofilm on the surface of plastic packaging based on the original fluorescence spectrum data, pre-processed fluorescence spectrum data, and spectrum data after characteristic wavelength extraction, and compare to obtain the optimal discrimination model.
