CN-122024036-A - Tea tree anthracnose spot quantitative analysis method and system based on Mask R-CNN
Abstract
A quantitative analysis method and a quantitative analysis system for anthracnose spots of tea trees based on Mask R-CNN comprise the steps of obtaining images of tea tree leaves by means of an image acquisition device, inputting the images into a pre-trained Mask R-CNN instance segmentation model, detecting to obtain at least one target area of the tea tree leaves and a Mask thereof, selecting one leaf as a main analysis object according to a distance, a morphology and a confidence weighting scoring rule aiming at a plurality of detected leaf targets, extracting Mask area images of the leaves of the main analysis object, performing HSV conversion, calculating corresponding ExG values for enhancing characteristic contrast between the leaves and the disease spots, performing disease spot detection based on HSV color space images and ExG index images to obtain a segmentation result Mask of the disease spots of the tea trees, constructing a disease spot grading mark by combining typical symptoms and field disease characteristics of anthracnose of the anthracnose, calculating the proportion of the area of the disease spot occupying the leaf area of the final Mask, determining anthracnose disease grade according to preset grading standards, calculating anthracnose population anthracnose indexes, and outputting a disease resistance evaluation result of the anthracnose spots.
Inventors
- WANG YUCHUN
- DENG ZHUORAN
- CHEN YANAN
- HUANG JIEQIONG
Assignees
- 浙江农林大学
Dates
- Publication Date
- 20260512
- Application Date
- 20251218
Claims (12)
- 1. A Mask R-CNN-based quantitative analysis method for anthracnose spots of tea trees is characterized by comprising the following steps: s1, acquiring an image of tea leaves by using an image acquisition device; S2, inputting the image into a pre-trained Mask R-CNN example segmentation model, and detecting to obtain at least one tea tree leaf target area and a Mask thereof; s3, selecting one blade as a main analysis object according to a distance, morphology and confidence weighting scoring rule aiming at a plurality of detected blade targets; S4, extracting a mask area image of the main analysis object blade, performing HSV conversion, and calculating a corresponding ExG value for enhancing the characteristic contrast between the blade and the lesion; S5, performing spot detection based on the HSV color space image and the ExG index image to obtain a segmentation result mask of the anthracnose spot of the tea tree; s6, constructing a disease spot grading mark by combining typical symptoms and field morbidity characteristics of tea tree anthracnose; S7, calculating the proportion of the disease spot area of the final disease spot mask to the leaf area, and determining the anthracnose disease grade according to a preset grading standard; S8, calculating the anthracnose disease index of the tea tree population, and outputting the anthracnose resistance evaluation result of the tea tree.
- 2. The quantitative analysis method for anthracnose spots of tea trees based on Mask R-CNN according to claim 1, wherein a backbone network of a Mask R-CNN example segmentation model is built by adopting ResNet-50 and combining a feature pyramid network FPN in the step S2, the model is an example segmentation model obtained based on training of blade image training data, classification branches of the model are adjusted to be two types of identifying tea tree blades and backgrounds, and a single-channel blade Mask is output by the Mask branches.
- 3. The Mask R-CNN based tea anthracnose spot quantitative analysis method according to claim 2, wherein step S2 comprises: step S2.1, extracting the characteristics of the backbone network, setting the backbone network as ResNet-50, and marking the output characteristics of the ith stage (stage) as Then there is Wherein, the Represented in images As input, with the ith stage parameter A feature mapping function for the weights; Step S2.2, a multi-scale feature fusion step, namely, on the basis of the feature extraction of the main network, adopting a feature pyramid network FPN to carry out top-down multi-scale fusion on each layer of features, specifically, firstly, carrying out feature fusion on each stage Proceeding with Convolution transformation to obtain intermediate features The method comprises the following steps: then, step-by-step up-sampling and addition fusion are performed in the order from the higher layer to the lower layer, for The method comprises the following steps: For each scale feature Applying normalization or normalization operation to obtain final multi-scale feature set Wherein: the multi-scale feature set described above Generating unified feature representation predicted by the mask as a subsequent candidate frame; Step S2.3 generating an attention enhancing RPN candidate box, preferably modeling the attention enhancing of the traditional area candidate network RPN, in particular for each scale feature map First, predicting the foreground probability response diagram through convolution operation Bounding box regression offset map I.e. Wherein, the A convolution operation is represented and is performed, And Convolution weights for the foreground confidence branch and the regression branch respectively, Activating a function for Sigmoid, introducing self-attention weight on feature scale, and generating a feature map Applying feature maps And calculating the autocorrelation response of the attention weight matrix to obtain the attention weight matrix: Attention is then weighted Respectively acting on foreground responses Offset from regression Obtaining an enhanced foreground score graph and a regression offset graph: Finally, based on the enhancement And (3) with Generating a set of region candidate boxes : Step S2.4: ROIAlign feature alignment, in obtaining candidate frame set Thereafter, the multi-scale feature map is subjected to ROIAlign operations, specifically, for each candidate region, using continuous spatial feature alignment Mapping it to normalized coordinates on the corresponding feature layer And from the feature map by bilinear interpolation Extracting alignment features from a document The formalized expression is as follows: Wherein, the As a bilinear interpolation kernel function, For discrete sampling locations on the feature map, Aligning coordinates for successive ROIs; Step S2.5, classifying the blade targets and predicting the example mask, inputting the candidate region characteristics aligned by ROIAlign into a classification head to distinguish the two types of targets of 'blade' and 'background', specifically, the alignment characteristics of each candidate region Flattening operation is carried out to obtain a one-dimensional feature vector: then the linear transformation is performed through the full connection layer: Wherein, the And (3) with The weight and bias parameters of the classification branches; subsequently, the probability distribution of the candidate region belonging to each category is calculated by a Softmax function: and setting the output dimension as a classification form: The prediction probability corresponding to the blade target and the background category is realized, so that the special two-classifier design aiming at the single-category task is realized; in the aspect of example mask prediction, a mask head formed by multi-layer convolution superposition is adopted to gradually spatially refine the characteristics of each region of interest, and in particular, the mask head comprises four layers connected in series Convolution and ReLU activation, record the first The layer mask is characterized in that The following steps are: In obtaining the fourth layer mask feature After that, further pass through The convolution and Sigmoid function outputs a single-channel mask prediction graph: Wherein, the Representing a resolution of Blade instance mask of (a). The single-channel mask output form is matched with a single-class example segmentation scene of a blade/background, and is directly used for extracting a subsequent blade area and analyzing a disease spot; And S2.6, optimizing the multi-task joint loss training. In the model training process, a multi-task joint loss function is adopted to optimize network parameters, training targets of classification, frame regression, mask prediction and RPN branching are comprehensively considered, and the total loss is defined as: Wherein, the For the classification loss of candidate regions, the cross entropy form is adopted For pixel level loss of mask branches, binary cross entropy is used: and through the combined optimization, the mask segmentation quality is improved while the blade detection precision is ensured.
- 4. The Mask R-CNN-based tea tree anthracnose spot quantitative analysis method according to claim 2, wherein the leaf image training data is obtained by data enhancement and example synthesis, comprising the steps of introducing an example synthesis-based data enhancement strategy in a training stage, specifically, setting an ith leaf image separated from an original image and a Mask thereof as respectively And (3) with By random affine transformation matrix Geometrically enhancing the material: the blade image and the mask after transformation are respectively: in the synthesis stage, the transformed leaves are pasted into a randomly selected background image In the case of a mask after transformation Then the background is replaced with leaf pixels, otherwise the background is kept unchanged, namely: Meanwhile, to further simulate different illumination and imaging conditions, color disturbance and brightness change are applied on the basis of the composite image, and a color enhancement model is expressed as: wherein the method comprises the steps of Representing the random scaling factor for the c-th color channel, The brightness shift is represented to enrich the color and illumination distribution without changing the blade shape.
- 5. The Mask R-CNN-based quantitative analysis method for anthracnose spots of tea trees according to claim 1, wherein the scoring rule in step S3 is defined as: Let the area ratio of the kth blade example be The detection confidence is The example center point is a distance from the center of the image The maximum possible distance of the image is The area score, confidence score and distance score are defined as: further, the composite score of the kth example is obtained by weighted summation: wherein the method comprises the steps of And finally selecting an example with the largest comprehensive score as a target blade for the weight coefficients of the three items of area, confidence and distance: through the scoring mechanism, blade examples with moderate area and high detection confidence coefficient and positioned near the center of the image are preferentially selected, so that the stability of subsequent lesion analysis is improved.
- 6. The Mask R-CNN-based tea tree anthracnose spot quantitative analysis method according to claim 1, wherein the image HSV conversion and ExG value calculation process in step S4 includes: Converting the extracted target blade region image into HSV color space, and calculating an ExG index to enhance the color contrast of the blade and the lesion: let the original RGB leaf image: setting a blade mask: blade setting area: 。
- 7. The Mask R-CNN based tea anthracnose spot quantitative analysis method according to claim 1, wherein step S5 comprises: S5.1, performing preliminary segmentation on the disease spots based on ExG; S5.2, detecting a local potential lesion area in the blade mask area based on the relative median of the ExG pixel values; s5.3, multi-rule partition filtering the lesion color area in the blade image according to HSV color distribution; and S5.4, fusing the lesion candidate areas, removing noise through morphological processing and connected domain analysis, and obtaining a final lesion mask.
- 8. The Mask R-CNN-based tea tree anthracnose spot quantitative analysis method according to claim 7, wherein step S5.1 comprises: the ExG image is subjected to binarization processing by applying an Otsu algorithm of an Otsu threshold, the binary image is inverted and intersected with a blade mask to obtain a first lesion candidate area, and the minimum value and the maximum value of the ExG are counted and normalized: wherein the method comprises the steps of Is an extremely small positive number, and prevents denominator from being zero; At the position of The threshold value is calculated by Otsu of Otsu method: Obtain a binary image (high ExG is healthy): inverting inside the blade to obtain a first lesion candidate mask: Namely, a first lesion candidate mask; Step S5.2 comprises: The ExG pixel sets are collected within the leaf mask region and the median and low quantiles are calculated: wherein the method comprises the steps of P is a fractional function; namely, a second lesion candidate mask; step S5.3 includes: healthy green areas, chlorosis areas, yellow/dark brown spot areas were calculated: Calculating to obtain a lesion candidate mask: Namely, a third lesion candidate mask; Step S5.4 includes: Performing logical OR fusion on the first, second and third lesion candidate areas to obtain a complete lesion candidate mask, performing morphological open operation and closed operation on the lesion candidate mask to remove isolated noise points and fill lesion holes, and analyzing and removing spot areas with the area smaller than 0.1% of the total area of the blade or the pixel number smaller than 50 and slender areas with the length-width ratio larger than 8 through a connected domain so as to obtain a final lesion segmentation mask; set structural elements as And (3) with Then For a pair of Decomposing the connected region to obtain a plurality of connected regions The area is as follows: Total number of pixels of the leaf: setting an absolute minimum area threshold And relative area threshold (E.g., 0.001 represents 0.1%), then the reservation satisfies: Forming a final lesion mask : 。
- 9. The Mask R-CNN-based quantitative analysis method for anthracnose lesions of tea trees, according to claim 1, wherein the lesion classification label in the step S8 is constructed as follows: Grade 0, no disease spots, healthy leaves and no visible symptoms; stage 1, the area of the disease spots accounts for 5% or less of the whole leaf area; Stage 3, the area of the lesion accounts for 6% -25% of the whole leaf area; grade 5, the area of the disease spots accounts for 26% -50% of the whole leaf area; grade 7, the area of the disease spots accounts for 51% -75% of the whole leaf area; grade 9, the area of the disease spots accounts for more than 76% of the whole leaf area. This grading standard will serve as a unified basis for manual visual assessment and automated assessment.
- 10. The Mask R-CNN-based quantitative analysis method for anthracnose lesions of tea trees according to claim 1, wherein the proportion of the area of lesions to the area of leaves in step S7 is defined as: in the formula obtained The number of pixels of the disease spots; The number of pixels of the blade; and determining the anthracnose disease grade according to the disease spot grading mark on the disease spot proportion r.
- 11. The Mask R-CNN-based quantitative analysis method for anthracnose spots of tea trees according to claim 1, wherein the Disease Index calculation process in the step S8 refers to the national standard (GB/T17980 series) and calculates the Disease Index (DI) of anthracnose of tea trees by adopting the following formula, wherein the formula is shown as formula (8): (55) Wherein DI is the disease index, and the value range is 0-100; i is the number of disease stages; si is the severity representative value of the i-th level; xi is the number of diseased leaves at stage i; N is the total leaf number of investigation; smax is the highest level of severity value; According to the disease index, the resistance is divided into resistance (R) (disease index is less than or equal to 2), moderate Resistance (MR) (disease index is less than or equal to 2 and less than or equal to 5), feeling (S) (disease index is less than or equal to 5 and less than or equal to 15) and high feeling (HS) (disease index is more than 15).
- 12. A system for implementing the Mask R-CNN-based tea tree anthracnose spot quantitative analysis method according to any one of claims 1 to 11, wherein the Mask R-CNN-based tea tree anthracnose spot quantitative analysis automated resistance evaluation system comprises a data acquisition module, a model training module, an image analysis module, a resistance evaluation module and a user interface module: The data acquisition module is used for acquiring image data of tea leaves; The model training module is used for training a Mask R-CNN instance segmentation model based on the blade image data; the image analysis module is used for calling a trained Mask R-CNN model to detect an input blade image and divide a lesion area to generate a lesion Mask; The resistance evaluation module is used for calculating the proportion of the area of the disease spots in the disease spot mask to the area of the leaf blades and determining the anthracnose grade and the disease index of the tea tree according to a preset standard; the user interface module is used for providing an interactive interface to import blade images, adjust analysis parameters and display the lesion masks and the resistance evaluation results.
Description
Tea tree anthracnose spot quantitative analysis method and system based on Mask R-CNN Technical Field The invention belongs to the field of agricultural information technology and plant disease detection, and particularly relates to a quantitative analysis method and a quantitative analysis system for anthracnose spots of tea trees based on Mask R-CNN fusion HSV-ExG multi-characteristics. Background Tea tree (CAMELLIA SINENSIS) is one of three non-alcoholic beverage crops in the world, is widely planted in Asia, africa, america and the like, and has remarkable economic and social values. In the growth process of tea trees, anthracnose (Anthracnose) is one of the most serious diseases which damage the tea trees, and can cause leaf withering and falling, even cause complete withering and even death when serious, and seriously affect the growth and development of the tea trees and the quality of tea leaves. Therefore, breeding of disease-resistant varieties is a core strategy for disease prevention and control of tea trees, and accurate evaluation of resistance phenotypes is a key basis for disease-resistant breeding. At present, the evaluation method of anthracnose resistance of tea trees mainly refers to industry or local standards of other crops. Such as oil tea anthracnose (DB 34/T2055-2014), apple alternaria leaf spot (DB 14/T140-2019), rice stripe disease (NY/T1609-2008), and the like. The method is mainly used for manual visual observation, and is simple and convenient to operate, the classification judgment is carried out by relying on the manual visual observation of the shape and the distribution of the lesion, but the subjective performance of the evaluation process is strong because of the differences of the shape, the growth period, the pathology and the like of different plant leaves, the influence of the experience and the judgment difference of observers is easy, the efficiency is lower during large-scale germplasm screening, and the accurate and high-flux phenotype evaluation is difficult to realize. With the rapid development of information technology, plant disease detection methods based on image recognition and computer vision are gradually rising. Deep learning has been widely used for disease identification of crops such as rice, wheat, corn and tomatoes, and has achieved significant results. Mask R-CNN is an example segmentation model proposed by He and the like on the basis of Faster R-CNN, and the function of pixel level classification is realized by adding a newly added Mask prediction branch on the basis of original target classification and bounding box regression output branches. The Network is composed of four core components of a Backbone Network (usually adopting a depth residual Network ResNet to combine with a feature pyramid Network FPN), a Regional Proposal Network (RPN), a RoI Align layer and a mask pre-measuring head, so that the advantages of target detection are maintained, and single disease leaves can be accurately positioned and segmented under a complex field background. The deep learning model is combined with the techniques of attention mechanism, multi-scale feature fusion and the like, so that the feature extraction capability of the model on a disease area can be enhanced. The HSV color space independently represents Hue (Hue), saturation (Saturation) and brightness (Value), has strong illumination invariance, and is commonly used for finely dividing plant lesions. The ExG can be used in combination with HSV by highlighting greenness through simple linear combination, and the distinction of vegetation and lesion areas is enhanced in the image. However, the related method has less related research on quantitative evaluation of anthracnose spots of tea trees. The invention provides a quantitative analysis method and an automatic resistance evaluation system for anthracnose spots of tea trees based on Mask R-CNN fusion HSV-ExG multi-feature, which provide important scientific basis for subsequently constructing anthracnose resistance identification standards of tea trees. Disclosure of Invention The invention aims to overcome the defects of the prior art, provides a quantitative analysis method and a quantitative analysis system for anthracnose spots of tea trees based on Mask R-CNN, and aims to solve the problems of lack of objective evaluation standards for anthracnose resistance of tea trees, low manual identification efficiency and poor accuracy in the prior art, and realize automatic high-precision detection and quantitative grading of the resistance of leaf spots of tea trees. In order to achieve the above purpose, the technical scheme of the invention is as follows: A Mask R-CNN-based quantitative analysis method for anthracnose spots of tea trees comprises the following steps: s1, acquiring an image of tea leaves by using an image acquisition device; S2, inputting the image into a pre-trained Mask R-CNN example segmentation model, and detecting to obtain a