Mass detection system for staphylococcus aureus concentration of food sample

By designing a detection system including a chessboard format reagent disk, noise removal module and color recognition module, the existing Staphylococcus aureus concentration detection method has solved the problem of high cost and poor robustness, low cost, large-scale and high efficiency detection effect.

CN119418335APending Publication Date: 2025-02-11LUDONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411251414.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-07
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing Staphylococcus aureus concentration detection methods are costly, rely on manpower and equipment precision, poor robustness, and difficult to be applicable to large-scale food safety testing.

Method used

A large batch detection system for food sample Staphylococcus aureus concentrations including a checkerboard format reagent plate, a noise removal module and a color recognition module was designed. The system collects and develops color images through the camera, uses K-means to remove noise, and combines artificial intelligence technology to perform efficient noise denoising and high-precision recognition.

Benefits of technology

It realizes low-cost and large-scale inspection, improves inspection efficiency, reduces the burden on operators, reduces labor and time costs, and has high adaptability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418335A_ABST
    Figure CN119418335A_ABST
Patent Text Reader

Abstract

The invention discloses a food sample staphylococcus aureus concentration mass detection system. The system comprises: 1) a detection reagent preparation module; 2) a noise removal module; and 3) a color identification module, wherein the color identification module comprises: a. A data coding Embedding module; b, a data feature learning module; and c, a decision module. The de-noising module provides a new method for de-noising by using Kmeans, the reflection interference of the reagent sample is removed, the algorithm is different from a traditional method, and the method enables the noise module to have high adaptivity and robustness. The automatic detection method is low in cost, and the detection information of the reagent sample can be clearly known through the digital display screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of food safety and is suitable for low-cost large-scale detection projects of enterprise users. More specifically, it is a large-scale automated Staphylococcus aureus concentration detection system. Background Art

[0002] At present, the detection of Staphylococcus aureus concentration is closely related to the production of enterprises. Traditional detection methods include ELISA kits, chromogenic culture media, molecular biology-based detection methods, biosensors, etc. The above detection methods are too dependent on the precision of manpower and equipment, are costly, and have poor robustness, and are not suitable for large-scale food safety testing. Summary of the invention

[0003] In order to meet the requirements of large-scale, high-efficiency and fully automatic detection, the present invention provides a more efficient large-scale detection system for Staphylococcus aureus concentration of food samples.

[0004] A high-volume detection system for Staphylococcus aureus concentration in food samples, which includes:

[0005] 1) Detection reagent preparation module

[0006] Add samples and test reagents to the checkerboard reagent tray, and the camera captures the color image;

[0007] 2) Noise removal module

[0008] Use RGB, set 4 cluster center points, and set the number of iterations to 300 times; use the values ​​of the four cluster centers to replace all the pixels belonging to the cluster center, and save the replaced image information directly;

[0009] 3) Color recognition module

[0010] a. Data encoding Embedding module

[0011] The input image data size is img_size, the number of channels is channels, the convolution kernel size for dividing the data is patch_size, the encoded data dimension is embed_dim, the normalization parameter is layer_norm, a set of vectors clc_token for classification is added during the encoding process, and the output data is Emb_data;

[0012] b. Data feature learning module

[0013] Its network architecture is Layer norm normalization layer, multi-head attention layer, Dropout layer, residual node, layernorm layer, fully connected layer and dropout layer;

[0014] c. Decision-making module

[0015] It consists of two linear layers and an activation function, and the activation function is set to the GELU function.

[0016] The data feature learning module parameters are:

[0017] The categories of image classification are num_classes; the number of heads of the multi-head attention mechanism is num_head; the network layer depth of the entire multi-head attention layer is depth, and the network module composed of the depth of one layer of network is recorded as block; the activation function is act_layer, the regularization technique is norm_layer, the dropout probability of the Attention mechanism is atten_drop_rate, the ratio of neurons between the input and output of the hidden layer of the fully connected layer is mlp_ratio, and the dimension of the hidden layer of the fully connected layer is mlp_dim;

[0018] The output data is the data feature clc_token learned by the data feature learning module (model) from Emb_dat.

[0019] The data encoding Embedding module uses Layer Normalization specification technology, and the encoding method adopts the indexing method of the array.

[0020] The checkerboard reagent disc in the detection reagent preparation module is a 9-way reagent disc with 81 wells in total, and the color image format is jgp format with a dimension of 320*240 and 81 sets of data;

