CN-122023949-A - Multi-level processing-based tea impurity detection method, system, equipment and medium
Abstract
The application discloses a tea impurity detection method, a system, equipment and a medium based on multi-level processing, which are used for responding to detection instructions to obtain tea images to be detected, carrying out layer-by-layer convolution and downsampling on the tea images to be detected to obtain Initial feature maps of different levels; is a positive integer; Resolution difference between initial feature maps of different levels Initial feature map execution at different levels Secondary characteristic processing operation to obtain the first And according to the 1 st enhancement feature map, obtaining a detection result of the tea image to be detected, and generating a high-precision pixel level separation result by combining feature enhancement and gradual fusion through multi-level feature extraction, thereby improving the accuracy rate of tea impurity detection.
Inventors
- Zou Dengpeng
- TANG ZHE
- QI FANG
- ZOU ZHENHUA
Assignees
- 中南大学
- 长沙湘丰智能装备股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. A multi-level processing-based tea impurity detection method, characterized in that the method comprises the following steps: Responding to the detection instruction, and acquiring a tea image to be detected; carrying out layer-by-layer convolution and downsampling on the tea image to be detected to obtain Initial feature maps of different levels; Is a positive integer, the The resolution is different between the initial feature maps of the different levels; for the said Initial feature map execution at different levels Secondary characteristic processing operation to obtain the first The 1 st enhancement feature map is output after the secondary feature processing; Obtaining a detection result of the tea image to be detected according to the 1 st enhancement feature map; Wherein said pair of said Initial feature map execution at different levels Any one of the secondary feature processing operations includes: For the first The initial feature images are subjected to feature enhancement to obtain the first Enhanced feature map, and will be The enhancement feature map and the corresponding first Fusing the initial feature graphs to obtain the first Enhanced feature map, will be The enhancement feature map and the corresponding first Fusing the initial feature graphs to obtain the first And the enhancement feature images are analogized in sequence until the 1 st enhancement feature image is fused with the corresponding 2 nd initial feature image to obtain the 1 st enhancement feature image, wherein, 。
- 2. A multi-stage treatment-based tea leaf impurity detection method according to claim 1, wherein said pair of first The initial feature images are subjected to feature enhancement to obtain the first A plurality of enhanced feature graphs comprising: From the first Extracting a plurality of local features and global context features from the initial feature graphs respectively, wherein the local features are different in receptive field; Fusing each local feature and the global context feature to obtain the first And (5) enhancing the characteristic diagram.
- 3. A multi-stage treatment-based tea leaf impurity detection method according to claim 2, wherein said step of detecting said tea leaf impurity from said first step Extracting a plurality of local features and global context features from the initial feature map, respectively, includes based on depth separable convolution and hole convolution from the first A plurality of local features and global context features are extracted from the initial feature maps, respectively.
- 4. A multi-stage treatment-based tea leaf impurity detection method according to claim 1, wherein said pair of said Initial feature map execution at different levels Any one of the secondary feature processing operations, including: Putting the first step The enhancement feature map and the corresponding first Performing scale alignment and channel alignment on the initial feature images to obtain aligned feature images; Generating a soft attention weight based on each of the aligned feature maps; according to the soft attention weight, to the first The enhancement feature map and the corresponding first Dynamically weighting and fusing the initial feature images to obtain the first feature image And a plurality of enhanced feature maps, wherein, Is a positive integer which is used for the preparation of the high-voltage power supply, Less than or equal to , 。
- 5. A multi-level processing based tea leaf impurity detection method according to claim 4 and wherein said generating soft attention weights based on each of said post-alignment feature maps comprises: Adding the aligned feature images element by element to generate an intermediate feature image; extracting global channel context information and local channel context information from the intermediate feature map respectively; and combining the global channel context information with the local channel context information, and mapping the global channel context information to a range from 0 to 1 through an activation function to obtain the soft attention weight.
- 6. The multi-level processing-based tea impurity detection method according to claim 1, wherein the obtaining the detection result of the tea image to be detected according to the 1 st enhancement feature map comprises: Classifying the 1 st enhancement feature map pixel by pixel to obtain the class probability of each pixel; And respectively determining the final class label of each pixel according to the class probability of each pixel so as to generate a pixel-level separation result graph consistent with the resolution of the tea image to be detected.
- 7. A multi-level processing-based tea leaf impurity detection method according to claim 6, wherein after the detection result of the tea leaf image to be detected is obtained according to the 1 st enhancement feature map, the method further comprises: determining impurities in the tea image to be detected according to the pixel level classification result diagram so as to extract contour boundaries, center coordinates, area information and grabbing anchor points of the impurities; and transmitting the outline boundary, the center coordinates, the area information and the grabbing anchor points of the impurities to an executing mechanism so as to execute corresponding rejecting and sorting operations through the executing mechanism.
- 8. A multi-level processing-based tea impurity detection system, the system comprising: The response module is used for responding to the detection instruction and acquiring a tea image to be detected; A first module for performing layer-by-layer convolution and downsampling on the tea image to be detected to obtain Initial feature maps of different levels; Is a positive integer, the The resolution is different between the initial feature maps of the different levels; A second module for the following Initial feature map execution at different levels Secondary characteristic processing operation to obtain the first The 1 st enhancement feature map is output after the secondary feature processing; the detection module is used for obtaining a detection result of the tea image to be detected according to the 1 st enhancement feature map; Wherein said pair of said Initial feature map execution at different levels Any one of the secondary feature processing operations includes: For the first The initial feature images are subjected to feature enhancement to obtain the first Enhanced feature map, and will be The enhancement feature map and the corresponding first Fusing the initial feature graphs to obtain the first Enhanced feature map, will be The enhancement feature map and the corresponding first Fusing the initial feature graphs to obtain the first And the enhancement feature images are analogized in sequence until the 1 st enhancement feature image is fused with the corresponding 2 nd initial feature image to obtain the 1 st enhancement feature image, wherein, 。
- 9. An electronic device comprising at least one control processor and a memory communicatively coupled to the at least one control processor, the memory storing instructions executable by the at least one control processor to enable the at least one control processor to perform a multi-level processing-based tea leaf impurity detection method of any one of claims 1 to 7.
- 10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform a multi-level processing-based tea leaf impurity detection method according to any one of claims 1 to 7.
Description
Multi-level processing-based tea impurity detection method, system, equipment and medium Technical Field The application relates to the technical field of tea impurity detection, in particular to a tea impurity detection method, a system, equipment and a medium based on multi-level treatment. Background In the process of picking and refining tea leaves, various endogenous or exogenous impurities such as old stems, wax leaves, weeds, plastic ropes and the like are often mixed, so that the quality and the taste of the tea leaves are affected, and the food safety is more relevant. Therefore, in the tea refining production process, impurity detection is a key link for guaranteeing product quality and food safety. The existing detection technology mainly comprises manual picking, physical detection based on spectrum, traditional machine vision and target detection or semantic segmentation method based on deep learning. However, because the tea impurities generally have the characteristics of small scale, irregular shape, blurred edges and similar appearance to the tea body, the conventional semantic segmentation network in the prior art is easy to lose small target details in the downsampling process, and the conventional feature fusion mostly adopts simple splicing or addition, so that the global context information and local edge details are difficult to be simultaneously reserved. In addition, the existing method is mostly output by a target frame or a rough segmentation map, and cannot provide accurate contour information required by automatic rejection and mechanical grabbing, so that small-scale impurity omission and inaccurate edge segmentation are caused. Disclosure of Invention The main purpose of the disclosed embodiments is to provide a tea impurity detection method, system, equipment and storage medium based on multi-level processing, which can solve the technical problem of low accuracy of tea impurity detection in the prior art. A first aspect of an embodiment of the present application provides a method for detecting tea impurities based on multi-level processing, the method comprising: Responding to the detection instruction, and acquiring a tea image to be detected; carrying out layer-by-layer convolution and downsampling on the tea image to be detected to obtain Initial feature maps of different levels; Is a positive integer, the The resolution is different between the initial feature maps of the different levels; for the said Initial feature map execution at different levelsSecondary characteristic processing operation to obtain the firstThe 1 st enhancement feature map is output after the secondary feature processing; Obtaining a detection result of the tea image to be detected according to the 1 st enhancement feature map; Wherein said pair of said Initial feature map execution at different levelsAny one of the secondary feature processing operations includes: For the first The initial feature images are subjected to feature enhancement to obtain the firstEnhanced feature map, and will beThe enhancement feature map and the corresponding firstFusing the initial feature graphs to obtain the firstEnhanced feature map, will beThe enhancement feature map and the corresponding firstFusing the initial feature graphs to obtain the firstAnd the enhancement feature images are analogized in sequence until the 1 st enhancement feature image is fused with the corresponding 2 nd initial feature image to obtain the 1 st enhancement feature image, wherein,。 A first aspect of the embodiment of the application provides a tea impurity detection method based on multi-level processing, which is characterized by responding to detection instructions to obtain tea images to be detected, carrying out layer-by-layer convolution and downsampling on the tea images to be detected to obtainInitial feature maps of different levels; is a positive integer; Resolution difference between initial feature maps of different levels Initial feature map execution at different levelsSecondary characteristic processing operation to obtain the firstAnd according to the 1 st enhancement feature map, obtaining a detection result of the tea image to be detected, and generating a high-precision pixel level separation result by combining feature enhancement and gradual fusion through multi-level feature extraction, thereby improving the accuracy rate of tea impurity detection. To achieve the above object, a second aspect of the embodiments of the present invention provides a tea leaf impurity detection system based on multi-level processing, the system comprising: The response module is used for responding to the detection instruction and acquiring a tea image to be detected; A first module for performing layer-by-layer convolution and downsampling on the tea image to be detected to obtain Initial feature maps of different levels; Is a positive integer, the The resolution is different between the initial feature maps of the different leve