A method and system for estimating the SPAD value of cotton leaves in the field

By combining instance segmentation and spectral physical constraints into a bi-branch regression network model, the problems of background noise interference and insufficient spectral information in the estimation of SPAD values ​​of cotton leaves in the field are solved, and high-precision SPAD value estimation is achieved.

CN123160978APending Publication Date: 2026-11-24INST OF AGRI ECONOMY & INFORMATION AAAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611334875.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing methods for estimating SPAD values ​​of cotton leaves in the field based on RGB images face problems such as severe background noise interference and insufficient spectral information mining, resulting in low estimation accuracy and low sample efficiency.

Method used

A field crop leaf SPAD value estimation method based on RGB images and deep learning is adopted. It combines a two-branch regression network model with instance segmentation spatial constraints and spectral physical prior constraints. Background noise is removed by instance segmentation, and differential initialization is performed in the spectral response branch to guide the network to learn spectral features related to chlorophyll content.

Benefits of technology

It significantly improves the estimation accuracy of leaf SPAD values ​​under complex field conditions, reduces the reliance on a large amount of labeled data, and enhances the stability and accuracy of the estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160978A_ABST
    Figure CN123160978A_ABST
Patent Text Reader

Abstract

This invention relates to the field of agricultural spectral detection technology, and particularly to a method for estimating the SPAD value of cotton leaves in the field. The method includes the following steps: acquiring an RGB image containing cotton leaves; inputting the RGB image into an instance segmentation network to obtain leaf instance masks; filtering the instance masks according to a confidence score threshold and performing post-processing to determine the target leaf mask; filtering the original RGB image pixel-by-pixel based on the target leaf mask to construct a clean leaf image; inputting the clean leaf image into a regression network, which includes a spectral response branch and a texture feature branch. The spectral response branch uses a physical heuristic initialization based on chlorophyll spectral laws to extract chlorophyll-related color response features, and the texture feature branch is used to extract spatial texture features of the leaves; fusing the features from the two branches and outputting the SPAD value prediction result. This invention can reduce the interference of complex field backgrounds on the estimation, and improve the accuracy and stability of SPAD value estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural spectral detection technology, and in particular to a method and system for estimating the SPAD value of cotton leaves in the field. Background Technology

[0002] Leaf SPAD (Soil and Plant Analyzer Development) value is an important physiological indicator reflecting the relative chlorophyll content of crops, widely used for nitrogen nutrition diagnosis, growth assessment, and precision fertilization decisions. Traditional SPAD measurement relies on portable chlorophyll meters for contact measurement, which is inefficient and difficult to apply on a large scale. In recent years, estimating SPAD values ​​using visible light RGB images combined with machine learning or deep learning methods has become a research hotspot due to its low cost, high speed, and potential for large-scale deployment.

[0003] However, existing RGB image-based methods face two main challenges: First, there is significant background interference in the field. RGB images taken under natural light contain complex backgrounds such as soil, weeds, dead leaves, and shadows. The spectral information of these background areas is irrelevant to the leaves, and directly inputting them into the regression network will introduce a lot of noise, reducing the model's ability to extract the true spectral features of the leaves.

[0004] Second, there is insufficient mining of spectral information. Conventional convolutional neural networks use random or universal initialization to process the three RGB channels, failing to utilize the typical absorption / reflection differences of chlorophyll in the red (strong absorption), green (relatively high reflection), and blue (strong absorption) bands. This causes the network to need to relearn these physical characteristics from a large amount of data, resulting in low sample efficiency and a tendency to overfit.

[0005] Existing SPAD estimation methods for RGB images suffer from severe background noise interference and fail to fully utilize spectral physical priors. Summary of the Invention

[0006] This invention provides a method for estimating the SPAD value of cotton leaves in the field to solve the problems mentioned above.

[0007] This invention provides a method for estimating SPAD values ​​of crop leaves in the field based on RGB images and deep learning. It combines a two-branch regression with instance segmentation spatial constraints and spectral physical prior constraints, which can effectively remove background and embed a two-branch network model that incorporates the chlorophyll spectral absorption law. This reduces the dependence on a large amount of labeled data while improving estimation accuracy, thus solving the problems mentioned above.

[0008] This invention provides a method for estimating the SPAD value of cotton leaves in the field, comprising the following steps: S1: Obtain an RGB image containing cotton leaves, soil, weeds, and light and shadow background; S2: Input the RGB image into the instance segmentation network, and output the category label, confidence score and pixel-level instance mask of the cotton leaf; filter the candidate targets according to the preset confidence score threshold to obtain the leaf instance mask of the cotton leaf.

[0009] S3: Perform post-processing on the set of blade instance masks, the post-processing including at least one of the following: hole filling, morphological opening / closing operation, boundary smoothing; and remove small area connected regions based on area threshold; when there are multiple blade instances, retain the blade instance mask with the largest area as the target blade mask.

[0010] S4: The original RGB image is filtered pixel by pixel according to the target leaf mask, and the pixels in the non-masked area are set to the preset background value to obtain a pure leaf image. This pure leaf image is used as the only input of the subsequent dual-branch regression network. A pixel-level leaf mask is generated using an instance segmentation model to mask all non-leaf pixels in the RGB image, ensuring that the input to the regression network is only the pure leaf region, thus eliminating background interference at the source.

[0011] S5: Input the purified leaf image into a two-branch regression network, the two-branch regression network comprising: Spectral response branch: Its convolution kernel is initialized differently based on the spectral absorption characteristics of chlorophyll in different bands to construct spectral physical constraints, so as to guide the network to prioritize the color response direction related to chlorophyll. The weight of the red light channel is multiplied by an enhancement coefficient of 1.3 to 1.7, the weight of the green light channel is multiplied by an inhibition coefficient of 0.6 to 0.9, and the weight of the blue light channel is multiplied by an enhancement coefficient of 1.0 to 1.4. A novel physical heuristic initialization method is used to construct physical constraints within the parameter space. Specifically, in the spectral response branch, the initial weights of the three RGB channels of the first convolutional kernel are differentiated based on the typical absorption / reflection patterns of chlorophyll in the visible light band (e.g., enhancing red light and suppressing green light). This method constrains the starting point of network training within a physically-compliant parameter neighborhood, guiding the model to prioritize learning spectral patterns related to chlorophyll content, rather than relying on random initialization to explore from scratch. Based on the spectral response characteristics of chlorophyll in the red, green, and blue light bands, differentiated initialization coefficients were set for the RGB three-channel convolutional kernels, assigning enhancement / suppression prior directions to the red, green, and blue channels respectively. The value range of the channel coefficients was determined through parameter search and comparative experiments on the cotton leaf labeled dataset to minimize the chlorophyll content prediction error on the validation set. These coefficients were used for convolutional kernel initialization, and subsequently updated the convolutional kernel weights through backpropagation during network training. Texture feature branch: used to extract spatial texture features of the leaf; S6: Fuse the output features of the spectral response branch and the texture feature branch to obtain fused features; Pure leaf images are input into the spectral response branch and the texture feature branch, respectively. The two branches use independent network parameters to decouple the feature extraction process: the spectral branch is used to learn global spectral response features related to chlorophyll content, and the texture branch is used to learn spatial structural features such as leaf surface texture and veins. Then, the output features of the two branches are concatenated at the channel level in the fusion layer to obtain fused features, which are used for SPAD value regression prediction. This invention does not simply connect instance segmentation and regression networks in series. Instead, it forms spatial constraints through "instance mask → pure leaf input" and embeds physical parameter initialization in the spectral branch, so that the network learns in a feature space that is background-free and conforms to the spectral absorption law, forming a dual synergistic mechanism of spatial and physical constraints. S7: Output the predicted SPAD value of cotton leaves based on the fusion features.

