Port plant quarantine pest image intelligent identification method and system

CN122657523APending Publication Date: 2026-08-28TECH CENT OF GUANGZHOU CUSTOMS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611017511.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

当多尺度特征在不同尺度上表现出不一致的响应时,可能导致识别结果不可靠,但现有方法无法有效检测和处理这种情况,影响了实际应用中的识别准确性和鲁棒性

Benefits of technology

[0016]This invention improves the expressive power and robustness of multi-scale fusion features by calculating the consistency between image features at different scales and then performing weighted fusion. Compared to simple stitching or average weighting, it can more accurately capture the morphological features of harmful organisms. By acquiring discriminative feature descriptions, it accurately locates the discrimination region, fully utilizing the discriminative local features of harmful organisms and reducing background interference and the influence of similar species. By determining the stability of feature responses based on the degree of response fluctuation of multi-scale fusion features across different scales, it effectively detects and handles inconsistencies in multi-scale feature responses, avoiding identification errors. This invention achieves rapid, accurate, and reliable identification of harmful organisms in port plant quarantine, meeting the practical needs of port plant quarantine work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122657523A_ABST
    Figure CN122657523A_ABST
Patent Text Reader

Abstract

The application discloses a port plant quarantine harmful organism image intelligent identification method and system, relates to the technical field of computer vision and image recognition, and comprises the following steps: acquiring an original image of a plant sample to be quarantined; performing multi-scale decomposition on the original image, calculating the consistency degree between the features of the images at each scale to obtain scale reliability, and performing weighted fusion according to the scale reliability to obtain multi-scale fusion features; matching the multi-scale fusion features with harmful organism reference features to obtain candidate species categories; positioning a discrimination region according to a discriminative feature description and extracting features of the discrimination region, sorting the candidate species categories according to the difference between the features of the discrimination region and the harmful organism reference features; determining feature response stability according to the response fluctuation degree of the multi-scale fusion features on the images at each scale, determining a harmful organism species, and outputting the harmful organism species. The application improves the accuracy and reliability of harmful organism identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and image recognition technology, specifically to a method and system for intelligent image recognition of plant quarantine pests at ports of entry. Background Technology

[0002] Plant quarantine is a crucial means of preventing the cross-border spread of harmful organisms and protecting agricultural production and the ecological environment. In port plant quarantine work, the rapid and accurate identification of harmful species is a key step. Traditional methods of harmful organism identification mainly rely on manual microscopic examination, requiring quarantine personnel to possess extensive professional knowledge and experience. This is not only time-consuming and labor-intensive but also highly susceptible to subjective factors, making it difficult to guarantee accuracy. With the rapid development of international trade, the quantity of plants and their products entering ports has surged, and traditional manual identification methods can no longer meet the demands of efficient quarantine.

[0003] With the development of computer vision and deep learning technologies, image-based intelligent pest identification technology has gradually become a research hotspot. Existing image recognition methods typically employ single-scale feature extraction, which struggles to fully capture the morphological features of pests at different scales. Although some studies have proposed multi-scale feature extraction methods, feature fusion often employs simple concatenation or average weighting, failing to effectively evaluate the reliability of features at each scale, resulting in insufficient expressive power of the fused features. Existing methods rely primarily on global features during matching and identification, neglecting the discriminative local features of pests, making them susceptible to background interference and the influence of similar species, thus requiring improvement in identification accuracy.

[0004] Regarding the reliability assessment of recognition results, existing methods typically only rank the outputs based on matching scores, lacking in-depth analysis of the stability of the recognition results. When multi-scale features exhibit inconsistent responses at different scales, the recognition results may be unreliable, but existing methods cannot effectively detect and handle this situation, affecting the recognition accuracy and robustness in practical applications. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for intelligent image recognition of plant quarantine pests at ports of entry, aiming to solve at least one of the technical problems existing in the prior art.

[0006] The technical solution of this invention is: an intelligent image recognition method for plant quarantine pests at ports of entry, comprising the following steps: Obtain the original images of the plant samples to be quarantined; The original image is decomposed into multiple scale images, the features of each scale image are extracted, the consistency between the features of each scale image is calculated to obtain the scale reliability, and the features of each scale image are weighted and fused according to the scale reliability to obtain the multi-scale fused features. The multi-scale fusion features are matched with pre-stored harmful organism reference features to obtain candidate species categories; Obtain the discriminative feature descriptions corresponding to each candidate species in the candidate species category, locate the discriminative region in the original image based on the discriminative feature descriptions and extract the discriminative region features, and sort the candidate species categories according to the difference between the discriminative region features and the harmful organism reference features to obtain the sorting results; The stability of the feature response is determined by the degree of fluctuation in the response of the multi-scale fusion features corresponding to the candidate species in the ranking results on images of different scales. The harmful species are then identified and output based on the stability of the feature response.

[0007] The original image is decomposed into multiple scale images. Features of each scale image are extracted, and the consistency between the features of each scale image is calculated to obtain the scale reliability. Based on the scale reliability, the features of each scale image are weighted and fused to obtain the multi-scale fused features, including: The original image is decomposed into multiple scale images, and features of each scale image are extracted separately. The spatial correspondence intensity is obtained by calculating the spatial correspondence of features in images at different scales. The similarity of features in numerical distribution is obtained by calculating the spatial correspondence intensity. The consistency between features in images at different scales is obtained by fusing the spatial correspondence intensity and the distribution similarity. The coverage ratio is obtained by statistically analyzing the proportion of pixels contained in each scale image to the total number of pixels in the original image. The scale reliability is obtained by compensating for the consistency between features of each scale image based on the coverage ratio. The features of images at each scale are weighted according to the scale reliability, and the differences in feature response patterns of the features of images at each scale are compared. The feature complementarity coefficients are determined according to the degree of difference and the coverage ratio. The features of the weighted images at each scale are then fused after nonlinear mapping according to the feature complementarity coefficients to obtain multi-scale fused features.

[0008] The coverage ratio is obtained by statistically analyzing the proportion of pixels in each scale image to the total number of pixels in the original image. Scale reliability is then calculated by compensating for the consistency of features between images at different scales based on this coverage ratio. The coverage ratio is obtained by calculating the ratio of the number of pixels in the image at each scale to the number of pixels in the original image; The consistency degree between features of images at different scales is obtained, the ratio of consistency degree to coverage ratio is calculated, images with a ratio exceeding a preset range are identified as abnormal scale images, and compensation is performed on abnormal scale images according to the corresponding coverage ratio to obtain the compensated consistency degree. Calculate the response intensity distribution of features in the original image at each scale, extract regions with response intensities higher than a preset response threshold as effective response regions, and determine the sufficiency of feature representation by statistically analyzing the proportion of effective response regions. The initial scale reliability is obtained by weighted fusion of the consistency degree after compensation and the sufficiency of feature representation. The change rate of the initial scale reliability and the coverage ratio is calculated. The initial scale reliability corresponding to each scale image with a negative change rate is corrected to obtain the scale reliability.

[0009] By matching the multi-scale fused features with pre-stored harmful organism reference features, candidate species categories were obtained, including: The multi-scale fusion features are decomposed into local features and global features. The local matching degree between the local features and the local reference features corresponding to each species category in the pre-stored pest reference features, and the global matching degree between the global features and the global reference features corresponding to each species category in the pre-stored pest reference features are calculated respectively. The comprehensive matching degree between each species category and the multi-scale fusion feature is determined based on the local matching degree and the global matching degree. The distribution position of the comprehensive matching degree of each species category in all species categories of the pre-stored harmful organism reference features is calculated. The credibility of matching each species category with the multi-scale fusion feature is determined based on the distribution position. A joint evaluation is conducted based on the comprehensive matching degree between each species category and the multi-scale fusion feature, as well as the reliability of the matching between each species category and the multi-scale fusion feature. Species categories whose joint evaluation results are higher than the preset evaluation threshold are selected as candidate species categories.

