Hyperspectral deep learning recognition method for anti-purple fringing recognition
Through the combination of Bayesian formula and neural network, sliding window technology is used to expand neighborhood features and construct a Bayesian prior discrimination network, which solves the problem of low recognition accuracy of information fuzzy areas in deep learning spectral recognition and realizes the detection of purple edges. Accurate identification of areas and improvement of identification accuracy.
Patent Information
- Application Number
- CN202210336884.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-31
AI Technical Summary
When existing deep learning spectral recognition algorithms deal with information fuzzy areas, especially purple edge areas, the prediction accuracy is low, resulting in a high machine sorting carry-out rate, and the object category information is unclear during the manual labeling process, resulting in training set prediction accuracy. There is a large difference with the actual prediction accuracy, making it difficult to achieve accurate identification.
The Bayesian formula is used to analyze the prior classification results of the surrounding areas, and combined with the neural network to identify the area to be identified. By constructing the Bayesian prior discrimination network and sliding window technology, the statistical table of neighborhood characteristic variables is expanded to improve the information fuzzy area. recognition accuracy.
Through the construction of regional spatial intersection technology and a priori discriminant network, the recognition accuracy of information fuzzy areas is improved, the spatial robustness of prediction is enhanced, the categories of information fuzzy areas such as purple edges are accurately predicted, and deep learning spectral image recognition is improved. overall accuracy.
Smart Images