[0012] Preferably, the instance segmentation network model is a YOLOv8s-seg network structure. The LabelMe tool is used to annotate the RGB images, generate JSON format labels and convert them to COCO format. During training, Mosaic enhancement and random flipping data augmentation strategies are adopted. Sample allocation and positive and negative sample matching are completed using the default label allocation and training strategies of YOLOv8.

[0013] Preferably, the weight of the red light channel is multiplied by 1.5, the weight of the green light channel is multiplied by 0.7, and the weight of the blue light channel is multiplied by 1.2.

[0014] Preferably, the post-processing further includes at least one selected from hole filling, morphological opening / closing operations, and boundary smoothing, with a structuring element size of 3×3 or 5×5, to obtain a corrected mask {M}. i ′}, and use {Mi′} as the input mask set for subsequent area filtering and target blade selection steps.

[0015] Preferably, a phased training strategy is adopted between the segmentation network and the two-branch regression network, using only the regression loss L. reg ; Preferably, the segmentation network and the bibranch regression network adopt an end-to-end joint training strategy and use a joint loss function.

[0016] This invention provides an application of a field cotton leaf SPAD value estimation method to crop leaf SPAD value estimation. The method is applicable to crop leaf SPAD value estimation, and the crops include cotton, soybean, corn, or rice. When the target crop is not cotton, the instance segmentation network is fine-tuned and trained based on the RGB image of the target crop leaves, pixel-level leaf instance mask annotations, and corresponding SPAD labels to obtain the target crop leaf instance mask. Then, the bi-branch regression network is fine-tuned and trained based on the clean leaf image of the target crop and its SPAD labels for SPAD value estimation.

[0017] The present invention also provides a field cotton leaf SPAD value estimation system for implementing a field cotton leaf SPAD value estimation method, comprising: an image acquisition module for acquiring RGB images containing cotton leaves, soil, weeds, and light and shadow background; The instance segmentation module is used to perform instance segmentation on RGB images and output the confidence scores of candidate leaf instances and pixel-level instance masks. The mask post-processing module is used to perform hole filling, morphological opening / closing operations or boundary smoothing on instance masks, and remove small connected regions based on area thresholds. The target blade selection module is used to select the instance mask with the largest pixel area as the target blade mask when there are multiple blade instance masks. The background removal module is used to filter the original RGB image pixel by pixel according to the target leaf mask to obtain a clean leaf image. The dual-branch physics-inspired regression module includes a spectral response branch and a texture feature branch. The spectral response branch is used to construct spectral physical constraints, and the texture feature branch is used to extract spatial texture features of the leaf. The feature fusion module is used to fuse the output features of the spectral response branch and the texture feature branch to obtain fused features; The SPAD value prediction output module outputs the SPAD value prediction result of cotton leaves based on the fused features.

[0018] Preferably, the SPAD measured value is obtained by measuring the target cotton leaves using a SPAD-502 portable chlorophyll meter.

[0019] The technical solutions provided in the embodiments of the present invention have the following advantages compared with the prior art: 1. The method provided by this invention is suitable for rapid and non-destructive determination of chlorophyll content in cotton leaves. It achieves spatial constraints through instance segmentation and introduces spectral physical priors through differentiated initialization. The synergistic effect of the two significantly improves the estimation accuracy of leaf SPAD values ​​under complex field conditions. Through the synergistic mechanism of "instance segmentation + dual-branch physical heuristic network", it effectively eliminates background noise interference and guides the network to learn the features most relevant to chlorophyll content. The estimation error (RMSE) is significantly lower than that of traditional methods.

[0020] 2. The method provided by this invention has significant technical advantages: This invention uses the target leaf mask obtained from instance segmentation to perform pixel-level filtering on the original RGB image, constructing a pure leaf image containing only the leaf region as input to the regression network, thus forming a background suppression constraint in the input space. Simultaneously, in the dual-branch regression network, the spectral response branch and texture feature branch are set up in parallel decoupling, and the first convolutional kernel of the spectral response branch undergoes differential initialization of the RGB channels based on the chlorophyll spectral absorption law, guiding the network to preferentially learn color response features related to chlorophyll content. Through the combination of the above spatial constraints and physical prior initialization, lower SPAD estimation errors and more stable prediction performance can be obtained in complex field backgrounds.

[0021] 3. Improved interpretability and stability: In the spectral response branch, this invention performs RGB channel differential initialization on the first layer convolutional kernel, enabling the network to form a response tendency for the red / green / blue light channels that conforms to the chlorophyll absorption and reflection law at the beginning of training. Combined with the input of pure leaf images obtained from instance segmentation, the interference of background pixels such as soil, weeds and shadows on the feature statistical distribution is reduced, so that the model's prediction results are more likely to correspond to the leaf color response law, and have more stable estimation performance under different field background conditions.

[0022] 4. The method provided by this invention has broad application prospects: This invention only relies on conventional RGB images, is low in cost and easy to deploy, and is suitable for mobile terminals or UAV remote sensing platforms. It can be extended to various crops such as soybeans, corn, and rice, and has important agricultural application value. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is an overall flowchart of the method for estimating the SPAD value of cotton leaves in the field according to the present invention; Figure 2 This is a schematic diagram of the overall structure of the dual-branch regression network of the present invention; Figure 3 Comparison of leaf mask effects generated by the instance segmentation model of this invention (left side is the original RGB image, middle is the instance segmentation mask, and right side is the clean leaf image). Figure 4 This is a bar chart comparing the accuracy of the ablation experiments of this invention; Figure 5 This is a scatter plot comparing the predicted SPAD values ​​and the measured SPAD values ​​on the test set in the ablation experiment of this invention. Figure 6 This is a scatter plot comparing the measured SPAD values ​​and residual values ​​on the test set in the ablation experiment of this invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Various embodiments of the present invention may exist in the form of a range. It should be understood that the description in the form of a range is merely for convenience and brevity and should not be construed as a rigid limitation on the scope of the present invention. Therefore, it should be considered that the range description has specifically disclosed all possible sub-ranges and single numerical values ​​within that range. For example, it should be considered that the range description from 1 to 6 has specifically disclosed sub-ranges, such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., and single numbers within the range, such as 1, 2, 3, 4, 5, and 6, regardless of the range. In addition, whenever a numerical range is indicated in the present invention, it means including any referenced number (fraction or integer) within the indicated range. Unless otherwise specifically stated, all raw materials, reagents, instruments, and equipment used in the present invention can be purchased commercially or prepared using existing equipment.

[0028] In this invention, unless otherwise stated, directional terms such as "upper" and "lower" specifically refer to the drawing directions in the accompanying drawings. Furthermore, in this invention, the terms "comprising," "including," etc., mean "including but not limited to." In this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In this invention, "and / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A and B can be singular or plural. In this invention, "at least one" means one or more, and "more" means two or more. "At least one," "at least one of the following," or similar expressions refer to any combination of these items, including any combination of a single item or a plural item. For example, "at least one of a, b, or c" or "at least one of a, b, and c" can both mean: a, b, c, ab (i.e., a and b), ac, bc, or abc, where a, b, and c can be a single or multiple.

[0029] Example 1: Field Data Acquisition and Preprocessing 1.1 Data Acquisition Conditions In this embodiment, the peak boll-forming period of cotton was selected as the data collection time. The photos were taken on sunny, windless or lightly windy days, between 10:00 AM and 2:00 PM Beijing time, to ensure uniform lighting and minimize leaf shadows.