[0010] Obtain the discriminant feature descriptions for each candidate species in the candidate species category. Based on the discriminant feature descriptions, locate the discriminant regions in the original image and extract the features of the discriminant regions. Rank the candidate species categories according to the difference between the discriminant region features and the harmful organism reference features. The ranking results include: The discriminative feature descriptions of each candidate species in the candidate species category are obtained from the pre-stored reference features of harmful organisms. The discriminative feature descriptions are used to determine the discriminative parts and discriminative feature attributes of each candidate species. The corresponding discriminative regions are located in the original image based on the discriminative parts. Based on the discriminant feature attributes, the discriminant region features are extracted from the discriminant region. The feature deviation between the discriminant region features and the standard discriminant features of the corresponding candidate species in the pre-stored harmful organism reference features is calculated. The difference degree of each candidate species is determined based on the feature deviation. The ranking of the difference degree of each candidate species within the candidate species category is calculated. The reliability of the difference degree of each candidate species is assessed based on the ranking position. The difference degree of each candidate species is adjusted according to the reliability assessment results to obtain the adjusted difference degree. The candidate species categories are then ranked based on the adjusted difference degree to obtain the ranking result.

[0011] The stability of the feature response is determined based on the degree of response fluctuation of the multi-scale fusion features corresponding to candidate species in the ranking results on images at various scales. Based on the feature response stability, harmful organism species are identified and output, including: Obtain the multi-scale fusion features corresponding to each candidate species in the ranking results, decompose the multi-scale fusion features into scale features corresponding to each scale, and construct the response distribution of the scale features corresponding to each scale on the corresponding scale image for each candidate species. Calculate the distribution difference between the response distributions at each scale, and determine the degree of response fluctuation of the multi-scale fusion features of each candidate species on the images at each scale based on the distribution difference. The correlation analysis of the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at each scale is performed with the ranking position of the corresponding candidate species in the ranking results to identify abnormal candidate species whose response fluctuation and ranking position conflict. The response fluctuation of the multi-scale fusion features corresponding to the abnormal candidate species on images of each scale is corrected to obtain the corrected response fluctuation. The feature response stability of each candidate species is determined based on the corrected response fluctuation. The ranking of each candidate species in the ranking results is adjusted by weighting the ranking positions of each candidate species based on the stability of their characteristic responses. The candidate species with the highest ranking position and the highest characteristic response stability is selected from the adjusted ranking results as the harmful species and output.

[0012] The correlation analysis between the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at various scales and the ranking position of the corresponding candidate species in the ranking results was performed to identify abnormal candidate species whose response fluctuation and ranking position conflicted. Extract the response fluctuation and ranking position of the multi-scale fusion features corresponding to each candidate species in the ranking results on images at various scales; The ranking results are divided into multiple ranking intervals according to the ranking position. The distribution range of the response fluctuation degree within each ranking interval is statistically analyzed. The deviation of the response fluctuation degree of each candidate species from the distribution range of its ranking interval is calculated. Candidate species with a deviation exceeding the width of the distribution range are identified as candidate species with abnormal fluctuations. The weights of features in each scale image during the formation of multi-scale fusion features corresponding to the candidate species with fluctuation anomalies are obtained, and the scale images whose feature weights are opposite to the direction of change of the fluctuation degree of the candidate species with fluctuation anomalies are identified as conflict scale images. The conflict ratio is obtained by comparing the number of conflict-scale images with the total number of scale images. Species with a conflict ratio higher than the normalized value of their response fluctuation in the ranking interval are identified as abnormal candidate species whose response fluctuation level conflicts with their ranking position.

[0013] This invention provides an intelligent image recognition system for plant quarantine pests at ports of entry, the system comprising: The image acquisition module is used to acquire the original images of the plant samples to be quarantined; The feature fusion module is used to decompose the original image into multiple scale images, extract the features of each scale image, calculate the consistency between the features of each scale image to obtain the scale reliability, and perform weighted fusion of the features of each scale image based on the scale reliability to obtain the multi-scale fused features. The species matching module is used to match multi-scale fused features with pre-stored harmful organism reference features to obtain candidate species categories; The species ranking module is used to obtain the discriminant feature descriptions corresponding to each candidate species in the candidate species category, locate the discriminant region in the original image based on the discriminant feature descriptions and extract the discriminant region features, and rank the candidate species categories according to the difference between the discriminant region features and the harmful organism reference features to obtain the ranking results; The results output module is used to determine the feature response stability based on the degree of response fluctuation of the multi-scale fusion features corresponding to the candidate species in the sorting results on images of various scales, and to determine and output the harmful species based on the feature response stability.

[0014] One technical solution provided in this embodiment of the invention is an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.

[0015] One technical solution provided in this embodiment of the invention is a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps in any of the aforementioned methods.

[0016] This invention improves the expressive power and robustness of multi-scale fusion features by calculating the consistency between image features at different scales and then performing weighted fusion. Compared to simple stitching or average weighting, it can more accurately capture the morphological features of harmful organisms. By acquiring discriminative feature descriptions, it accurately locates the discrimination region, fully utilizing the discriminative local features of harmful organisms and reducing background interference and the influence of similar species. By determining the stability of feature responses based on the degree of response fluctuation of multi-scale fusion features across different scales, it effectively detects and handles inconsistencies in multi-scale feature responses, avoiding identification errors. This invention achieves rapid, accurate, and reliable identification of harmful organisms in port plant quarantine, meeting the practical needs of port plant quarantine work. Attached Figure Description

[0017] Figure 1 A flowchart of the intelligent image recognition method for plant quarantine pests at ports provided in this embodiment of the invention; Figure 2 This is a schematic diagram of the intelligent image recognition system for plant quarantine pests at ports, according to an embodiment of the present invention. Detailed Implementation

[0018] like Figure 1 As shown, Figure 1 This is a flowchart of a method for intelligent image recognition of plant quarantine pests at ports of entry, provided in an embodiment of the present invention. The method includes the following steps: Step 101: Obtain the original image of the plant sample to be quarantined.

[0019] The original images can be automatically captured by high-definition industrial cameras or multispectral imaging equipment set up in the port quarantine inspection channel. During the shooting process, supplemental lighting is provided by a unified light source system to reduce the impact of ambient light changes on image quality.

[0020] Step 102: Perform multi-scale decomposition on the original image to obtain multiple scale images, extract features from each scale image, calculate the consistency between features of each scale image to obtain scale reliability, and perform weighted fusion of features of each scale image based on scale reliability to obtain multi-scale fused features.

[0021] In some embodiments of the present invention, step 102 may specifically include the following sub-steps: Sub-step 1021: Perform multi-scale decomposition on the original image to obtain multiple scale images, and extract features from each scale image separately; Sub-step 1022: Calculate the spatial correspondence of features in images at each scale in terms of spatial location to obtain spatial correspondence intensity; calculate the similarity of features in numerical distribution in images at each scale based on spatial correspondence intensity to obtain distribution similarity; and fuse spatial correspondence intensity and distribution similarity to obtain the consistency between features in images at each scale. Sub-step 1023: Calculate the coverage ratio by counting the number of pixels in each scale image relative to the number of pixels in the original image, and compensate for the consistency between features of each scale image based on the coverage ratio to obtain the scale reliability. Sub-step 1024: Weight the features of images at each scale according to the scale reliability, compare the degree of difference in feature response patterns of features at each scale, determine the feature complementarity coefficients according to the degree of difference and coverage ratio, and fuse the features of the weighted images at each scale after nonlinear mapping according to the feature complementarity coefficients to obtain multi-scale fused features.

[0022] After acquiring the original images of the plant samples to be quarantined, the original images are subjected to multi-scale decomposition. The decomposition process employs the image pyramid method, generating multiple scale images from the original image according to different scaling ratios. Specifically, the original image is retained as the first-scale image, and the width and height of the original image are scaled to 0.75 times the original size to obtain the second-scale image, and then scaled to 0.5 times to obtain the third-scale image, and so on, forming a multi-scale image sequence from coarse to fine. During the scaling process of each scale image, bilinear interpolation is used to maintain the smoothness of the image and avoid jagged edges that would affect the accuracy of subsequent feature extraction.