[0021] The noise removal module directly reads a 320*240 pixel image in jgp format from the server, converts it into a 320*240*3 array, and extracts the 224*224 center area of ​​each channel by slicing the array from the position where the number of rows is 48 and the number of columns is 8;

[0022] The output format of the data is 224*224*3 JPG format images, with a total of 81 images.

[0023] The data encoding Embedding module, img_size is set to 224, the number of channels is set to 3, the patch_size is set to 16, the embed_dim is set to 768, and the layer_norm is set to nn.LayerNorm;

[0024] First, the input data 3*224*224 is read, and the total data read is 81*3*224*224. For each group of 3*224*224 data, the data is divided into small blocks of 14*14 according to the convolution kernel of 16*16 size. All three channels are involved in the division, and each small block has 768 data. Finally, the dimension of the encoded data Emb_data is 81*196*768, and a full-zero vector clc_token with a data dimension of 1*1*768 is added after Emb_data. Finally, the output format of Emb_data is updated to 81*197*768, and Emb_dat is used as the output of the data encoding Embedding module and input into the data feature learning module.

[0025] The input data of the data feature learning module is the output data Embedding_data of the data encoding Embedding module, and the format is 81*197*768;

[0026] Set num_classes to 8, num_head to 12, depth to 12, act_layer to nn.GELU (Gaussian activation function), norm_layer to nn.LayerNorm, atten_drop_rate to 0, and mlp_ratio to 4.0;

[0027] The network structure of the data feature learning module is: a normalization layer (Layer norm normalization layer), a 12-head attention layer (multi-head attention layer), followed by a regularization layer (layer norm layer), and the drop rate of the regularization layer is set according to atten_drop_rate, wherein a residual node is added between the input of the normalization layer of the data and the output of the regularization layer, and then a fully connected layer is provided, wherein the dimension mlp_dim of the hidden layer of the fully connected layer is the product of embed_dim and the parameter mlp_ratio, and the activation function of the fully connected layer adopts the Tanh function, and similarly, a residual node is added between the output and input of the fully connected layer; this network structure constitutes a single block, and the depth is set to 12 blocks to form the final network architecture. After the data learning is completed, the output format is still 81*197*768, and only the data of the clc_token part is taken as the output of the submodule, that is, the output data dimension is 1*1*768, which is input into the decision module.

[0028] The detection process of the equipment is fully automated and easy to operate. Users do not need to master professional knowledge to complete large-scale detection tasks. The equipment is equipped with a microcomputer, which can realize real-time monitoring of data of large batches of test samples. The detection system combines artificial intelligence technology and adopts efficient noise removal algorithms and high-precision recognition algorithms to achieve accurate detection of samples.

[0029] The beneficial effects of the present invention are as follows:

[0030] 1. Based on the existing problems, the equipment automation detection method we provide is low-cost. It greatly improves the detection efficiency while reducing the burden on operators. It reduces the large labor costs for the production and life of the enterprise and saves a lot of time costs. The improved efficiency is unmatched by other detection equipment.

[0031] 2. The testing process of the equipment is pre-designed. Operators do not need professional knowledge of food safety. They can easily complete the testing work according to the implementation plan in the manual. The reagent sample testing information can be clearly obtained through the digital display screen.

[0032] 3. The denoising module of the present invention proposes a new method of using K_means denoising to achieve the removal of reflective interference of reagent samples. The algorithm is somewhat different from the traditional method. The use of this method is not only efficient but also low-cost. This method makes the noise module have higher adaptability and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is the overall flow chart of the present invention;

[0034] Figure 2 It is a schematic diagram of the structure of the detection model of the present invention;

[0035] Figure 3 This is a diagram of the principle process of preparing the detection reagent of the present invention. DETAILED DESCRIPTION

[0036] The principles and features of the present invention are described below in conjunction with examples. The examples are only used to explain the present invention and are not used to limit the scope of the present invention.

[0037] To achieve the above objectives, the present invention provides a device and a detection system capable of large-scale configuration of Staphylococcus aureus detection reagents, which differ from the prior art in that it includes a checkerboard-format detection reagent configuration module, a noise removal module, and a color recognition module.

[0038] The present invention is further illustrated by the following examples and parameters.

[0039] Checkerboard-style detection reagent configuration module