[0030] Using different smartphone models, take vertically downward photos of the cotton canopy. The shooting height should be approximately 10cm above the leaves, with the camera lens parallel to the canopy surface and the leaf centered on the screen. Use the original camera mode. Ensure that each image includes at least one complete, unobstructed, and disease-free cotton leaf.

[0031] 1.2 Obtaining the truth value of SPAD For each target leaf corresponding to the captured image, the SPAD value was measured using a SPAD-502 (Konica Minolta) portable chlorophyll meter. During measurement, the central area of ​​the leaf was selected, avoiding the midrib. Measurements were repeated 3–5 times for each leaf, and the arithmetic mean was taken as the true ground-level SPAD value label for that leaf. Abnormal readings exceeding the physiologically normal range of 20–60 were discarded and the measurement was repeated.

[0032] 1.3 Image Normalization Preprocessing To address the impact of natural light variations in the field (such as shadows and color temperature shifts) on RGB values, this invention introduces a Gray World Assumption color correction algorithm for standardized preprocessing before inputting the model.

[0033] The specific steps are as follows: ① Calculate the average gray value of the R, G, and B channels of the input image I. ② Calculate the average brightness of the entire image. ③ Calculate the gain coefficient of each channel. ④ Correct each pixel in the image: This step eliminates the overall color cast caused by changes in the color temperature of natural light, ensuring that the RGB values ​​input to the network primarily reflect the pigment characteristics of the leaf itself rather than the characteristics of the light environment.

[0034] Preferably, color correction can be performed on the original image before instance segmentation, or only on the leaf mask region after segmentation to calculate the channel mean to avoid interference from background pixels on the gain coefficient.

[0035] 1.4 Dataset Construction Following the above procedure, a total of 1050 valid RGB images and their corresponding SPAD labels were collected. The dataset was randomly divided into a training set, a validation set, and a test set, with an optimal ratio of 70%:15%:15%, ensuring that the three sets of data maintained consistency in the distribution of SPAD values. The training set was used for model parameter learning, the validation set was used for hyperparameter tuning and early stopping control, and the test set was used only for final performance evaluation, with test set samples remaining invisible throughout the training process.

[0036] Example 2: Instance Segmentation Model Training and Mask Generation 2.1 Annotation Standards and Dataset Details To ensure the validity of the "pure blade" input, this invention has established strict labeling specifications: ① Granularity labeling: Only healthy, intact green leaf areas are labeled. Disease spots, withered edges, insect holes, and severely curled parts on the leaves are not labeled and are treated as background to avoid interference from non-photosynthetic tissues in SPAD estimation.

[0037] ②Occlusion handling: When there is occlusion between leaves, the overlapping area belongs to the leaf that is visually located on the upper layer; if part of the lower leaf is exposed, the exposed part is labeled as an independent instance.

[0038] ③ Training set size: The LabelMe tool was used to annotate the 1050 images, generating JSON format labels and converting them to COCO format. During training, data augmentation strategies such as Mosaic enhancement and random flipping were employed. Sample allocation and positive / negative sample matching were completed using YOLOv8's default label allocation and training strategies.

[0039] 2.2 Instance Selection Strategy in the Reasoning Phase During the model inference phase, a single input image may detect multiple leaf instances. Since the SPAD ground truth acquisition of this invention corresponds to a single target leaf, and the target leaf is a representative functional leaf, meaning a leaf located in the upper part of the canopy, healthy and fully expanded, without obvious lesions or yellowing, and with minimal shading, its SPAD value can represent the relative chlorophyll content level of the plant under the sampling conditions.

[0040] Under close-range vertical shooting conditions in the field, target leaves that meet the above conditions usually appear as leaf instances with a large imaging area and complete outline in the image. Therefore, this invention adopts a 'maximum area instance selection strategy' to automatically determine the target leaf from multiple leaf instances.

[0041] ① The output category is cotton leaf and the confidence score is p i ∈[0,1] is not less than the threshold T conf The set of instance masks {M i}, where T conf A pre-set confidence score threshold is used; the confidence score is used to characterize the degree of confidence that a candidate instance belongs to the cotton leaf category, and is used to filter out false detections.

[0042] ② Calculate the pixel area of ​​the mask for each instance: ③ Choose A i The largest instance mask is used as the target mask M.

[0043] This strategy ensures that the system always performs SPAD estimation on the leaves that are the most complete and have the most prominent features in the field of view, avoiding interference from background weeds or edge fragments.

[0044] 2.3 Model Selection and Configuration This embodiment uses YOLOv8s-seg as the base model for instance segmentation. The input image size is uniformly scaled to 640×640 pixels. Weights pre-trained on the COCO dataset are used as initialization parameters.

[0045] 2.4 Training Parameter Settings Fine-tuning of YOLOv8s-seg on the training set, with the following hyperparameter settings: Optimizer: Adam, initial learning rate 0.001; Batch size: 32; Number of training rounds: 100 rounds; Loss function: The default weighted sum of bounding box regression loss, classification loss, DFL loss and segmentation mask loss in YOLOv8s-seg; 2.5 Segmentation accuracy verification To verify the necessity of spatial constraints, this embodiment conducted comparative experiments on different segmentation methods, including Otsu threshold segmentation, K-means clustering segmentation, U-Net semantic segmentation, and YOLOv8s-seg instance segmentation.

[0046] The experimental results show that: Traditional thresholding (Otsu) and clustering (K-means) methods have extremely low segmentation accuracy in complex field backgrounds (IOU=0.199, IOU=0.166), and cannot effectively distinguish between leaves and weeds, soil and shaded areas.

[0047] Although the semantic segmentation model (U-Net) has achieved a certain level of accuracy (IOU=0.934), it still suffers from missegmentation in scenarios with overlapping leaves and complex boundaries, leaving behind a large number of background pixels.

[0048] In contrast, the instance segmentation model (YOLOv8s-seg) achieves an IOU of 0.991, enabling precise separation of leaf instances with almost no background pixel residue.

[0049] The above results indicate that a near-pure leaf input distribution can only be constructed when the segmentation accuracy reaches a high level. If the segmentation accuracy is insufficient, residual background pixels will still interfere with the physical initialization of the spectral response branches, thereby weakening the physical constraint effect and even causing negative migration.

[0050] Therefore, high-precision instance segmentation is a necessary condition for constructing spatial constraints and triggering the effectiveness of physical constraints.

[0051] During the inference phase, for the input RGB image, the model outputs a binary mask for all leaf instances in each image. Pixels with a mask value of 1 correspond to the leaf region, and pixels with a mask value of 0 correspond to the background region.

[0052] To ensure the objectivity of the evaluation results, the above indicators were calculated on the test set after the dataset was divided according to the proportions described in Example 1.4. The test set samples were not visible throughout the training and hyperparameter tuning process. The labeled data was converted to COCO format after being labeled with LabelMe, and the mAP@0.5:0.95 and other indicators were calculated using the COCO standard evaluation method. The input size for model inference was 640×640, the confidence score threshold was preferably 0.5, and duplicate detections were removed by non-maximum suppression.

[0053] In addition, the training data comes from different lighting and complex background scenes in the field, including interference factors such as soil, weeds, and shadows; the test set can be used to evaluate and verify the model's instance segmentation generalization ability in the above complex scenes.

[0054] 2.6 Construction of Pure Leaf Images Perform pixel-by-pixel multiplication between the original RGB image and the generated binary mask: Where M(x,y)∈{0,1}. After the operation, the pixel values ​​of the background region are set to zero (pure black), and only the RGB pixel information of the leaf region is retained, thus obtaining a pure leaf image. This pure leaf image serves as the sole input to the subsequent bibranch regression network, fundamentally eliminating the spectral interference from the field background.