[0023] Features are extracted for each scale of the image. During feature extraction, each scale image is divided into several local regions. Within each local region, a color histogram, texture gradient, and edge response value are calculated. The color histogram summarizes the pixel distribution of each color channel within the region; the texture gradient reflects the texture changes of the region by calculating the gray-level differences between adjacent pixels; and the edge response value detects the edge intensity within the region through convolution operations. These three types of information are combined to form the feature vector of that region. The feature vectors of all local regions together constitute the complete feature representation of the image at that scale.

[0024] To calculate the spatial correspondence between features at different scales, a mapping of features in spatial location needs to be established due to the scaling relationship between images at different scales. Feature locations in the smaller-scale image are projected onto the larger-scale image according to the scaling ratio. The strength of the spatial correspondence is measured by comparing the offset distance between the projected location and the actual feature location. A smaller offset distance indicates stronger spatial consistency between the features at that location in the two scale images, while a larger offset distance indicates a weaker spatial correspondence. The offset distances of all feature locations are normalized so that the numerical value of the spatial correspondence strength ranges from 0 to 1; the closer the value is to 1, the stronger the spatial correspondence.

[0025] Building upon the spatial correspondence intensity, the similarity of image features at each scale in terms of numerical distribution is further calculated. For spatially corresponding feature vectors, the vector distance between them is calculated; a smaller distance indicates a more similar numerical distribution between the two feature vectors. Euclidean distance is used to measure the difference between feature vectors, converting the distance value into a similarity score. The similarity score is calculated by normalizing the reciprocal of the distance value. A similarity score of 1 indicates identical feature vectors, while a similarity score close to 0 indicates significant differences between feature vectors. Multiplying the spatial correspondence intensity by the distribution similarity score yields the degree of consistency between image features at each scale. This value comprehensively reflects the matching degree of features in both spatial location and numerical distribution dimensions.

[0026] The coverage ratio is calculated by counting the number of pixels in each scale image and determining its proportion to the total number of pixels in the original image. For images scaled proportionally, the coverage ratio is equal to the square of the scaling factor. For example, an image scaled at 0.75 has a coverage ratio of 0.5625, and an image scaled at 0.5 has a coverage ratio of 0.25. The coverage ratio characterizes the effective coverage of images at different scales in the spatial domain of the original image. Consistency is compensated based on the coverage ratio by multiplying the consistency ratio by the square root of the coverage ratio to obtain the reliability at that scale. The square root operation smooths out the influence of the coverage ratio, avoiding excessive amplification or reduction of the contributions from different scales. A higher reliability value indicates more reliable features at that scale, and it should be given greater weight in subsequent fusion processes.

[0027] The features of images at each scale are weighted according to their scale reliability. The feature vector of each scale image is multiplied by its corresponding reliability, so that the features of scales with high reliability receive a larger numerical response, while the features of scales with low reliability receive a correspondingly weaker response. The weighted features retain the information contribution of each scale while highlighting the scales with higher reliability.

[0028] This section compares the degree of difference in response patterns among image features at different scales. Feature response patterns refer to the relative magnitudes and distribution patterns of the components in a feature vector. The correlation coefficient between feature vectors at different scales is calculated. A correlation coefficient close to 1 indicates a high degree of consistency in the feature response patterns between the two scales, while a low correlation coefficient indicates significant differences in response patterns. The degree of difference is represented by subtracting the absolute value of the correlation coefficient from 1. A greater degree of difference indicates that different scales have captured different aspects of image information, and this information is complementary.

[0029] The feature complementarity coefficient is determined by combining the degree of difference and the coverage ratio. The feature complementarity coefficient is calculated by multiplying the degree of difference and the coverage ratio, and then normalizing it so that the sum of the complementarity coefficients of all scales is 1. The complementarity coefficient reflects the unique amount of information that each scale feature should contribute during the fusion process. Scales with a large degree of difference and a high coverage ratio obtain larger complementarity coefficients, indicating that the scale can provide more non-redundant effective information.

[0030] The weighted features at each scale are nonlinearly mapped based on feature complementarity coefficients. This nonlinear mapping is achieved using the hyperbolic tangent function. Each component of the weighted feature vector is multiplied by its corresponding complementarity coefficient, and then input into the hyperbolic tangent function for transformation. The hyperbolic tangent function enhances the discriminative power of the features, making the numerical differences between features more significant. The mapped feature vectors retain the original information structure while highlighting the complementary features at each scale.

[0031] The feature vectors from all scales, after nonlinear mapping, are fused by adding the corresponding components of the feature vectors from each scale to obtain a comprehensive multi-scale fused feature. This fused feature integrates information from images at different scales, including both global structural information captured by the coarse-scale image and local detail information provided by the fine-scale image, forming a complete feature description of the plant sample.

[0032] This invention, through the aforementioned multi-scale fusion feature extraction method, can fully utilize the complementary information of images at different scales, thereby improving the comprehensiveness and robustness of feature representation. The scale-based reliability-based weighting mechanism ensures the dominant role of high-quality scale features, and the introduction of feature complementarity coefficients effectively integrates the unique contributions of each scale, enabling the fused features to maintain stable recognition performance when facing quarantine pests of different shapes and sizes.

[0033] Sub-step 1023, which calculates the coverage ratio by counting the number of pixels in each scale image relative to the number of pixels in the original image, and then compensates for the consistency between features of each scale image based on the coverage ratio to obtain scale reliability, also includes: The coverage ratio is obtained by calculating the ratio of the number of pixels in the image at each scale to the number of pixels in the original image; The consistency degree between features of images at different scales is obtained, the ratio of consistency degree to coverage ratio is calculated, images with a ratio exceeding a preset range are identified as abnormal scale images, and compensation is performed on abnormal scale images according to the corresponding coverage ratio to obtain the compensated consistency degree. Calculate the response intensity distribution of features in the original image at each scale, extract regions with response intensities higher than a preset response threshold as effective response regions, and determine the sufficiency of feature representation by statistically analyzing the proportion of effective response regions. The initial scale reliability is obtained by weighted fusion of the consistency degree after compensation and the sufficiency of feature representation. The change rate of the initial scale reliability and the coverage ratio is calculated. The initial scale reliability corresponding to each scale image with a negative change rate is corrected to obtain the scale reliability.

[0034] The coverage ratio is calculated by comparing the number of pixels in the image at each scale with the number of pixels in the original image. The number of pixels in the original image is the product of its width and height, and the number of pixels in the scaled image is also the product of its width and height. An image scaled at 0.75 has 0.75 times the width and height of the original image, and 0.5625 times the number of pixels, resulting in a coverage ratio of 0.5625. An image scaled at 0.5 has 0.25 times the number of pixels, resulting in a coverage ratio of 0.25. The coverage ratio directly reflects the information capacity of the image at that scale relative to the original image.

[0035] After obtaining the consistency level among image features at each scale, the ratio of consistency level to coverage ratio is calculated. This ratio reflects the level of feature consistency within a unit coverage area. A preset range is set from 0.8 to 1.5. When the ratio is below 0.8, it indicates that although the image at that scale has a large coverage area, the feature consistency is weak. When the ratio is above 1.5, it indicates that the coverage area is small, but the feature consistency is abnormally high. Scale images with ratios outside this range are identified as anomalous scale images. For anomalous scale images with a ratio below 0.8, their feature consistency may be affected by noise or blurring, requiring upward compensation based on the coverage ratio. The compensation method is to multiply the original consistency level by the square root of the coverage ratio. For anomalous scale images with a ratio above 1.5, overfitting may exist, requiring downward compensation. The compensation method is to divide the original consistency level by the cube root of the coverage ratio. After compensation, the compensated consistency level is obtained, which more realistically reflects the reliability of features at each scale.