[0040] First, grind the sample to be tested into liquid and pour it into a reagent tube containing 0.5 mg / mL Ag-Mn-Fe3O4 immune nanoprobe. After suspending and reacting for 30 minutes, use a magnet to generate an external magnetic field on the reagent tube, discard the supernatant, and then add 81 μg / ml TMB solution. After reacting for five minutes, add 81μL HCI solution. After 30 seconds, remove the supernatant and add 81ul AuNRs solution to obtain the reagent sample solution with the best color development. The production principle is as follows: Figure 3 shown.

[0041] After the sample solution is configured, put it into the squares of the chessboard, cover the lid, start the power switch, and after the infrared detection switch detects the reagent, it will turn on the camera power and the camera will start to collect images. The applet on the reagent disk will send the collected images to the server. Taking the 9-way reagent disk as an example, there are a total of 81 sets of image data, and the dimension of each set of image data is 320*240.

[0042] The collected image is sent to the noise removal module, where the system will start to execute the python program to denoise each actual image. First, the image is read out in RGB format and converted into the format of numpy array to obtain the image width=320, height=240, channels=3. Then the three-dimensional array is converted into a two-dimensional array of (width * height=76800 channels=3). The two-dimensional data is divided by the k_means clustering classifier that can divide four cluster centers, and the values ​​of all pixels of this class are replaced by the values ​​of the cluster centers, that is, the vector quantization and image reconstruction technology of the image, and finally the image is saved.

[0043] The user can retrain the model or call the trained weight parameters to directly start the concentration detection. If the weights need to be retrained, the images need to be divided into different folders according to different colors and the folders need to be named according to the colors, and the training task can be performed; if the trained weights are used, the system will directly call the detection system.

[0044] Here, the trained weights are used as an example to introduce the implementation of the detection model. The image after noise removal is preprocessed. The preprocessing method is to crop the image into a small image of 224*224 to suit the input format of the detection model. The preprocessed data enters the data encoding Embedding module. The Embedding module sets the parameters img_size=224, patch_size=16, channels =3, and the number of encoded features embed_dim=768, that is, the image is divided into multiple sub-blocks. The size of the sub-block can be selected. Here, the size of 16×16 is used. After the sub-blocks are divided, a cls_token is added for classification tasks, and then added to the corresponding position of the position encoding. The position encoding uses two-dimensional position encoding, and the cls_token encoding is set to 0. After the network structure with the preset value of the first sub-module automatically encodes the data, the output Emb_data (81*197*768) of the first sub-module is obtained, which constitutes the input of the second sub-module of the color recognition module.

[0045] In the color recognition module of the reagent concentration detection system, the second submodule data feature learning module composed of stacked depths is the core architecture of the detection system. A single depth is composed of two normalization layers (before the attention layer and after the residual link layer respectively), an attention layer, a residual link and an MLP (multi-layer perceptron, including Linear, GRLU, Linear, and Dropout). Each detection model composed of depth, i.e., the block part, has its own parameters, and the parameters are not shared between blocks. The dimension remains unchanged after passing through the block.

[0046] After that, the output data of the data feature learning module enters the decision module; this is a classification submodule, and the dimensions of the input and output vectors of the decision module are consistent. The decision module here is directly implemented using an ordinary fully connected layer, and the output dimension is the number of categories that the reagent needs to be classified into. The output value is the probability that the sample belongs to each category. The category with the largest corresponding probability value is selected as the judgment of the sample category and then the result is output.

[0047] The present invention is further illustrated by the following examples and parameters.

[0048] Use a 9-way chessboard reagent disk to collect data, perform 8-classification tasks, and set the number of block modules to 12:

[0049] First, grind the sample to be tested into liquid and pour it into a reagent tube containing 0.5 mg / mL Ag-Mn-Fe3O4 immune nanoprobe. After suspending and reacting for 30 minutes, use a magnet to generate an external magnetic field on the reagent tube, discard the supernatant, and then add 81 μg / ml TMB solution. After reacting for five minutes, add 81μL HCI solution. After 30 seconds, remove the supernatant and add 81ul AuNRs solution to obtain the reagent sample solution with the best color development. The production principle is as follows: Figure 3 shown.

[0050] After the sample solution is configured, put it into the squares of the chessboard, cover the lid, start the power switch, and after the infrared detection switch detects the reagent, it will turn on the camera power and the camera will start to collect images. The applet on the reagent disk will send the collected images to the server. Taking the 9-way reagent disk as an example, there are a total of 81 sets of image data, and the dimension of each set of image data is 320*240.