[0055] 2.7 Input Distribution Cleanup and Physical Constraint Triggering Conditions To ensure the stable and effective implementation of physically-inspired initialization in subsequent spectral response branches, this invention performs input distribution cleansing on the input image based on instance segmentation masks during the inference phase. Specifically, this includes: (1) Perform instance segmentation on the input RGB image to obtain the leaf instance mask set {M}. i} and the corresponding confidence score p i ; (2) Retain those that satisfy p i ≥T conf Leaf instance mask, T conf =0.5, and perform hole filling, morphological opening / closing operations, and small connected component removal to obtain the corrected mask {M}. i The structuring element size and area threshold can be preset or determined through a validation set. The structuring element is 3×3 or 5×5, and the area threshold is set according to the image size ratio or the number of pixels. The area threshold is 0.05% to 0.5% of the total number of pixels in the RGB image. For example, when the input image size is 640×640 pixels, the area threshold can be 0.1% of the total number of pixels, corresponding to approximately 410 pixels, used to remove small connected components caused by noise or false detections.

[0056] (3) When there are multiple leaf instances, select the instance mask with the largest pixel area as the target mask M; (4) Based on I pure (x,y)=I orig (x,y)⊙M(x,y) Construct a pure leaf image I pure .

[0057] Through the above steps, the effective pixel distribution entering the regression network is transformed from a mixed distribution of "leaf + background" to a conditional distribution that approximately contains only leaf pixels, thereby providing stable input conditions for the differential initialization based on chlorophyll spectral laws in Example 3.

[0058] Example 3: Two-branch regression network structure and parameter settings 3.1 Detailed Network Architecture Path like Figure 2 As shown, the dual-branch physics-inspired regression network constructed in this embodiment receives a clean leaf image with a size of 224×224×3 (where 224×224 represents the image height and width, and 3 represents the RGB three channels) as input. The network consists of a front-end dual-branch feature extraction module (spectral response branch and texture feature branch), a channel-level stitching and fusion module, a shared backbone feature extraction module, and a regression prediction head.

[0059] The front-end dual-branch architecture (spectral response branch and texture feature branch) first performs parallel shallow feature extraction on the input image. The output feature maps are concatenated and fused along the channel dimension, and then the fused features are fed into a shared backbone network for deep feature learning. The shared backbone network extracts high-dimensional abstract features through multiple downsampling and convolution operations. Finally, global average pooling (GAP) and a fully connected regression head map the high-dimensional features into continuous SPAD predictions.

[0060] The optimal parameter configurations for each layer of the network are shown in the table below: 3.2 Receptive Field Analysis Because the network contains multiple layers of 3×3 convolutions and 2×2 max pooling downsampling operations, the receptive field of feature points expands layer by layer as the layers deepen. Shallow convolutions mainly capture local color differences, vein edges, and microtexture information of leaves; mid-layer features can cover a larger local area of ​​the leaf; deep features, after multiple downsamplings, form aggregated representations of a larger area, which can characterize the overall color distribution and structural texture of the leaf, thus providing a joint representation of global and local information for SPAD regression.

[0061] The receptive field size is determined by the convolution kernel size, stride, and pooling. This embodiment does not limit a single specific value, but preferably expands layer by layer through the above-mentioned hierarchical recursion.

[0062] 3.3 Input Layer The clean leaf image obtained in Example 2 was uniformly scaled to 224×224×3 (where 224×224 represents the image height and width, and 3 represents the RGB three channels), and the pixel values ​​were normalized to the range [0,1]. The clean leaf image was obtained by filtering the original RGB image pixel by pixel using the binary mask in Example 2, with background pixels set to 0 (displayed as black), and the original RGB values ​​of the leaf area retained. Subsequently, the image was normalized by dividing by 255 for each channel, so that the input tensor values ​​fell within the range [0,1].

[0063] During the training phase, to enhance the robustness of the model, data augmentation strategies can be used: the input image is horizontally flipped with a certain probability, and a slight brightness perturbation is applied to the pixel values ​​(e.g., multiplied by a random coefficient of 0.9 to 1.1 and cropped to [0,1]).

[0064] 3.4 Spectral response branching (applying parameter space constraints through physical heuristic initialization) This branch is used to extract spectral response patterns related to chlorophyll content. The key innovation of this invention lies in the initialization of the first convolutional kernel of this branch. This is not a rigid training process constraint, but a guided initialization strategy that effectively "constrains" the parameter optimization process within a parameter space region that is more likely to produce excellent solutions by setting a physically meaningful training starting point.

[0065] This branch preferably consists of a single convolutional block, including a convolutional layer, a batch normalization layer, and a ReLU activation function. Its forward computation can be represented as: Conv is used to extract local features, BN is used to improve training stability and accelerate convergence, ReLU is used to introduce nonlinearity to apply RGB channel differential scaling to the first convolutional kernel of the spectral branch during the training initialization phase, and I pure Input is a clean leaf image, i.e., an RGB image after background removal by an instance segmentation network, W tex b represents the kernel weights (filter parameter set) of the spectral branch convolutional layer. tex These are the bias parameters for the spectral branch convolutional layer.

[0066] Key physical-inspired initialization: In this embodiment, the first layer of the spectral branch convolution kernel is subjected to RGB channel differential scaling during the training initialization phase to guide the network to prioritize the color response direction related to chlorophyll.

[0067] The convolutional kernel weights are scaled according to the input channel: the red channel weights are multiplied by 1.5, the green channel weights by 0.7, and the blue channel weights by 1.2. This differential initialization serves as the starting weight for training and participates in subsequent backpropagation updates. The updated weight parameters are obtained after training ends.

[0068] 3.5 Texture Feature Branches The texture feature branch is used to extract spatial texture information of the leaves (such as vein edges, surface roughness, gloss variations, etc.). Its structure is consistent with the spectral branch, also consisting of a convolutional block (Conv+BN+ReLU), but without applying spectral physical differentiation initialization. Its forward computation can be represented as: W tex b represents the kernel weights (filter parameter set) of the texture branch convolutional layer. tex These are the bias parameters for the texture branch convolutional layer.

[0069] 3.6 Feature Fusion and Shared Backbone Feature Extraction The spectral branch and texture branch output feature maps are concatenated and fused along the channel dimension to obtain the fused feature map: Where Concat() represents the channel dimension splicing operation, F spec For spectral branch output characteristics, F tex The texture branch outputs features. Since each branch outputs a 32-channel feature map, the number of channels after fusion is 64.

[0070] The fused feature maps are input into a shared backbone network for deep feature extraction. The shared backbone preferably includes multiple max-pooling downsampling and 3×3 convolutional channel expansion modules, which gradually reduce the spatial size of the feature maps and gradually increase the number of channels to extract higher-level combined feature representations.

[0071] 3.7 Regression Prediction Layer The output feature map of the shared backbone is then subjected to global average pooling (GAP) to obtain a 512-dimensional global vector: Where h and w are the feature map space dimensions, and c is the channel index.

[0072] The 512-dimensional vector is then input into the regression head to output the SPAD prediction value. The preferred regression head is a three-layer fully connected structure: ① FC1: 512→256, ReLU, Dropout=0.4; ② FC2: 256→128, ReLU, Dropout=0.3; ③ FC3: 128→1, linear output of continuous SPAD value ŷ.