[0036] Calculate the response intensity distribution of image features at each scale in the original image. Map the features of the scaled images back to their corresponding positions in the original image according to the scaling relationship. Calculate the amplitude of each component of the feature vector at that position, and the sum of the squares of the amplitudes is taken as the response intensity at that position. Traverse all positions in the original image to form a complete response intensity distribution map. Set a preset response threshold of 1.2 times the average response intensity, and mark the positions with response intensities higher than this threshold as effective response regions. Effective response regions represent areas in the original image where the feature at that scale can produce a significant response. These regions typically correspond to key feature parts of quarantine pests. Count the number of pixels contained in the effective response regions and calculate their proportion to the total number of pixels in the original image. This proportion is defined as the feature expression sufficiency. A higher feature expression sufficiency indicates that the feature at that scale can activate more key regions in the original image and has stronger expressive power.

[0037] The initial scale reliability is obtained by weighted fusion of the compensated consistency level and the feature representation sufficiency level. The fusion formula is as follows: Where R0 represents the initial scale reliability, and C comp The formula represents the degree of consistency after compensation, E represents the sufficiency of feature representation, and α is the weighting coefficient with a value of 0.6. The weighting coefficient is set so that the degree of consistency after compensation plays a dominant role in the fusion process, while the sufficiency of feature representation provides auxiliary correction. The initial scale reliability comprehensively considers both the consistency and expressive power of features.

[0038] Calculate the rate of change between the initial scale reliability and the coverage ratio. Rate of change = (Initial scale reliability - Coverage ratio) / Coverage ratio. When the rate of change is positive, it indicates that the reliability of that scale increases faster than the coverage ratio, suggesting that the feature quality of that scale is high, and the initial scale reliability does not need correction. When the rate of change is negative, it indicates that although the scale has a large coverage ratio, its reliability has not improved accordingly, potentially indicating redundant information or low-quality features. For scale images with negative rates of change, their initial scale reliability is corrected. The correction method is to multiply the initial scale reliability by a correction factor, which is determined based on the absolute value of the rate of change; the larger the absolute value of the rate of change, the smaller the correction factor. Specifically, the correction factor is calculated as 1 minus half the absolute value of the rate of change. When the rate of change is -0.2, the correction factor is 0.9. Multiplying the initial scale reliability by 0.9 yields the corrected scale reliability. This correction operation reduces the weight of inefficient scales, preventing them from introducing too much redundant or low-quality information in subsequent fusion.

[0039] After correction, the final scale reliability is obtained, which accurately reflects the actual reliability of image features at each scale. Scale reliability not only considers the consistency and expressive power of features, but also eliminates the interference of abnormal and inefficient scales through anomaly detection and change rate analysis, ensuring that the subsequent fusion process can prioritize the use of high-quality scale features and improve the overall quality of multi-scale fusion features.

[0040] This invention effectively identifies and corrects feature biases caused by noise or overfitting through anomaly scale detection and compensation mechanisms. The introduction of feature representation sufficiency assesses the actual expressive power of features from the perspective of response intensity, overcoming the limitations of relying solely on consistency evaluation. Rate of change analysis further filters out efficient scale features, avoiding the negative impact of redundant information on the fusion results, ensuring that the final scale reliability truly reflects the contribution value of each scale.

[0041] Step 103: Match the multi-scale fused features with the pre-stored harmful organism reference features to obtain candidate species categories.

[0042] In some embodiments of the present invention, step 103 may specifically include the following sub-steps: Sub-step 1031: Decompose the multi-scale fusion features into local features and global features, and calculate the local matching degree between the local features and the local reference features corresponding to each species category in the pre-stored harmful organism reference features, and the global matching degree between the global features and the global reference features corresponding to each species category in the pre-stored harmful organism reference features. Sub-step 1032: Determine the comprehensive matching degree between each species category and the multi-scale fusion feature based on the local matching degree and the global matching degree; Calculate the distribution position of the comprehensive matching degree of each species category in all species categories of the pre-stored harmful organism reference features; Determine the credibility of matching each species category with the multi-scale fusion feature based on the distribution position. Sub-step 1033: A joint evaluation is conducted based on the comprehensive matching degree between each species category and the multi-scale fusion feature, as well as the credibility of the matching between each species category and the multi-scale fusion feature. Species categories whose joint evaluation results are higher than the preset evaluation threshold are selected as candidate species categories.

[0043] Multi-scale fusion features are decomposed into local and global features. These features contain information from different spatial ranges, and decomposition allows for the extraction of both detailed and overall information. Local feature extraction is achieved by dividing the fusion feature into multiple local regions based on its spatial location. The feature map corresponding to the fusion feature is divided into several non-overlapping sub-regions, with the feature vector within each sub-region serving as a local feature unit. The number of sub-regions is determined by the feature map size, typically divided evenly into 16 or 25 sub-regions. Global feature extraction is achieved by performing global pooling on the entire fusion feature. Statistics on the feature values ​​at all locations are calculated, including mean pooling and max pooling. The results of these two pooling operations are then concatenated to form the global feature vector. Global features reflect the overall morphology and texture distribution of the harmful organism image.

[0044] The local matching degree between local features and pre-stored pest reference features corresponding to each species category is calculated. The pre-stored pest reference features contain feature templates for known species categories, and each species category stores corresponding local and global reference features. The local reference features are also organized into multiple local regions using the same partitioning method. The similarity between each local feature unit in the image to be matched and the corresponding local feature unit in the reference feature is calculated. The similarity is obtained by calculating the cosine distance between the two feature vectors. All local regions are traversed, and the similarity of each region is weighted and summed. Local regions spatially closer to the image center are given higher weights, while edge regions are given lower weights. The weighted sum is used as the local matching degree for that species category. The local matching degree ranges from 0 to 1; a higher value indicates a higher degree of local feature similarity.

[0045] The global matching degree is calculated between the global features and the pre-stored global reference features corresponding to each species category in the pest reference features. The similarity between the global feature vector of the image to be matched and the global reference feature vectors of each species category is calculated, using cosine distance as the similarity metric. The global matching degree is directly determined by the cosine distance between the global feature vectors, and its value ranges from 0 to 1. The global matching degree reflects the consistency between the pest to be identified and the reference species at the overall feature level.

[0046] The comprehensive matching degree between each species category and the multi-scale fusion feature is determined based on local and global matching degrees. The comprehensive matching degree is obtained by weighted fusion of local and global matching degrees, using the following formula: Where S represents the overall matching degree, M local M represents the local matching degree. globalThis represents the global matching degree, with β being the weighting coefficient and set to 0.4. The weighting coefficient is set so that the global matching degree carries greater weight in the overall evaluation, because global features have a stronger discriminative ability for species identification, while local matching degree provides auxiliary verification at the level of detail.

[0047] The distribution of the overall match score of each species category among all species categories in the pre-stored harmful organism reference features is statistically analyzed. The overall match scores of all species categories are then sorted in descending order of numerical value, and the position index of each species category in the sorted list is recorded. The distribution position reflects the matching advantage of that species category relative to other species categories. The smaller the position index, the higher the matching score of that species category ranks among all categories.

[0048] The credibility of matching each species category with multi-scale fusion features is determined based on its distribution location. Credibility is calculated based on the relative difference between distribution location and overall matching score. The overall matching score of the top-ranked species category is compared with that of the second-ranked species category, and the difference is calculated. A larger difference indicates that the top-ranked species category has a significant matching advantage, and its credibility is higher. The credibility calculation formula for top-ranked species categories is as follows: Where C represents credibility, S c S represents the overall matching degree of the current species category. next This formula represents the overall matching degree of the species category immediately following in the ranking, where k represents the current ranking position of the species category, and N represents the total number of species categories. This formula comprehensively considers both the absolute advantage of the overall matching degree and the relative advantage of the ranking position. The higher the ranking and the greater the difference in matching degree with subsequent rankings, the higher the credibility.

[0049] A joint evaluation is performed based on the comprehensive matching degree between each species category and the multi-scale fusion features, as well as the reliability of the matching between each species category and the multi-scale fusion features. The joint evaluation score is obtained by multiplying the comprehensive matching degree by the reliability. The joint evaluation score reflects both the matching similarity of the species categories and the reliability of the matching results. A preset evaluation threshold of 0.5 is set, and species categories with joint evaluation scores higher than this threshold are considered candidate species categories. The candidate species categories constitute the alternative range for subsequent accurate identification. Through the dual screening of comprehensive matching degree and reliability, interference categories with low similarity and low reliability can be effectively eliminated, retaining the most likely species categories.