[0051] Put the divided pictures into the noise removal module, where the system will start to execute the python program to denoise each actual image. First, read each 320*240 image in RGB format and convert it to the format of numpy array, get the image width=320, height=240, channels=3, then convert the three-dimensional array into a two-dimensional array of (width*height=76800, channels=3) and record it as pixels, import the Kmeans object of the sklearn library, create a k_means clustering classifier, divide the four cluster centers, and then extract the category labels of the four cluster centers and the values ​​of the cluster centers cluster_centers, then create a new two-dimensional array new_pixels to store the new pictures, and replace the values ​​of all pixels belonging to the class with the values ​​of the cluster centers, that is, the vector quantization and image reconstruction technology of the image, and finally save the image. Then, it is passed into the reagent concentration detection system as the same batch of data for subsequent classification tasks.

[0052] The input image data is preprocessed into (81*3*224*224) and then input into the data encoding Embedding module of the color recognition module, which divides the image into fixed-size sub-blocks. The sub-block size is 16x16, and one image will generate (224 / 16)x(224 / 16)=14x14=196 sub-blocks, that is, the input sequence length is 196, and the dimension of each sub-block is 16x16x3=768, that is, 196 column vectors are input, and the dimension of each column vector is 768. The dimension of the linear projection layer is 768xN (N=196), so the dimension of the input after passing through the linear projection layer is still 196x768, that is, there are a total of 196 sub-blocks, and the dimension of each sub-block is 768. A classified pacch, namely cls_token, needs to be added here, so the dimension of a single image data is 197x768. And the position encoding is recorded for each token.

[0053] Detection model block, depth=1 inputs the input data (81*197*768) first into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout by the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0054] Detection model block, depth=2, input data (81*197*768) is first input into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout by the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0055] In the detection model block, depth=3, the input data (81*197*768) is first input into the normalization layer, and then into the 8-head attention layer (81*197*168). After the attention layer, it is normalized and dropout by the softmax function, and then passed through a fully connected layer and dropout. Then it is normalized and MLP, which enlarges the dimension (81*197*3072) and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0056] Detection model block, depth=4 inputs the input data (81*197*768) first into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout by the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0057] Detection model block, depth=5, input data (81*197*768) is first input into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout by the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0058] The detection model block, depth=6, first inputs the input data (81*197*768) into the normalization layer, then into the 8-head attention layer (81*197*168), and then passes through the attention layer, and then passes through the softmax function for normalization and dropout, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, and MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0059] The detection model block, depth=7, first inputs the input data into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout through the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0060] In the detection model block, depth=8, the input data is first input into the normalization layer, and then into the 8-head attention layer (81*197*168). After the attention layer, it is normalized and dropout by the softmax function, and then passed through a fully connected layer and dropout. Then it is normalized and MLP, and the MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0061] The detection model block, depth=9, first inputs the input data into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout through the softmax function, and then passes through a fully connected layer and dropout. Then it goes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0062] The detection model block, depth=10, first inputs the input data into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout through the softmax function, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0063] The detection model block, depth=11, first inputs the input data into the normalization layer, then into the 8-head attention layer (81*197*168), after the attention layer, it is normalized and dropout through the softmax function, and then passes through a fully connected layer and dropout. Then it goes through normalization and MLP, MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0064] The detection model block, depth=12, first inputs the input data (81*197*768) into the normalization layer, then into the 8-head attention layer (81*197*168), and then passes through the attention layer, and then passes through the softmax function for normalization and dropout, and then passes through a fully connected layer and dropout. Then it passes through normalization and MLP, and MLP enlarges the dimension (81*197*3072), and then reduces it to the original dimension (81*197*168). Finally, after the matrix dimension change, the output dimension is the same as the input dimension.

[0065] The data Emb_dat (81*197*768) output from the detection model block module is used, and the data clc_token of the sub-block marked as 0 is taken as the classification feature. At this time, the data dimension changes (81*768), and then it is passed through Layer_Norm and the activation function relu is used for nonlinear operation, and then it is passed to the decision module. After the linear layer (768*8), the probability (81*8) of the 8 categories to which the 81 samples belong is output, and then the category corresponding to the maximum probability of the 81 samples is selected as the type of reagent color, thereby judging the concentration range of the sample reagent.