[0073] 3.8 Two-branch decoupling and end-to-end computation process The pure leaf image I obtained in Example 2 pure (And after scaling and normalization as described in Example 3.3) as network input. The spectral response branch and texture feature branch extract different types of low-level features in the shallow layer using independent parameter sets. The calculation process is as follows: Then, channel-level splicing and fusion are performed: The fused feature map F_fusion is input into a shared backbone network, and its output is then passed through a regression layer to obtain the final SPAD prediction value: ŷ = g_reg( g_shared(F_fusion; θ_shared) ; θ_reg ) Where θ_spec and θ_tex are the shallow parameter sets of the two branches; θ_shared are the parameters of the shared backbone network; and θ_reg are the parameters of the regression head. g_shared() represents the forward computation process of the shared backbone network, and g_reg() represents the forward computation process of the regression head.

[0074] In summary, this embodiment achieves comprehensive analysis of leaf color and texture information through a dual-branch decoupled architecture, feature fusion, and a shared backbone network. Furthermore, and crucially, the spectral response branch employs differentiated initialization based on the chlorophyll spectral response pattern. Under pure leaf input conditions, this physically inspired initialization guides the network to focus on the color response pattern most relevant to chlorophyll content during the initial training phase, thereby improving training stability and generalization performance.

[0075] Example 4: Model Training Strategy and Loss Function 4.1 Phased Training Strategy To avoid interference between the instance segmentation branch and the regression branch, this embodiment adopts a phased training strategy: Phase 1 (Segmentation Pre-training): Train YOLOv8s-seg separately until convergence, freeze its weights, and no longer participate in subsequent gradient updates.

[0076] Phase Two (Regression Network Training): The clean leaf image is input into the two-branch regression network, and the SPAD ground truth is used as the supervision signal to train the regression network parameters. In this phase, the instance segmentation model is only used for forward inference to generate masks and does not participate in gradient backpropagation.

[0077] 4.2 Loss Function Design The training loss function L of the regression network regMean squared error loss (MSE): Where N is the batch size, y i Let ŷ be the measured SPAD value of the i-th sample. i Predict the SPAD value for the network.