[0050] This invention assesses the similarity of species features at different granularities by separating and matching local and global features. The introduction of reliability, based on the distribution and relative differences of matching scores, effectively evaluates the reliability of matching results, avoids confusion caused by multiple species categories with similar overall matching scores, and ensures that candidate species categories have high feature similarity and matching reliability.

[0051] Step 104: Obtain the discriminant feature descriptions corresponding to each candidate species in the candidate species category; locate the discriminant region in the original image based on the discriminant feature descriptions and extract the discriminant region features; sort the candidate species categories according to the difference between the discriminant region features and the harmful organism reference features to obtain the sorting results.

[0052] In some embodiments of the present invention, step 104 may specifically include the following sub-steps: Sub-step 1041: Obtain the discriminative feature descriptions corresponding to each candidate species in the candidate species category from the pre-stored harmful organism reference features; determine the discriminative parts and discriminative feature attributes of each candidate species based on the discriminative feature descriptions; and locate the corresponding discriminative regions in the original image based on the discriminative parts. Sub-step 1042: Extract the discrimination region features from the discrimination region based on the discrimination feature attributes, calculate the feature deviation between the discrimination region features and the standard discrimination features of the corresponding candidate species in the pre-stored harmful organism reference features, and determine the degree of difference of each candidate species based on the feature deviation. Sub-step 1043: Calculate the ranking position of the difference degree of each candidate species in the candidate species category, conduct a reliability assessment of the difference degree of each candidate species based on the ranking position, adjust the difference degree of each candidate species according to the reliability assessment result to obtain the adjusted difference degree, and rank the candidate species categories according to the adjusted difference degree to obtain the ranking result.

[0053] Discriminant feature descriptions for each candidate species within a candidate species category are obtained from pre-stored reference features for harmful organisms. These discriminant feature descriptions are pre-stored key information for species identification, containing morphological features and spatial location information that effectively distinguish different species. The discriminant feature description for each species category is stored in structured text format, including the names of typical discriminative sites and their corresponding discriminant attribute properties. The discriminative site refers to the area on the species' body with significant identification value, while the discriminant attribute property describes the type and manifestation of features that this area should possess.

[0054] The discriminative feature description is parsed and transformed into a spatial region description that can be located in the image. Discriminative regions typically include body parts such as the head, wings, feet, and abdomen, each corresponding to a specific spatial area in the original image. Discriminative feature attributes include various feature types such as color distribution, texture pattern, edge contour, and shape features. The parsing process converts the text description into parameter configurations required for feature extraction, providing guidance for subsequent region localization and feature extraction.

[0055] Using spatial localization information from multi-scale fusion features, regions matching the descriptions of the target regions are searched in the original image. The localization process is achieved by calculating the similarity between each region in the original image and the typical features of the target region, and the region with the highest similarity is marked as the target region. The boundaries of the target regions are determined using a target segmentation algorithm, ensuring that the target regions completely cover the corresponding target regions. The localized target regions are represented as bounding boxes, recording their coordinate positions and spatial dimensions in the original image.

[0056] The appropriate feature extraction method is selected based on the type of discriminative feature attribute. For color distribution type discriminative feature attributes, the pixel statistical histogram of each color channel within the discriminative region is calculated, and the histogram vector is used as the color feature. For texture mode type discriminative feature attributes, the texture direction distribution and texture coarseness of the discriminative region are calculated to form a texture feature vector. For edge contour type discriminative feature attributes, the edge gradient information of the discriminative region is extracted, and the contour shape descriptor is calculated. For shape feature type discriminative feature attributes, the geometric shape parameters of the discriminative region are calculated, including aspect ratio, roundness, and convex hull area ratio. The feature vectors extracted from each type are concatenated to form a complete discriminative region feature.

[0057] The feature deviation between the discriminant region features and the standard discriminant features of the corresponding candidate species in the pre-stored harmful organism reference features is calculated. The pre-stored harmful organism reference features contain standard discriminant features for each species category, which are typical feature representations obtained based on statistics from a large number of samples. The extracted discriminant region features are compared with the standard discriminant features of the corresponding candidate species dimension by dimension, and the difference in feature values ​​in each dimension is calculated. The feature deviation is obtained by calculating the Euclidean distance between the discriminant region feature vector and the standard discriminant feature vector; a larger distance value indicates a greater degree of deviation between the discriminant region features and the standard features.

[0058] The dissimilarity of each candidate species is determined based on the feature deviation. The dissimilarity is obtained by normalizing the feature deviation, which maps the feature deviation of different species to a uniform numerical range, facilitating horizontal comparisons. The normalization method uses maximum-minimum normalization, dividing the feature deviation by the feature range of the standard discriminant feature for that candidate species. The feature range is defined as the difference between the maximum and minimum values ​​of each dimension of the standard discriminant feature. The normalized dissimilarity value ranges from 0 to 1; a smaller dissimilarity indicates a closer similarity between the discriminant region features and the standard discriminant feature, and a higher probability of matching the candidate species.

[0059] The ranking of the dissimilarity of each candidate species within its category is determined. All candidate species are then sorted in ascending order of their dissimilarity scores, with the species having the lowest dissimilarity score ranked first. The index of each candidate species in the ranking list is recorded; this ranking reflects the candidate species' recognition advantage relative to other candidates.

[0060] The reliability of the differences among candidate species is assessed based on their ranking position, taking into account both the stability of the ranking position and the relative difference in differences. The difference in differences between the top-ranked candidate species and the next-ranked candidate species is calculated; a larger difference indicates a significant identification advantage for the top-ranked candidate species, and thus higher reliability of its differences. The reliability assessment results are quantified as a reliability coefficient, calculated using the following formula: Where R represents the reliability coefficient, and D c D represents the degree of difference among the current candidate species. next This represents the degree of difference among the candidate species immediately following in the ranking, with λ being an adjustment parameter set to 0.3. The reliability coefficient is greater than 1; a larger value indicates a more reliable degree of difference for the current candidate species.

[0061] The adjusted dissimilarity is obtained by adjusting the dissimilarity of each candidate species according to the reliability assessment results. This adjustment is achieved by dividing the original dissimilarity by the reliability coefficient. Candidate species with higher reliability coefficients will have their adjusted dissimilarity reduced, thus securing a higher ranking. This adjustment compensates for potential uncertainties in the dissimilarity calculation, making the ranking results more reasonable.

[0062] All candidate species are sorted in ascending order according to their adjusted dissimilarity, with the candidate species having the lowest adjusted dissimilarity ranked first as the most likely identification result. The ranking results are output as a list of candidate species, including the name of each candidate species, its adjusted dissimilarity, and its ranking position. The ranking results provide a priority reference for subsequent species confirmation.

[0063] This invention utilizes discriminative feature description to accurately locate and extract features from key identification regions of different species, avoiding interference from non-critical areas. The calculation of feature deviation directly measures the feature differences between the species to be identified and the standard species. The reliability assessment mechanism adjusts based on the relative difference in the degree of difference, improving the accuracy and stability of the ranking results.

[0064] Step 105: Determine the feature response stability based on the degree of response fluctuation of the multi-scale fusion features corresponding to the candidate species in the sorting results on images at various scales, and determine the harmful species based on the feature response stability and output it.

[0065] In some embodiments of the present invention, step 105 may specifically include the following sub-steps: Sub-step 1051: Obtain the multi-scale fusion features corresponding to each candidate species in the sorting results, decompose the multi-scale fusion features into scale features corresponding to each scale, and construct the response distribution of the scale features corresponding to each scale on the corresponding scale image for each candidate species. Sub-step 1052: Calculate the distribution difference between the response distributions at each scale, and determine the degree of response fluctuation of the multi-scale fusion features of each candidate species on the images at each scale based on the distribution difference. Sub-step 1053 involves performing a correlation analysis between the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at each scale and the ranking position of the corresponding candidate species in the ranking results, and identifying abnormal candidate species whose response fluctuation and ranking position conflict. Sub-step 1054: Correct the response fluctuation of the multi-scale fusion features corresponding to the abnormal candidate species on images at each scale to obtain the corrected response fluctuation, and determine the feature response stability of each candidate species based on the corrected response fluctuation. Sub-step 1055: Based on the characteristic response stability of each candidate species, the ranking position of each candidate species in the ranking result is weighted and adjusted to obtain the adjusted ranking result. From the adjusted ranking result, the candidate species with the highest ranking position and the highest characteristic response stability is selected as the harmful species and output.