[0066] In terms of parameter setting, by setting img_size, that is, the input image size, and patch_size, the number of matrix features can be specified. Depending on the hardware conditions and classification tasks, we can increase the number of features of a single sample by increasing img_size and reducing patch_size to obtain a more accurate classification effect. The network depth can be adjusted by setting depth. Each block contains 4 layers (here, a network layer containing learnable parameters is specified as one layer), namely 2 attention layers, and an MLP (containing 2 linear layers). This project believes that it is appropriate to set the parameter depth (that is, the number of blocks) to between 12 and 32. The parameter channels indicates the number of channels of the input data. Since the object of classification in this project is image data, channels should be 3, indicating three color channels. The parameter num_heads indicates the number of heads in the multi-head attention mechanism, and all heads can calculate the attention matrix in parallel. The parameter num_classes indicates the number of categories to be classified, so as to realize classification tasks in different scenarios for enterprise users.

[0067] Specifically, the above modules are connected through the following steps:

[0068] S1. The data collected by the chessboard-format detection reagent configuration module is input into the noise removal module, and then input into the submodule data encoding Embedding module of the detection system color recognition module;

[0069] S2. Input the output data of the data encoding Embedding module into the data feature learning module block, depth=1 to obtain the detection model block, depth=2 to output data;

[0070] S3. Input the output data of the detection model block, depth=2 into the detection model block, depth=3 to obtain the output data of the detection model block, depth=3;

[0071] S4. Input the output data of the detection model block, depth=3 into the detection model block, depth=4 to obtain the output data of the detection model block, depth=4;

[0072] S5. Input the output data of the detection model block, depth=4 into the detection model block, depth=5 to obtain the output data of the detection model block, depth=5;

[0073] S6. Input the output data of the detection model block, depth=5 into the detection model block, depth=6 to obtain the output data of the detection model block, depth=6;

[0074] S7. Input the output data of the detection model block, depth=6 into the detection model block, depth=7 to obtain the output data of the detection model block, depth=7;

[0075] S8. Input the output data of the detection model block, depth=7 into the detection model block, depth=8 to obtain the output data of the detection model block, depth=8;

[0076] S9. Input the output data of the detection model block, depth=8 into the detection model block, depth=9 to obtain the output data of the detection model block, depth=9;

[0077] S10. Input the output data of the detection model block, depth=9 into the detection model block, depth=10 to obtain the output data of the detection model block, depth=10;

[0078] S11. Input the output data of the detection model block, depth=10 into the detection model block, depth=11 to obtain the output data of the detection model block, depth=11;

[0079] S12. Input the output data of the detection model block, depth=11 into the detection model block, depth=12 to obtain the output data of the detection model block, depth=12;

[0080] S13. Input the output data of the detection model block, depth=12 into the decision module to obtain the output data.

[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0082] The training and parameter import of the Staphylococcus aureus concentration detection model of the present invention are further described below.

[0083] Before the data is passed in, some important and global parameters are first set and adjusted, such as: the number of categories (num_classes), the number of iterations (epochs), and the batch size (batch-size). In addition, since the network model is large, the training time is long and the data set required for training is huge, you can choose to freeze the weights when setting the parameters, that is, use the weights trained before the network or download more reliable weight data trained by large companies.

[0084] Specifically, batch_size: indicates the number of data (samples) passed to the program for training at a time. For example, our training set has 810 data. This means that if we set batch_size=81, the program will first use the first 81 parameters in the data set, that is, the 1st to 81st data, to train the model. When the training is completed, the weights are updated, and then the 82nd to 164th data are used for training until the 810 data in the training set are used for the tenth time. Advantages: It can reduce the use of memory, because we only take 81 data each time, so the amount of memory used for training will be relatively small. This is very effective when our computer memory cannot meet the needs of training all data at once. It can be understood as block training of the training data set. Improve the speed of training, because after each training, we will update the weight value to make it more accurate. So the training is completed faster.

[0085] Since this project is aimed at enterprise users, we choose to set batch_size to a larger value, such as 81. Enterprise users can use large chessboard-format reagent kits to hold multiple liquids to be tested, and use micro cameras to collect reagents in the chessboard reagent tray. The collected data is transmitted to the noise removal module in the detection system and processed in the subsequent color recognition module. The hardware equipment of enterprise users is more sufficient and has better performance than that of home users, and can support large-scale networks to process large amounts of data at one time.