[0078] If we consider end-to-end joint fine-tuning, the joint loss function is defined as: Among them, L seg The instance segmentation loss (including YOLO's own bounding box loss, classification loss, DFL loss, and mask loss) is weighted with α of 0.4 and β of 0.6. This embodiment prioritizes staged training; therefore, in actual use, α=0, and only L is used. reg .

[0079] 4.3 Optimizer and Hyperparameters Optimizer: AdamW, initial learning rate 0.001; Learning rate scheduling: If the validation set loss does not decrease within 10 rounds, the learning rate is multiplied by 0.5; Batch size: 32; Maximum number of training epochs: 100 epochs, using an early stopping strategy, training is terminated when the validation set loss does not improve within 30 epochs; Weight decay (L2 regularization): 5 × 10⁻ 4 To prevent overfitting.

[0080] 4.4 Verification of Physical Constraint Retention To quantitatively verify the effectiveness of the strategy of "applying parameter space constraints through physical heuristic initialization" proposed in this invention, that is, to verify whether the initial guidance is effectively maintained during the complex backpropagation training process, this embodiment performs statistical analysis on the weights of the first layer convolution kernel of the spectral response branch after training.

[0081] Let the physical initialization weights before training be W. init The weights after training are W. trained Using F robenius The norm is defined as the relative average deviation between the two: the physical initialization weights before training described in this section are W as defined in Example 3. init The weights after training are W after training convergence. trained The relative deviation is calculated using the following formula: Where || ||F represents the F of the matrix. robenius Norm.

[0082] After the complete model (spatial constraints + physical constraints) in this embodiment is trained, statistical calculations are performed on the first layer convolution kernel of the spectral response branch to obtain the overall relative deviation: δ=13.97%.

[0083] The above results demonstrate that, after complete end-to-end training, the convolutional kernel weights undergo only limited adjustments relative to their physically meaningful initial values, with an overall deviation significantly less than 20%. This proves that: ① The effectiveness of the constraints: The optimization process of network parameters is indeed always "constrained" within the parameter neighborhood defined by physical initialization, and does not "drift" to any region far away from the physical prior due to training.

[0084] ② Nature of the mechanism: The physical prior constructed in this invention is not a simple "one-time" parameter tuning, but an effective parameter space guidance mechanism that runs through the training process. It successfully embeds and maintains prior knowledge in the model, thereby improving the model's stability and generalization ability.

[0085] Therefore, the physical constraints constructed in this invention belong to a parameter space constraint mechanism rather than simple initialization and parameter tuning. They can play a stable role under the pure input distribution conditions constructed by the space constraints (instance segmentation), thus forming a dual-constrained optimization structure of input distribution constraints and parameter space constraints.

[0086] These verification results further support the synergistic enhancement effect observed in the aforementioned ablation experiments from a parametric statistical perspective.

[0087] Example 5: Comparative Experiment and Verification of Beneficial Effects To fully verify the inventiveness and beneficial effects of the technical solution proposed in this invention, the following four sets of key comparative experiments were designed and executed. All experiments used the same training set, validation set, and test set partitioning, and except for specially noted variables, the network structure, training hyperparameters, etc., remained consistent.

[0088] 5.1 Ablation Experiment 5.1.1 Ablation Experiment Setup This experiment aims to verify the individual contributions of the two core components, "spatial constraints (instance segmentation)" and "physical constraints (differential initialization)," in this invention, as well as their synergistic enhancement effect. The experimental setup is as follows: Group A (baseline model): A standard 3-layer CNN that directly processes the original RGB image with background.

[0089] Group B (spatial constraints only): Based on Group A, add instance segmentation preprocessing, i.e., the input is a clean leaf image.

[0090] Group C (Physical Constraints Only): Based on Group A, the first layer convolution kernel is differentially physical initialized, and the input is still the original image with background.

[0091] Group D (Complete Model of This Invention): A dual-branch network that combines spatial and physical constraints, i.e., physically initializes the input of a pure leaf image.

[0092] 5.1.2 Evaluation Indicators Using the coefficient of determination (R) 2 The root mean square error (RMSE) and mean absolute error (MAE) are used as quantitative evaluation indicators, and their calculation formulas are as follows: Where n is the total number of samples in the test set, and ȳ is the average value of the measured SPAD values ​​in the test set.

[0093] 5.1.3 Experimental Results The quantitative results on the test set are shown in the table below: 5.1.4 Synergistic Effect Analysis The results of the ablation experiments above show that there are significant differences in model performance under different constraint conditions.

[0094] (1) Introducing only spatial constraints (Experiment B) Compared to the baseline model (Experiment A), after introducing instance segmentation, the RMSE decreased from 4.144 to 3.600, the error decreased by approximately 13.1%, and the R² increased from 0.400 to 0.527. These results demonstrate that removing background noise effectively cleans the model input distribution, and spatial constraints can significantly improve regression accuracy.

[0095] (2) Only physical initialization is introduced (Experiment C) Without background removal, applying differential initialization only to the spectral response branch increased the RMSE to 4.325 and decreased the R² to 0.346. This result indicates that in the presence of complex field background disturbances, physical priors are difficult to reliably function; background pixels alter the statistical distribution of convolutional features, thereby weakening or even negating the spectral response direction constructed by physical initialization. This further validates that spatial constraints are a prerequisite for the effectiveness of physical constraints.

[0096] (3) Combination of spatial constraints and physical constraints (Experiment D) With instance segmentation constructing a clean input distribution, the addition of physical differential initialization further improves model performance to: R² = 0.561, RMSE = 3.467, and MAE = 2.656. Compared to Experiment B (RMSE = 3.600) which only uses instance segmentation, the error is further reduced by approximately 3.7%; compared to Experiment C (RMSE = 4.325) which only uses physical initialization, the error is reduced by approximately 19.8%.

[0097] (4) Analysis of the collaborative mechanism The above results show that physical constraints are difficult to function independently without spatial constraints; spatial constraints can significantly improve the input distribution; and physical initialization can only effectively guide the direction of network optimization when spatial constraints provide a clean input distribution.

[0098] Therefore, spatial constraints and physical constraints are not simply superimposed, but rather have a clear functional dependency and coupling relationship: spatial constraints limit the range of input distribution; physical constraints limit the direction of parameter optimization; the two act on different dimensions (input space and parameter space) respectively, together forming a dual-constrained optimization structure.

[0099] 5.2 Comparative Experiment 1: Verification of the Influence of Segmentation Accuracy on the Physical Constraint Effect This experiment aims to verify the synergistic mechanism revealed in this invention, namely, that "the accuracy of spatial constraints determines the effectiveness of physical constraints." Specifically, it demonstrates that physical initialization can only provide a positive gain under high-precision segmentation conditions; under low-precision segmentation conditions, it will have a negative impact.

[0100] Experimental Design Our fixed regression network employs the "dual-branch physical initialization model" (D-group model) of this invention, but the "pure leaf image" at its input is generated by segmentation methods of different precision. The segmentation methods compared include: High-precision instance segmentation (used in this invention): YOLOv8s-seg (mAP@0.5:0.95 = 0.991).

[0101] Medium-precision semantic segmentation: U-Net (mAP@0.5:0.95 = 0.817).

[0102] Low-precision traditional methods: Otsu thresholding segmentation (mAP@0.5:0.95 = 0.002) and K-means clustering segmentation (mAP@0.5:0.95 = 0.001).

[0103] We input the "pure leaf images" generated by these methods into the same physical initialization network and compare their performance with a baseline model without physical initialization (i.e., Group B in [Example 5.1], which uses only high-precision segmentation).

[0104] Note: The baseline model is Group B (high-precision segmentation + CNN without physical initialization) in [Example 5.2], and its RMSE is: 3.600。

[0105]

Results Analysis

[0106] Low precision leads to negative transfer: When using low-to-medium precision segmentation methods such as U-Net, Otsu, or K-means, the generated "clean images" contain a large number of background noise pixels, severely interfering with the spectral patterns emphasized by physical initialization. This not only fails to improve performance but also causes the model to perform significantly worse than the baseline model that does not use physical initialization, resulting in a "negative transfer" phenomenon, with K-means exhibiting the most severe performance degradation.

[0107] Conclusion: This experiment demonstrates from data that the core technology of this invention—high-precision spatial constraints—is a "prerequisite" for physical constraints to take effect and produce positive technical results. This invention does not simply superimpose high-precision segmentation and physical initialization, but rather reveals and utilizes a profound, nonlinear synergistic coupling relationship between the two. This deep understanding and application of the underlying technical mechanism enables this invention to achieve additional performance gains compared to schemes that simply concatenate segmentation and regression, and this gain is not a simple linear superposition of the effects of the two.

[0108] 5.3 Comparative Experiment 2: Comparison with statistical methods to verify the necessity of preserving spatial structure This experiment aims to demonstrate that preserving the spatial structure information of the blades is the key to overcoming the bottleneck of prediction accuracy.

[0109] Experimental Design We constructed a representative statistical baseline model: Basic statistical model: This is the most readily conceived approach by those skilled in the art. For the segmented, clean leaf image, only the average values ​​of the R, G, and B channels of all pixels are calculated to form a 3D feature vector. This 3D vector is then input into various classic machine learning regression models (including SVR, Random Forest, and MLP), and the result of the best-performing model is selected as the final benchmark for comparison.

[0110]

Experimental Results

Results Analysis

[0111] Conclusion: This series of comparisons clearly demonstrates that relying solely on the statistical average of pixels for prediction results in a performance bottleneck due to the loss of crucial spatial structural information of the leaf (such as vein patterns and color heterogeneity). This invention, through the technical step of "reconstructing a clean image and inputting it into a CNN," preserves and analyzes the complete spatial structural information of the leaf. This is a necessary and non-obvious creative means to overcome the performance bottleneck of traditional statistical methods and achieve high-precision prediction.

[0112] 5.4 Comparative Experiment 3: Comparison with a single-branch CNN model to verify the superiority of the two-branch decoupled architecture. This experiment aims to demonstrate that the "dual-branch parallel decoupling" architecture proposed in this invention is superior to the simple feature fusion CNN architecture.

[0113] Experimental Design We constructed a single-branch CNN baseline model. This model is also based on clean leaf images, but performs feature fusion at the input: The single-branch fusion model concatenates the original RGB three-channel image with the X and Y gradient maps (representing explicit texture features) extracted by the Sobel operator, forming a 5-channel input tensor. This tensor is then fed into a single-branch CNN network with a complexity comparable to the single-branch structure of this invention for training. This design represents an advanced solution for directly fusing spectral and texture information at the input.

[0114]

Experimental Results

Results Analysis

[0115] Although the single-branch model incorporates texture information at the input, its performance is actually inferior to that of this invention. The fundamental reason is that the single-branch model mixes spectral and texture features with different properties in the early stages of the network, forcing the same convolutional kernel to process both modes simultaneously, which may cause interference in feature learning and a decrease in efficiency.

[0116] The dual-branch architecture of this invention follows the design principle of "separation first, fusion later." By establishing dedicated "expert" branches for spectral response and spatial texture, the network can learn each feature more purely and efficiently, resulting in a superior fusion effect. This demonstrates that the dual-branch decoupled architecture of this invention is not a simple engineering replacement, but a more efficient and innovative network structure design based on the principles of image signal processing.

[0117] 5.5 Summary In summary, through ablation experiments and comparative experiments with various baseline models, the necessity, advancement, and inventiveness of the three core technical points proposed in this invention—"synergy of spatial and physical constraints," "preservation of spatial structure," and "dual-branch decoupling architecture"—are fully demonstrated. The beneficial effects produced by their combination far exceed what those skilled in the art could expect from simple combinations or obvious improvements based on existing technologies.

[0118] The ablation experiments verified that the present invention achieved the following results: First, when only instance segmentation (spatial constraint) is used, the model performance is significantly improved. Compared to the baseline model (R... 2 =0.400, RMSE=4.144), the model achieves R after introducing instance segmentation. 2 =0.527, RMSE=3.600, indicating that removing background noise can effectively improve regression accuracy.

[0119] Second, when only physical differentiation initialization is used without background removal, the model performance is not improved; in fact, it decreases to some extent (R0). 2 =0.346, RMSE=4.325). This result indicates that under complex background interference conditions, the spectral response mode emphasized by the physical prior is easily perturbed by non-leaf pixel perturbations, resulting in a negative migration effect.

[0120] Third, by introducing instance segmentation to construct a pure input distribution and then adding physically differentiated initialization, the model performance is further improved to R. 2=0.561, RMSE=3.467, achieving the overall optimal result. Compared to the model that only uses instance segmentation (R... 2 =0.527, RMSE=3.600), further reducing the error.

[0121] The results above demonstrate that the effectiveness of physical constraints depends on the pure input distribution constructed by spatial constraints, and there is a clear functional dependency between the two. Physical initialization is not effective independently, but is "triggered" under background conditions and plays a stabilizing role, thus forming a cooperative mechanism between input distribution constraints and parameter space constraints.

[0122] Meanwhile, after training, the average deviation of the spectral branch convolution kernel weights from the initial values ​​was significantly less than 20%, indicating that the physical priors were effectively preserved and the network did not "forget" the prior knowledge, thus verifying the stability and interpretability of the model learning.