[0066] Obtain the multi-scale fusion features corresponding to each candidate species in the ranking results. The multi-scale fusion features are a comprehensive feature representation obtained by weighted fusion of features at different scales in the preceding steps, containing the contribution information of each scale feature. Each candidate species corresponds to a multi-scale fusion feature vector, the dimension of which is consistent with the feature dimension used during fusion.

[0067] The multi-scale fusion feature is decomposed into scale features corresponding to each scale. The decomposition operation is based on the feature weight coefficients of each scale recorded during fusion and the original scale feature values, and is performed inversely to restore the original feature representation before fusion. By extracting the feature components belonging to each scale from the fused feature vector, the original feature representation of each scale before fusion is reconstructed. The number of scale features obtained from the decomposition is the same as the number of scales participating in the fusion, and typically includes feature representations at multiple scales such as the original scale, a 0.5x downsampling scale, and a 0.25x downsampling scale.

[0068] For each candidate species, a response distribution of scale features at each scale is constructed on the corresponding scale image. The response distribution describes the activation intensity distribution pattern of the scale features in the image space. Each scale feature is mapped back to the corresponding scale image space, and the activation intensity value of the feature vector at each location in the image is calculated. The activation intensity value is obtained by calculating the inner product of the feature vector and the feature representation at each location in the image; a larger inner product value indicates a stronger response at that location to the current candidate species. The activation intensity values ​​at all locations are organized into a response map, with the size of the response map consistent with the spatial size of the corresponding scale image. Statistical analysis is performed on the response map, and a histogram of the response intensity distribution is calculated. The horizontal axis of the histogram represents the range of response intensity values, and the vertical axis represents the number of pixels falling within each range. The distribution histogram is normalized to obtain the response distribution; after normalization, the sum of the frequencies of each range is 1.

[0069] Calculate the distributional dissimilarity between response distributions at each scale. For response distributions of the same candidate species at different scales, measure the distributional dissimilarity by calculating the similarity between the distributions. The similarity calculation uses the histogram intersection method, summing the smaller values ​​of the frequencies of corresponding intervals of two response distributions, and the sum is used as the similarity between the two distributions. The similarity value is between 0 and 1, with the closer the similarity is to 1, the more similar the two response distributions are. The distributional dissimilarity is defined as 1 minus the similarity; the larger the dissimilarity, the more significant the difference between the response distributions at the two scales. Calculate the distributional dissimilarity between each pair of response distributions at all scales to obtain the distributional dissimilarity matrix.

[0070] The degree of response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at various scales is determined based on the distribution difference. The degree of response fluctuation is obtained by calculating the average of all elements in the distribution difference matrix. The larger the average value, the greater the difference between the response distributions at each scale, and the higher the degree of response fluctuation. The degree of response fluctuation reflects the consistency of the multi-scale fusion features at different scales. The lower the degree of fluctuation, the more stable the feature representation of the candidate species remains at each scale, and the higher the reliability of the recognition result.

[0071] The correlation analysis was performed between the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at various scales and the ranking position of the corresponding candidate species in the ranking results. The correlation analysis was carried out by plotting a scatter plot, with the horizontal axis representing the ranking position and the vertical axis representing the response fluctuation. Theoretically, candidate species with higher ranking positions should have lower response fluctuations, because a higher ranking means higher recognition confidence, and their features should be consistent across all scales.

[0072] Identify anomalous candidate species whose response volatility conflicts with their ranking position. The criteria for conflict are a higher ranking position with higher response volatility, or a lower ranking position with lower response volatility. Specifically, calculate the correlation between ranking position and response volatility, aiming for a positive correlation. For candidate species ranking in the top 20%, if their response volatility exceeds the median of all candidate species' response volatility, they are identified as anomalous candidates. The presence of anomalous candidates indicates a potential bias in the ranking results, necessitating correction of their response volatility.

[0073] The corrected response volatility is obtained by correcting the response fluctuation of the multi-scale fusion features corresponding to anomalous candidate species across images at various scales. The correction operation is based on the stability analysis of the response distribution of anomalous candidate species at each scale. The response maps of anomalous candidate species at each scale are re-examined to identify noise interference regions. These noise interference regions are characterized by isolated high-value points with significantly lower response intensities in their surrounding areas. The noise interference regions are smoothed to adjust the response intensities of isolated high-value points to the average of the surrounding response intensities. After smoothing, the response distribution and distribution difference at each scale are recalculated to obtain the corrected response volatility. This correction operation reduces the impact of noise on the response volatility, making the response volatility more accurately reflect the true stability of the features.

[0074] The characteristic response stability of each candidate species is determined based on the degree of fluctuation in the corrected response. Characteristic response stability is defined as the reciprocal of the degree of fluctuation in the corrected response. The value of characteristic response stability ranges from 0 to 1; a higher value indicates that the characteristics of the candidate species are more stable at all scales, and the identification results are more reliable.

[0075] The ranking of each candidate species in the ranking results is adjusted by weighting the ranking positions based on the stability of their characteristic responses. This weighting adjustment is achieved by recalculating the comprehensive score of the candidate species. The formula for calculating the comprehensive score is as follows: E final P represents the overall score. rank S represents the ranking position of the candidate species in the original ranking results. s The overall score represents the stability of the feature response. It considers both ranking position and feature response stability; a higher ranking position and greater feature response stability result in a higher overall score. All candidate species are then sorted in descending order according to their overall scores to obtain the adjusted ranking.

[0076] The candidate species with the highest ranking and the highest feature response stability from the adjusted ranking results are selected as the harmful species and output. Alternatively, the first-ranked candidate species in the adjusted ranking results is selected as the final identified harmful species. The output includes the species name, overall score, and feature response stability value, providing reliability information for the identification results.

[0077] This invention evaluates the stability of candidate species features from a multi-scale consistency perspective by constructing response distributions and calculating distribution differences. The mechanism for identifying and correcting anomalous candidate species effectively handles response fluctuations caused by noise interference. The comprehensive score integrates ranking position and feature response stability, ensuring that the final identification result has high feature similarity and multi-scale consistency.

[0078] Sub-step 1053 involves performing a correlation analysis between the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at each scale and the ranking position of the corresponding candidate species in the ranking results. Identifying abnormal candidate species where the response fluctuation and ranking position conflict further includes: Extract the response fluctuation and ranking position of the multi-scale fusion features corresponding to each candidate species in the ranking results on images at various scales; The ranking results are divided into multiple ranking intervals according to the ranking position. The distribution range of the response fluctuation degree within each ranking interval is statistically analyzed. The deviation of the response fluctuation degree of each candidate species from the distribution range of its ranking interval is calculated. Candidate species with a deviation exceeding the width of the distribution range are identified as candidate species with abnormal fluctuations. The weights of features in each scale image during the formation of multi-scale fusion features corresponding to the candidate species with fluctuation anomalies are obtained, and the scale images whose feature weights are opposite to the direction of change of the fluctuation degree of the candidate species with fluctuation anomalies are identified as conflict scale images. The conflict ratio is obtained by comparing the number of conflict-scale images with the total number of scale images. Species with a conflict ratio higher than the normalized value of their response fluctuation in the ranking interval are identified as abnormal candidate species whose response fluctuation level conflicts with their ranking position.

[0079] The response fluctuation and ranking position of the multi-scale fusion features corresponding to each candidate species in the ranking results are extracted from images at various scales. The response fluctuation, calculated in the previous steps, reflects the consistency level of candidate species features across images at different scales. The ranking position is derived from the ranking result list, representing the relative order of each candidate species in terms of recognition confidence. The response fluctuation value and its ranking position value for each candidate species are organized into data pairs to form the basic dataset for association analysis.