[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A bulk detection system for Staphylococcus aureus concentration in food samples, comprising: 1) Detection reagent preparation module Add food samples and Staphylococcus aureus immune nanoprobe detection reagents to a checkerboard reagent tray to obtain a reagent sample solution with the best color development, and use a camera to collect color development images; 2) Noise removal module Use RGB, set 4 cluster center points, and set the number of iterations to 300 times; use the values ​​of the four cluster centers to replace all the pixels belonging to the cluster center, and save the replaced image information directly; 3) Color recognition module a. Data encoding Embedding module The input image data size is img_size, the number of channels is channels, the convolution kernel size for dividing the data is patch_size, the encoded data dimension is embed_dim, the normalization parameter is layer_norm, a set of vectors clc_token for classification is added during the encoding process, and the output data is Emb_data; b. Data feature learning module Its network architecture is Layer norm normalization layer, multi-head attention layer, Dropout layer, residual node, layer norm layer, fully connected layer and dropout layer; c. Decision-making module It consists of two linear layers and an activation function, and the activation function is set to the GELU function.

2. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 1, characterized in that: The data feature learning module parameters are: The categories of image classification are num_classes; the number of heads of the multi-head attention mechanism is num_head; the network layer depth of the entire multi-head attention layer is depth, and the network module composed of the depth of one layer of network is recorded as block; the activation function is act_layer, the regularization technique is norm_layer, the dropout probability of the Attention mechanism is atten_drop_rate, the ratio of neurons between the input and output of the hidden layer of the fully connected layer is mlp_ratio, and the dimension of the hidden layer of the fully connected layer is mlp_dim; The output data is the data feature clc_token learned by the data feature learning module (model) from Emb_dat.

3. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 2, characterized in that: The data encoding Embedding module uses Layer Normalization specification technology, and the encoding method adopts the indexing method of the array.

4. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 1, 2 or 3, characterized in that: The checkerboard reagent disc in the detection reagent preparation module is a 9-way reagent disc with 81 holes in total, and the color image format is jgp format with a dimension of 320*240 and 81 sets of data.

5. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 4, characterized in that: The noise removal module directly reads a 320*240 pixel image in jgp format from the server, converts it into a 320*240*3 array, and extracts the 224*224 center area of ​​each channel by slicing the array from the position where the number of rows is 48 and the number of columns is 8; The output format of the data is 224*224*3 JPG format images, with a total of 81 images.

6. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 5, characterized in that: The data encoding Embedding module, img_size is set to 224, the number of channels is set to 3, the patch_size is set to 16, the embed_dim is set to 768, and the layer_norm is set to nn.LayerNorm; First, the input data 3*224*224 is read, and the total data read is 81*3*224*224. For each group of 3*224*224 data, the data is divided into small blocks of 14*14 according to the convolution kernel of 16*16 size. All three channels are involved in the division, and each small block has 768 data. Finally, the dimension of the encoded data Emb_data is 81*196*768, and a full-zero vector clc_token with a data dimension of 1*1*768 is added after Emb_data. Finally, the output format of Emb_data is updated to 81*197*768, and Emb_dat is used as the output of the data encoding Embedding module and input into the data feature learning module.

7. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 6, characterized in that: The input data of the data feature learning module is the output data Embedding_data of the data encoding Embedding module, and the format is 81*197*768; Set num_classes to 8, num_head to 12, depth to 12, act_layer to nn.GELU (Gaussian activation function), norm_layer to nn.LayerNorm, atten_drop_rate to 0, and mlp_ratio to 4.

0.

8. The system for detecting the concentration of Staphylococcus aureus in large quantities in food samples according to claim 7, characterized in that: The network structure of the data feature learning module is: a normalization layer (Layer norm normalization layer), a 12-head attention layer (multi-head attention layer), followed by a regularization layer (layer norm layer), and the drop rate of the regularization layer is set according to atten_drop_rate, wherein a residual node is added between the input of the normalization layer of the data and the output of the regularization layer, and then a fully connected layer is provided, wherein the dimension mlp_dim of the hidden layer of the fully connected layer is the product of embed_dim and the parameter mlp_ratio, and the activation function of the fully connected layer adopts the Tanh function, and similarly, a residual node is added between the output and input of the fully connected layer; this network structure constitutes a single block, and the depth is set to 12 blocks to form the final network architecture. After the data learning is completed, the output format is still 81*197*768, and only the data of the clc_token part is taken as the output of the submodule, that is, the output data dimension is 1*1*768, which is input into the decision module.