[0123] Example 6: Cross-crop migration and fine-tuning To adapt to different crops or different data collection devices, this system may optionally perform fine-tuning updates to the model parameters; these fine-tuning updates do not affect the basic process of this system for SPAD estimation.

[0124] This invention's method, besides being applicable to cotton leaves, can also be transferred to the estimation of SPAD values ​​for leaves of crops such as soybeans, corn, and rice. For this transfer application to target crops, this embodiment employs a method of simultaneously fine-tuning the instance segmentation network and the dual-branch regression network, specifically including: (1) Data collection of target crop: RGB images of the target crop leaves are collected in the field, and the collection conditions are the same as or similar to the shooting method in Example 1.

[0125] (2) SPAD tag acquisition: The SPAD value of the target leaf corresponding to each image is measured using a SPAD instrument to obtain the SPAD true value tag of the target crop.

[0126] (3) Instance mask annotation: Pixel-level instance annotation is performed on the target crop leaves to obtain the leaf instance mask annotation dataset, which is used for training the instance segmentation network.

[0127] (4) Instance segmentation network fine-tuning: The instance segmentation network parameters obtained from cotton leaf training are used as initialization parameters. Fine-tuning training is performed on the target crop leaf instance mask dataset to obtain an instance segmentation model suitable for the target crop; the target crop leaf instance mask is output during the inference stage.

[0128] (5) Construction of pure leaf image: Using the target crop leaf instance mask obtained in step (4), the original RGB image is filtered pixel by pixel in the manner described in Example 2 to construct a pure leaf image of the target crop.

[0129] (6) Fine-tuning of the bi-branch regression network: Using the parameters of the bi-branch regression network obtained from cotton leaf training as initialization parameters, the bi-branch regression network is fine-tuned and trained based on the "pure leaf image - SPAD label" dataset of the target crop to obtain a SPAD regression model suitable for the target crop.

[0130] (7) Inference output: For the target crop input image, instance segmentation, pure leaf construction and bi-branch regression prediction are performed in sequence to output the SPAD estimate of the target crop leaf.

[0131] Since the absorption / reflection patterns of chlorophyll in the visible light range are consistent across different crops, and since this invention constructs a pure input distribution through instance segmentation and embeds differentiated initialization priors in the spectral branches, the above-mentioned fine-tuning training can obtain stable estimation performance with fewer target crop samples.

[0132] Working principle: Cooperative coupling mechanism of spatial constraints and physical constraints In this invention, the spatial constraints constructed by instance segmentation and the physical constraints constructed by spectral response branching are not two independent and simply superimposed techniques, but rather have a clear functional dependency and a mutually reinforcing synergistic coupling mechanism, specifically reflected in the following aspects: 1. Spatial constraints provide a prerequisite for the effective functioning of physical constraints. In the original RGB image without background removal, the spectral distribution of background pixels such as soil, weeds, withered leaves, and shadows differs significantly from that of leaves, introducing spectral responses unrelated to chlorophyll content into the convolution operation. Even if a differential initialization based on chlorophyll absorption characteristics is applied to the spectral response branch, the resulting physical response pattern of "red light enhancement, green light suppression, and moderate blue light enhancement" will be interfered with and overwhelmed by the irrelevant spectral information from a large number of background pixels, making it difficult for the physical prior to function stably.

[0133] This invention performs pixel-level filtering of the input using an instance segmentation mask, setting all non-leaf pixels to zero. This ensures that the statistical distribution of pixels entering the spectral response branch is determined solely by the leaf region. Under this pure spectral distribution condition, the physical prior constructed by differential initialization can truly align with the spectral response related to chlorophyll content, thus effectively fulfilling its purpose.

[0134] Therefore, spatial constraints are a prerequisite for physical constraints to take effect, and the two constitute a clear functional dependency relationship, rather than being two isolated steps.

[0135] 2. Physical constraints improve sample efficiency resulting from spatial constraints. While instance segmentation can remove background noise, when relying solely on pure leaf images for data-driven learning, the network still needs to learn "which spectral channels are related to chlorophyll content" from a limited number of samples, resulting in slow convergence and a tendency to overfit.

[0136] This invention introduces physical prior initialization into the spectral response branch, ensuring that the network is within a parameter neighborhood that conforms to the chlorophyll spectral absorption law from the very beginning of training. This combines the "pure input after background removal" with the "parameter space that conforms to physical laws," allowing the network to optimize in the correct feature directions. This mechanism improves sample efficiency and generalization ability while reducing sensitivity to data size.

[0137] Therefore, physical constraints further amplify the value of spatial constraints, and the two reinforce each other.

[0138] 3. The accuracy of spatial constraints is the decisive factor in whether physical constraints can play a positive role: Subsequent comparative experiments will demonstrate from the data that the physical constraints (differential initialization) of this invention are highly sensitive to the purity of the input data. Only when the accuracy of the spatial constraints (segmentation) reaches a sufficiently high level (e.g., the YOLOv8s-seg used in this invention achieves 0.991 mAP@0.5:0.95), providing pure leaf inputs with almost no background noise, can the physical constraints stably play their positive role in guiding network optimization and improving accuracy. Conversely, if a low-precision segmentation method is used, residual background pixel noise will seriously interfere with the physical constraints, and may even cause the model performance to be worse than the baseline without physical constraints, resulting in a "negative transfer" phenomenon. This discovery reveals the profound intrinsic connection between the two core technologies of this invention and highlights the necessity and creativity of using a high-precision instance segmentation model in this invention.

[0139] 4. The nonlinear enhancement effect brought about by the collaborative mechanism Due to the aforementioned functional dependence and dual constraint mechanism, the combination of spatial constraints and physical constraints is not a simple linear superposition of their respective contributions.

[0140] The ablation experiment showed that: When only spatial constraints (instance partitioning) are introduced, the RMSE decreases from 4.144 to 3.600; When only physical constraints are introduced (differentiated initialization), RMSE increases from 4.144 to 4.325; When the two factors are combined, the RMSE further decreases to 3.467.

[0141] If the two methods are simply an independent superposition, their combined effect should not significantly exceed the sum of the contributions of the individual methods. However, actual results show that introducing physical constraints on top of background removal (Experiment B) reduces the error by about 3.7%; introducing segmentation on top of existing physical constraints (Experiment C) further reduces the error by about 19.8%. Both paths produce irreplaceable additional gains, exhibiting obvious nonlinear synergistic enhancement characteristics.

[0142] This result further confirms from an experimental perspective that there is a real synergistic coupling effect between the spatial constraints and physical constraints of the present invention, and the technical effect produced by their combination exceeds the range that a person skilled in the art could reasonably expect based on a single means, and therefore does not belong to an obvious simple combination.

[0143] Coupling mechanism of spatial constraints triggering physical constraints This invention reveals that physically-inspired initialization is highly sensitive to the distribution of input data. Without removing background interference, the spectral information of background pixels alters the statistical distribution of convolutional features, rendering the differentiated initialization based on chlorophyll absorption patterns ineffective and even leading to negative migration. After constructing a pure leaf mask through instance segmentation, the pixel distribution of the input image is determined solely by the leaf region, completely eliminating background noise. Under these conditions, the differentiated initialization of the spectral response branch accurately aligns with the spectral response direction related to chlorophyll content, confining the network optimization path to a parameter neighborhood that conforms to physical laws. Therefore, spatial constraints are not an independent preprocessing step but a prerequisite for the stable operation of physical constraints. These two aspects act on the input distribution level and the parameter space level respectively, forming a two-dimensional constrained optimization mechanism, thereby achieving a synergistic optimization mechanism that couples input distribution constraints and parameter space constraints.