[0080] The ranking results are divided into multiple ranking intervals based on their ranking positions. The number of intervals and their boundaries are determined by the total number of candidate species. Assuming the ranking results contain 30 candidate species, they can be divided into three ranking intervals: positions 1 to 10 form the first interval, positions 11 to 20 form the second interval, and positions 21 to 30 form the third interval. After division, the candidate species are grouped according to their recognition confidence level within each interval, with candidate species within the same interval having similar recognition priorities.

[0081] For each ranking interval, the response fluctuation values ​​of all candidate species within that interval are extracted. The maximum and minimum values ​​of these values ​​are calculated, and the difference between the maximum and minimum values ​​represents the width of the distribution range for that ranking interval. Simultaneously, the average response fluctuation value within that interval is calculated as the interval center value. The distribution range describes the normal range of response fluctuation at the same identification priority level, providing a reference benchmark for subsequent deviation calculations.

[0082] Calculate the deviation of the response volatility of each candidate species from the distribution range of its ordination interval. The deviation is calculated as the absolute value of the difference between the response volatility of a candidate species and the center value of its ordination interval. This absolute value reflects the degree of deviation of the candidate species' response volatility relative to other candidate species in the same group. A larger deviation indicates a significant difference in response volatility between the candidate species and other candidate species at the same ordination position.

[0083] Candidate species whose deviation exceeds the width of the distribution range are identified as candidates for anomalous fluctuation. The criterion is that the deviation is greater than the width of the distribution range in the ranking interval. At this point, the degree of fluctuation in the candidate species' response has exceeded the normal range, and there may be anomalies in the characteristic stability assessment. Individuals identified as candidates for anomalous fluctuation need further analysis to determine the cause of the anomaly and whether the anomaly affects the accuracy of the final identification result.

[0084] This study obtains the weights of features at each scale during the formation of multi-scale fusion features for candidate species with fluctuation anomalies. During the generation of multi-scale fusion features, different weight coefficients are assigned to features at different scales, reflecting the contribution of each scale feature to the final fused feature. The weight values ​​for each scale are extracted from the recorded information of the fusion process. The weight values ​​range from 0 to 1, and the sum of all scale weights is 1. A larger weight indicates a stronger influence of that scale feature in the fused feature.

[0085] Images at scales where the weights of features change in the opposite direction to the change in response volatility of candidate species with anomalous volatility are identified as conflict-scale images. Determining the direction of change requires analyzing the influence trend of each scale feature on the degree of response volatility. Theoretically, scales with larger weights should correspond to lower response volatility, because higher weights indicate higher quality and stability of the feature at that scale, thus reducing the overall volatility. The specific method involves calculating the correlation between the weights of each scale and the response volatility calculated individually for that scale. For candidate species with anomalous volatility, if the weight of a certain scale is higher than the average weight, but the corresponding response volatility is also higher than the average response volatility, it indicates that the weight of that scale and the response volatility change in the same direction rather than the expected opposite direction. Such scale images are marked as conflict-scale images. The existence of conflict-scale images indicates a mismatch between the fused weight allocation and the actual feature stability, leading to the generation of volatility anomalies.

[0086] The conflict percentage is calculated by comparing the number of conflict-scale images to the total number of scale images. The total number of scale images is the total number of all scales involved in multi-scale fusion, typically 3 or 4. The number of conflict-scale images is the number of conflict-scale images identified in the preceding steps. The conflict percentage reflects the severity of the unreasonable weight allocation for fluctuating anomaly candidate species during multi-scale fusion; a higher conflict percentage indicates that more scales have a mismatch between weights and stability.

[0087] Candidates with a conflict percentage higher than the normalized value of their response fluctuation within their ranking interval are identified as anomalous candidate species whose response fluctuation conflict with their ranking position. The normalized value is calculated by subtracting the minimum response fluctuation within the ranking interval from the candidate species' response fluctuation, and then dividing by the width of the ranking interval. The normalized value represents the relative fluctuation level of the candidate species within its ranking interval, ranging from 0 to 1. A larger normalized value indicates a more significant response fluctuation within the same group. The criterion is that the conflict percentage is greater than the normalized value. Meeting this condition indicates that the influence of the conflict-scaled image exceeds the relative deviation of the response fluctuation itself. In this case, the fluctuation anomaly is not merely a numerical deviation but a systemic problem caused by the inherent contradiction of the fusion mechanism. These anomalous candidate species are identified as anomalous candidate species whose response fluctuation conflicts with their ranking position and require targeted correction in subsequent steps.

[0088] The confirmation process employs a dual verification mechanism to ensure the accuracy of identifying anomalous candidate species. Initial identification of anomalous candidate species filters out individuals whose response fluctuations deviate from the normal range. Further analysis of conflict-scale images and calculation of the conflict ratio clarify the causes of the anomalies. Only when the conflict ratio reaches a certain level is the fluctuation anomaly escalated to a conflict between the response fluctuation level and the ranking position. This hierarchical judgment avoids misclassifying normal fluctuations as anomalies and also avoids ignoring anomalies truly caused by defects in the fusion mechanism.

[0089] This invention establishes a grouped evaluation benchmark for response fluctuation levels by dividing ranking intervals and statistically analyzing distribution ranges, identifying candidate species exhibiting abnormal behavior at the same recognition priority level. The identification of conflict-scale images reveals the root cause of abnormal response fluctuations. The comparison between the conflict percentage and normalized values ​​comprehensively considers both the severity and relative level of the anomaly, ensuring the reliability of identifying anomalous candidate species.

[0090] like Figure 2 As shown, Figure 2 This is a schematic diagram of the intelligent image recognition system for plant quarantine pests at ports provided in an embodiment of the present invention. The system includes: Image acquisition module 201 is used to acquire the original image of the plant sample to be quarantined; The feature fusion module 202 is used to decompose the original image into multiple scale images, extract the features of each scale image, calculate the consistency between the features of each scale image to obtain the scale reliability, and perform weighted fusion of the features of each scale image based on the scale reliability to obtain the multi-scale fused features. The species matching module 203 is used to match multi-scale fused features with pre-stored harmful organism reference features to obtain candidate species categories; The species ranking module 204 is used to obtain the discriminative feature descriptions corresponding to each candidate species in the candidate species category, locate the discriminative region in the original image according to the discriminative feature descriptions and extract the discriminative region features, and rank the candidate species categories according to the difference between the discriminative region features and the harmful organism reference features to obtain the ranking results. The result output module 205 is used to determine the feature response stability based on the response fluctuation of the multi-scale fusion features corresponding to the candidate species in the sorting results on images of each scale, and to determine and output the harmful species based on the feature response stability.

[0091] One technical solution provided in this embodiment of the invention is an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.

[0092] One technical solution provided in this embodiment of the invention is a computer-readable storage medium storing a computer program, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.

[0093] The specific embodiments described above are preferred embodiments of the present invention and are not intended to limit the specific scope of the present invention. The scope of the present invention includes, but is not limited to, these specific embodiments. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.

Claims

1. A method for intelligent image recognition of plant quarantine pests at ports of entry, characterized in that, Includes the following steps: Obtain the original images of the plant samples to be quarantined; The original image is decomposed into multiple scale images, the features of each scale image are extracted, the consistency between the features of each scale image is calculated to obtain the scale reliability, and the features of each scale image are weighted and fused according to the scale reliability to obtain the multi-scale fused features. The multi-scale fusion features are matched with pre-stored harmful organism reference features to obtain candidate species categories; Obtain the discriminative feature descriptions corresponding to each candidate species in the candidate species category, locate the discriminative region in the original image based on the discriminative feature descriptions and extract the discriminative region features, and sort the candidate species categories according to the difference between the discriminative region features and the harmful organism reference features to obtain the sorting results; The stability of the feature response is determined by the degree of fluctuation in the response of the multi-scale fusion features corresponding to the candidate species in the ranking results on images of different scales. The harmful species are then identified and output based on the stability of the feature response.