Figure CN114708457B_ABST
Abstract
Description
[0001] Technology Neighborhood
[0002] The present invention belongs to the field of hyperspectral imaging and deep learning technology, and specifically relates to a hyperspectral deep learning recognition method for anti-purple fringing recognition. Background Art
[0003] In the process of hyperspectral recognition, areas with blurred information such as purple fringes often appear due to unclear shooting. To improve the recognition accuracy of these areas with blurred information, the pixels around the blurred areas can be combined for completion. In traditional deep learning methods, these areas with blurred information are often not labeled. This can certainly improve the prediction accuracy of the model in the training set, but in the actual production prediction process, these areas with blurred information will cause extremely serious consequences, including causing the machine to have a high sorting carryout rate. At present, the spectral recognition algorithms constructed by deep learning are often based on manually labeled category data. However, the manual labeling process often does not label the spectral information with unclear object category information, which leads to the high prediction accuracy of the deep learning model in the training set but poor accuracy in the actual production prediction. It is difficult to achieve accurate recognition of purple fringed areas under current recognition technology.
[0004] However, the type of this area can be predicted based on the category characteristics of the neighborhood points. Therefore, constructing a priori discriminant network based on prior knowledge of category distribution is of great significance for improving the recognition rate of deep learning algorithms. Summary of the invention
[0005] The technical problem solved by the present invention is to provide a hyperspectral deep learning recognition method for anti-purple fringing recognition, which first uses the Bayesian formula to analyze the surrounding area to obtain a priori classification results; then uses a neural network to recognize the area to be recognized, thereby improving the recognition accuracy.
[0006] Technical solution: In order to solve the above problems, the technical solution adopted by the present invention is as follows:
[0007] A hyperspectral deep learning recognition method for anti-purple fringing recognition is characterized by: firstly detecting the recognition results of the neighborhood according to the spectral characteristics of the neighborhood points of the point to be recognized in the hyperspectral image, and using the Bayesian formula to analyze the surrounding area to obtain a priori classification results; then using a neural network to recognize the area to be recognized, so as to improve the recognition accuracy of the network for areas lacking information.
[0008] Furthermore, the method specifically includes the following steps:
[0009] S1: Collect hyperspectral images of different substances, and perform data correction and noise reduction;
[0010] S2: annotate the spectral data of the collected hyperspectral images so that the areas with blurred information are classified into the same category;
[0011] S3: When training the model, first obtain the neighborhood feature variable statistics table, then build a Bayesian prior discriminant network, and use the Bayesian formula to analyze the surrounding area to obtain the prior classification results;
[0012] S4: Use a neural network to identify the area to be identified. If the output category is an area with ambiguous information, extract the neighborhood image of the area and use the Bayesian prior discriminant network for discrimination.
[0013] Furthermore, in step S2, the marked categories include categories to be identified and categories of regions with ambiguous information, and the categories of regions with ambiguous information include purple-edge regions.
[0014] Furthermore, the specific implementation method of step S3 is as follows:
[0015] S31: First, construct an n×n sliding window, where n is an odd number greater than 1;
[0016] S32: Use a sliding window to slide on the image to collect neighborhood features, and construct a neighborhood feature variable statistics table and the corresponding central pixel type;
[0017] S33: Divide the image into 4 neighborhood blocks, merge the elements in these blocks, and merge the elements in the blocks into class c;
[0018] S34: Perform position crossover on the neighborhood characteristic variable statistical table, store the crossover result in the neighborhood characteristic variable statistical table, and continuously expand the neighborhood characteristic variable statistical table.
[0019] S35: Construct a Bayesian classifier based on the neighborhood features of different blocks.
[0020] Furthermore, in step S33, when pixel blocks are merged, the following method is used:
[0021] S331: Initialize a two-dimensional category list and add the first pixel block to the category list;
[0022] S332: Take the next pixel block from the collected pixel blocks and compare it with all element blocks in the category list. The pixel blocks that meet the following comparison conditions are added to the same one-dimensional category list. Otherwise, a new one-dimensional category list is created and included in the created two-dimensional category list. The comparison conditions are as follows:
[0023]
[0024] Where b1 and b2 represent two pixel blocks to be compared, and n represents the size of the sliding window;
[0025] S333: Repeat the steps in S332 until all pixel blocks are compared with the elements in the two-dimensional category list. After the comparison is completed, the number of one-dimensional category lists in the two-dimensional category list is the number c of pixel block types.
[0026] Furthermore, the function of the constructed Bayesian classifier is as follows:
[0027]
[0028] Where P represents the corresponding conditional probability, y represents the central pixel type, x represents the four block types, and c represents the number of pixel block types.
[0029] Beneficial effects: Compared with the prior art, the advantages of the present invention include:
[0030] (1) The present invention applies regional spatial intersection technology to the neighborhood of hyperspectral image recognition. For the originally information-fuzzy area, the spatial pixel information of the neighborhood points is predicted using regional spatial intersection technology to predict the information-fuzzy area such as purple fringes, thereby improving the recognition accuracy of spectral image recognition based on deep learning.
[0031] (2) In the process of constructing the prior discriminant network, the present invention performs block-level pixel fusion on different blocks of pixels, so that the neighborhood features are expanded and the spatial robustness of the prediction is improved.
[0032] (3) The present invention utilizes the neighborhood information of information fuzzy areas such as purple fringes to construct a priori discriminant network, and constructs fuzzy information categories for the neural network. After predicting the fuzzy information category, the neighborhood feature information of information fuzzy areas such as purple fringes is combined to accurately predict the category of the fuzzy information area, thereby improving the recognition accuracy of spectral images based on deep learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is the influence caused by the purple-edge area;
[0034] Figure 2 This is an example of a spectrum with additional labeled categories;
[0035] Figure 3 It is a prediction process diagram. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with specific embodiments.
[0037] The hyperspectral deep learning recognition method for anti-purple fringing recognition of the present invention mainly comprises the following steps:
[0038] Step 1: Collect some mixed hyperspectral images of different substances, and perform data correction and noise reduction. The collected images are as follows: Figure 1 As shown, it can be seen that the spectral characteristics of the central area of the object and the blurred edge information area are quite different, which affects the prediction of the blurred information area;
[0039] The FX10E series hyperspectral imager from SPECIM of Finland was used to obtain the reflectance spectrum images of plants in the range of 400 to 1000 nm;
[0040] Step 2: First, annotate the spectral data of the collected hyperspectral image to ensure that areas with blurred information such as purple fringing are classified into the same category.
[0041] The annotated categories include the categories to be identified and the categories with ambiguous information such as purple fringes. In addition, the spectrum of the annotated categories is added, such as Figure 2 There is also data with additional labels that can be used to train deep neural networks.
[0042] Step 3: During the model training process, a Bayesian prior discriminant network is first constructed to count the category relationship between each point and the neighboring points, and a neighborhood feature variable statistics table is obtained based on the spectral characteristics of the neighboring points of the points to be identified in the hyperspectral image. The specific implementation steps are as follows:
[0043] Step 31: First, construct an n×n sliding window, where n is an odd number greater than 1;
[0044] Step 32: Use a sliding window to slide across the image to collect neighborhood features and construct A statistical table of neighborhood feature variables and the corresponding central pixel type y;
[0045] Step 33: Divide the image into 4 neighborhood blocks, merge the elements in these blocks, and merge the elements in the blocks into class C; the specific method of merging pixel blocks is as follows:
[0046] Step 331: Initialize a two-dimensional category list and add the first pixel block to the category list;
[0047] Step 332: Take the next pixel block from the collected pixel blocks and compare it with all element blocks in the category list. The pixel blocks that meet the following comparison conditions are added to the same one-dimensional category list. Otherwise, a new one-dimensional category list is created and included in the created two-dimensional category list. The comparison conditions are as follows:
[0048]
[0049] Where b1 and b2 represent two pixel blocks to be compared, and n represents the size of the sliding window;
[0050] Step 333: Repeat step 332 until all pixel blocks are compared with the elements in the two-dimensional category list. After the comparison is completed, the number of one-dimensional category lists in the two-dimensional category list is the number c of pixel block types.
[0051] Step 34: Perform position crossover on the neighborhood feature variable statistics table. Consider the sliding window as a matrix W. The specific method of performing position crossover on the neighborhood feature variable statistics table is as follows:
[0052] A. and Exchange and store the exchanged results in the neighborhood characteristic variable statistics table;
[0053] B. and Exchange and store the exchanged results in the neighborhood characteristic variable statistics table;
[0054] After the above steps, the statistical table of neighborhood characteristic variables is expanded, which improves the spatial robustness of prediction.
[0055] Step 3.5: Based on the different block neighborhood features, construct a Bayesian classifier. The constructed function is as follows:
[0056]
[0057] Where P represents the corresponding conditional probability, y represents the central pixel type, x represents the four block types, and c represents the number of pixel block types.
[0058] S4: Use a neural network to identify the area to be identified. If the output category is an area with ambiguous information, extract the neighborhood image of the area and use the Bayesian prior discriminant network for discrimination.
[0059] like Figure 3 As shown in the figure, from left to right are: the original image of the spectrum, the prediction result of the deep learning model (the area surrounded by white dotted lines in the figure is the unknown class, and the remaining gray area is the foreign body class. It can be seen that there are a lot of blurred areas around the plant stems due to the purple fringing effect) and the foreign body area identified by the Bayesian prior discriminant network (it can be seen that the misidentified purple-fringe area has been correctly identified and classified as non-foreign body).
Claims
1. A hyperspectral deep learning recognition method for anti-purple fringing recognition, characterized by: The following steps are involved: S1: Collect hyperspectral images of different substances, and perform data correction and noise reduction; S2: annotate the spectral data of the collected hyperspectral image so that the areas with ambiguous information are classified into the same category; the annotated categories include the categories to be identified and the areas with ambiguous information, and the areas with ambiguous information include the purple-edge areas; S3: when training the model, first obtain the neighborhood feature variable statistics table, then construct a Bayesian prior discriminant network, and use the Bayesian formula to analyze the surrounding areas to obtain the prior classification results; the specific implementation method is as follows: S31: First, construct an nxn sliding window, where n is an odd number greater than 1; S32: Use a sliding window to slide on the image to collect neighborhood features, and construct a neighborhood feature variable statistics table and the corresponding central pixel type; S33: Divide the image into 4 neighborhood blocks, merge the elements in these blocks, and merge the elements in the blocks into class C; when merging pixel blocks, the following method is used: S331: Initialize a two-dimensional category list and add the first pixel block to the category list; S332: Take the next pixel block from the collected pixel blocks and compare it with all element blocks in the category list. The pixel blocks that meet the following comparison conditions are added to the same one-dimensional category list. Otherwise, a new one-dimensional category list is created and included in the created two-dimensional category list. The comparison conditions are as follows: ; Where b1 and b2 represent two pixel blocks to be compared, and n represents the size of the sliding window; S333: repeat the steps in S332 until all pixel blocks are compared with the elements in the two-dimensional category list. After the comparison is completed, the number of one-dimensional category lists in the two-dimensional category list is the number c of pixel block types. S34: performing position crossover on the neighborhood characteristic variable statistical table, storing the crossover result in the neighborhood characteristic variable statistical table, and continuously expanding the neighborhood characteristic variable statistical table; S35: Building a Bayesian classifier based on different block neighborhood features; S4: Use a neural network to identify the area to be identified. If the output category is an area with ambiguous information, extract the neighborhood image of the area and use the Bayesian prior discriminant network for discrimination.
2. The hyperspectral deep learning recognition method for anti-purple fringing recognition according to claim 1 is characterized in that: The function of the constructed Bayesian classifier is as follows: ; Where P represents the corresponding conditional probability, y represents the central pixel type, x represents the four block types, and c represents the number of pixel block types.