[0144] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed in this invention.

Claims

1. A method for estimating the SPAD value of cotton leaves in the field, characterized in that: Includes the following steps: S1. Obtain an RGB image containing cotton leaves, soil, weeds, and light and shadow background; S1.1 The target cotton leaf corresponding to the RGB image is measured using a SPAD instrument to obtain the SPAD measured value of the target cotton leaf; S2, input the RGB image into an instance segmentation network to obtain a leaf instance mask set {M i} and a corresponding confidence score p i , retain the leaf instance mask that satisfies p i ≥ a confidence score threshold T conf , and T conf =0.

5. S3. Post-process the set of leaf instance masks, the post-processing including: removing small connected regions based on an area threshold, the area threshold being 0.05% to 0.5% of the total number of pixels in the RGB image; when multiple leaf instances exist, selecting pixel area A. i The largest instance mask is used as the target leaf mask M. The formula for calculating the pixel area of ​​each instance mask is as follows: S4. Filter the original RGB image pixel by pixel according to the target leaf mask: Perform pixel-by-pixel multiplication between the original RGB image and the generated binary mask: Where M(x,y)∈{0,1}, pixels with a value of 1 correspond to the leaf area, and pixels with a value of 0 correspond to the background area. After the operation, the pixels in the non-masked area are set to the preset background value of 0, and only the RGB pixel information of the leaf area is retained, thus obtaining a pure leaf image. S5. Input the purified leaf image into a two-branch regression network, uniformly scale the size of the purified leaf image obtained in S4, and normalize the pixel values ​​to the [0,1] interval. The two-branch regression network includes: Spectral response branch: The branch consists of a convolutional block, including a convolutional layer, a batch normalization layer, and a ReLU activation function. Its forward computation can be represented as: Conv is used to extract local features, BN is used to improve training stability and accelerate convergence, and ReLU is used to introduce nonlinearity to apply RGB channel differential scaling to the first convolutional kernel of the spectral branch during the training initialization phase; pure Input a clean leaf image, W tex b represents the kernel weight parameters of the spectral branch convolutional layer. tex These are the bias parameters for the spectral branch convolutional layer; The weights of the convolutional kernel are scaled according to the input channel: the weights of the red channel are multiplied by an enhancement factor of 1.3 to 1.7, the weights of the green channel are multiplied by a suppression factor of 0.6 to 0.9, and the weights of the blue channel are multiplied by an enhancement factor of 1.0 to 1.

4. Texture feature branch: Also consists of a convolutional block, including convolutional layers, batch normalization layers, and ReLU activation functions, but without applying spectral physical differential initialization. Its forward computation can be represented as: W tex b represents the kernel weight parameters of the texture branch convolutional layer. tex These are the bias parameters for the texture branch convolutional layer; S6. Fuse the output features of the spectral response branch and the texture feature branch to obtain the fused features: Where Concat() represents the channel dimension splicing operation, F spec For spectral branch output characteristics, F tex Output features for texture branches; S7. Based on the fused features, output the predicted SPAD value of the cotton leaf: Regression prediction layer: The output feature map of the shared backbone is processed by global average pooling (GAP) to obtain a 512-dimensional global vector. Where h and w are the feature map space dimensions, and c is the channel index; The 512-dimensional vector is then input into the regression head to output the SPAD prediction value, which is then converted into a three-layer fully connected structure: ① FC1: 512→256, ReLU, Dropout=0.4; ② FC2: 256→128, ReLU, Dropout=0.3; ③ FC3: 128→1, linear output of continuous SPAD value ŷ; Dual-branch decoupling: The pure leaf image I obtained from S4 pure After S5 preprocessing, the spectral response branch and texture feature branch are used as network input. In the shallow layers, they extract different types of low-level features using independent parameter sets. The calculation process is as follows: Then, channel-level splicing and fusion are performed: The fused feature map F_fusion is input into a shared backbone network, and its output is then passed through a regression layer to obtain the final SPAD prediction value: ŷ = g_reg( g_shared(F_fusion; θ_shared) ; θ_reg ) Where θ_spec and θ_tex are the shallow parameter sets of the two branches; θ_shared are the parameters of the shared backbone network; θ_reg are the parameters of the regression head; g_shared() represents the forward computation process of the shared backbone network, and g_reg() represents the forward computation process of the regression head.

2. The method for estimating the SPAD value of cotton leaves in the field according to claim 1, characterized in that: The instance segmentation network is a YOLOv8s-seg network structure.

3. The method for estimating the SPAD value of cotton leaves in the field according to claim 2, characterized in that: During the training of the instance segmentation network, Mosaic augmentation and random flipping data augmentation strategies are adopted. Sample allocation and positive / negative sample matching are completed using the default label allocation and training strategy of YOLOv8.

4. A method for estimating the SPAD value of cotton leaves in the field according to any one of claims 1 to 3, characterized in that: The weight of the red light channel is multiplied by 1.5, the weight of the green light channel is multiplied by 0.7, and the weight of the blue light channel is multiplied by 1.

2.

5. The method for estimating the SPAD value of cotton leaves in the field according to claim 4, characterized in that: The post-processing further includes at least one selected from hole filling, morphological opening / closing operations, and boundary smoothing, with a structuring element size of 3×3 or 5×5, to obtain a corrected mask {M}. i ′}, and use {Mi′} as the input mask set for subsequent area filtering and target blade selection steps.

6. A method for estimating the SPAD value of cotton leaves in the field according to any one of claims 1 to 3, characterized in that: A phased training strategy is used between the segmentation network and the two-branch regression network, employing only the regression loss L. reg The training loss function L of a two-branch regression network reg Mean squared error loss (MSE): Where N is the batch size, y i Let ŷ be the measured SPAD value of the i-th sample. i Predict the SPAD value for the network.

7. The method for estimating the SPAD value of cotton leaves in the field according to claim 6, characterized in that: The segmentation network and the two-branch regression network employ an end-to-end joint training strategy, using a joint loss function: Among them, α=0.3~0.5, β=0.5~0.7, L seg The segmentation loss of the segmentation network for the instance.

8. The application of the method for estimating the SPAD value of cotton leaves in the field according to claim 6, characterized in that: The method for estimating the SPAD value of cotton leaves in the field is applied to the estimation of the SPAD value of crop leaves, wherein the crop includes cotton, soybean, corn or rice.

9. A field cotton leaf SPAD value estimation system according to claim 5, characterized in that: To implement the method of claim 1, comprising: The image acquisition module is used to acquire RGB images containing cotton leaves, soil, weeds, and light and shadow backgrounds; The instance segmentation module is used to perform instance segmentation on RGB images and output the confidence scores of candidate leaf instances and pixel-level instance masks. The mask post-processing module is used to perform hole filling, morphological opening / closing operations or boundary smoothing on instance masks, and remove small connected regions based on area thresholds. The target blade selection module is used to select the instance mask with the largest pixel area as the target blade mask when there are multiple blade instance masks. The background removal module is used to filter the original RGB image pixel by pixel according to the target leaf mask to obtain a clean leaf image. The dual-branch physics-inspired regression module includes a spectral response branch and a texture feature branch. The spectral response branch is used to construct spectral physical constraints, and the texture feature branch is used to extract spatial texture features of the leaf. The feature fusion module is used to fuse the output features of the spectral response branch and the texture feature branch to obtain fused features; The SPAD value prediction output module outputs the SPAD value prediction result of cotton leaves based on the fused features.

10. The method for estimating the SPAD value of cotton leaves in the field according to claim 1, characterized in that: The SPAD measured values ​​were obtained from the target cotton leaves using a SPAD-502 portable chlorophyll meter.