2. The method according to claim 1, characterized in that, The original image is decomposed into multiple scale images. Features of each scale image are extracted, and the consistency between the features of each scale image is calculated to obtain the scale reliability. Based on the scale reliability, the features of each scale image are weighted and fused to obtain the multi-scale fused features, including: The original image is decomposed into multiple scale images, and features of each scale image are extracted separately. The spatial correspondence intensity is obtained by calculating the spatial correspondence of features in images at different scales. The similarity of features in numerical distribution is obtained by calculating the spatial correspondence intensity. The consistency between features in images at different scales is obtained by fusing the spatial correspondence intensity and the distribution similarity. The coverage ratio is obtained by statistically analyzing the proportion of pixels contained in each scale image to the total number of pixels in the original image. The scale reliability is obtained by compensating for the consistency between features of each scale image based on the coverage ratio. The features of images at each scale are weighted according to the scale reliability, and the differences in feature response patterns of the features of images at each scale are compared. The feature complementarity coefficients are determined according to the degree of difference and the coverage ratio. The features of the weighted images at each scale are then fused after nonlinear mapping according to the feature complementarity coefficients to obtain multi-scale fused features.

3. The method according to claim 2, characterized in that, The coverage ratio is obtained by statistically analyzing the proportion of pixels in each scale image to the total number of pixels in the original image. Scale reliability is then calculated by compensating for the consistency of features between images at different scales based on this coverage ratio. The coverage ratio is obtained by calculating the ratio of the number of pixels in the image at each scale to the number of pixels in the original image; The consistency degree between features of images at different scales is obtained, the ratio of consistency degree to coverage ratio is calculated, images with a ratio exceeding a preset range are identified as abnormal scale images, and compensation is performed on abnormal scale images according to the corresponding coverage ratio to obtain the compensated consistency degree. Calculate the response intensity distribution of features in the original image at each scale, extract regions with response intensities higher than a preset response threshold as effective response regions, and determine the sufficiency of feature representation by statistically analyzing the proportion of effective response regions. The initial scale reliability is obtained by weighted fusion of the consistency degree after compensation and the sufficiency of feature representation. The change rate of the initial scale reliability and the coverage ratio is calculated. The initial scale reliability corresponding to each scale image with a negative change rate is corrected to obtain the scale reliability.

4. The method according to claim 1, characterized in that, By matching the multi-scale fused features with pre-stored harmful organism reference features, candidate species categories were obtained, including: The multi-scale fusion features are decomposed into local features and global features. The local matching degree between the local features and the local reference features corresponding to each species category in the pre-stored pest reference features, and the global matching degree between the global features and the global reference features corresponding to each species category in the pre-stored pest reference features are calculated respectively. The comprehensive matching degree between each species category and the multi-scale fusion feature is determined based on the local matching degree and the global matching degree. The distribution position of the comprehensive matching degree of each species category in all species categories of the pre-stored harmful organism reference features is calculated. The credibility of matching each species category with the multi-scale fusion feature is determined based on the distribution position. A joint evaluation is conducted based on the comprehensive matching degree between each species category and the multi-scale fusion feature, as well as the reliability of the matching between each species category and the multi-scale fusion feature. Species categories whose joint evaluation results are higher than the preset evaluation threshold are selected as candidate species categories.

5. The method according to claim 1, characterized in that, Obtain the discriminant feature descriptions for each candidate species in the candidate species category. Based on the discriminant feature descriptions, locate the discriminant regions in the original image and extract the features of the discriminant regions. Rank the candidate species categories according to the difference between the discriminant region features and the harmful organism reference features. The ranking results include: The discriminative feature descriptions of each candidate species in the candidate species category are obtained from the pre-stored reference features of harmful organisms. The discriminative feature descriptions are used to determine the discriminative parts and discriminative feature attributes of each candidate species. The corresponding discriminative regions are located in the original image based on the discriminative parts. Based on the discriminant feature attributes, the discriminant region features are extracted from the discriminant region. The feature deviation between the discriminant region features and the standard discriminant features of the corresponding candidate species in the pre-stored harmful organism reference features is calculated. The difference degree of each candidate species is determined based on the feature deviation. The ranking of the difference degree of each candidate species within the candidate species category is calculated. The reliability of the difference degree of each candidate species is assessed based on the ranking position. The difference degree of each candidate species is adjusted according to the reliability assessment results to obtain the adjusted difference degree. The candidate species categories are then ranked based on the adjusted difference degree to obtain the ranking result.

6. The method according to claim 1, characterized in that, The stability of the feature response is determined by the degree of fluctuation in the response of the multi-scale fusion features corresponding to the candidate species in the ranking results across images at various scales. Based on the stability of characteristic responses, harmful organism species are identified and output, including: Obtain the multi-scale fusion features corresponding to each candidate species in the ranking results, decompose the multi-scale fusion features into scale features corresponding to each scale, and construct the response distribution of the scale features corresponding to each scale on the corresponding scale image for each candidate species. Calculate the distribution difference between the response distributions at each scale, and determine the degree of response fluctuation of the multi-scale fusion features of each candidate species on the images at each scale based on the distribution difference. The correlation analysis of the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at each scale is performed with the ranking position of the corresponding candidate species in the ranking results to identify abnormal candidate species whose response fluctuation and ranking position conflict. The response fluctuation of the multi-scale fusion features corresponding to the abnormal candidate species on images of each scale is corrected to obtain the corrected response fluctuation. The feature response stability of each candidate species is determined based on the corrected response fluctuation. The ranking of each candidate species in the ranking results is adjusted by weighting the ranking positions of each candidate species based on the stability of their characteristic responses. The candidate species with the highest ranking position and the highest characteristic response stability is selected from the adjusted ranking results as the harmful species and output.

7. The method according to claim 6, characterized in that, The correlation analysis between the response fluctuation of the multi-scale fusion features corresponding to each candidate species on images at various scales and the ranking position of the corresponding candidate species in the ranking results was performed to identify abnormal candidate species whose response fluctuation and ranking position conflicted. Extract the response fluctuation and ranking position of the multi-scale fusion features corresponding to each candidate species in the ranking results on images at various scales; The ranking results are divided into multiple ranking intervals according to the ranking position. The distribution range of the response fluctuation degree within each ranking interval is statistically analyzed. The deviation of the response fluctuation degree of each candidate species from the distribution range of its ranking interval is calculated. Candidate species with a deviation exceeding the width of the distribution range are identified as candidate species with abnormal fluctuations. The weights of features in images at each scale are obtained during the formation of multi-scale fusion features corresponding to candidate species with fluctuation anomalies. Scale images whose feature weights are opposite to the direction of change in the fluctuation degree of the candidate species with fluctuation anomalies are identified as conflict scale images. The conflict ratio is obtained by comparing the number of conflict-scale images with the total number of scale images. Species with a conflict ratio higher than the normalized value of their response fluctuation in the ranking interval are identified as abnormal candidate species whose response fluctuation level conflicts with their ranking position.

8. A port plant quarantine pest image intelligent recognition system, used to implement the method described in any one of claims 1-7, characterized in that, The system includes: The image acquisition module is used to acquire the original images of the plant samples to be quarantined; The feature fusion module is used to decompose the original image into multiple scale images, extract the features of each scale image, calculate the consistency between the features of each scale image to obtain the scale reliability, and perform weighted fusion of the features of each scale image based on the scale reliability to obtain the multi-scale fused features. The species matching module is used to match multi-scale fused features with pre-stored harmful organism reference features to obtain candidate species categories; The species ranking module is used to obtain the discriminant feature descriptions corresponding to each candidate species in the candidate species category, locate the discriminant region in the original image based on the discriminant feature descriptions and extract the discriminant region features, and rank the candidate species categories according to the difference between the discriminant region features and the harmful organism reference features to obtain the ranking results; The results output module is used to determine the feature response stability based on the degree of response fluctuation of the multi-scale fusion features corresponding to the candidate species in the sorting results on images of various scales, and to determine and output the harmful species based on the feature response stability.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 7.