Greenhouse cucumber leaf area index measurement method and system

By using deep learning instance segmentation and contour completion models, the problem of leaf occlusion in greenhouse cucumber leaf area index measurement was solved, realizing automated, fast, and accurate leaf area index calculation, and improving data collection efficiency and accuracy.

CN121739932APending Publication Date: 2026-03-27YUNNAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing leaf area index measurement methods are difficult to accurately distinguish and extract the complete outline of shaded leaves in greenhouse cucumber cultivation environments, leading to measurement deviations. Furthermore, manual measurement is inefficient and cannot meet the needs of large-scale, high-frequency data collection.

Method used

By employing a deep learning instance segmentation model and a contour completion model, and through image acquisition, deep learning instance segmentation, and contour completion techniques, cucumber plant images are processed automatically to accurately calculate the leaf area index. This includes the prototype-coefficient decoupling mechanism of the deep learning instance segmentation model and the conditional generative adversarial network of the contour completion model to solve the leaf occlusion problem.

Benefits of technology

It enables rapid, batch, and accurate measurement of greenhouse cucumber leaf area index, reduces reliance on manual labor, improves data collection efficiency and accuracy, and ensures high precision and stability of large-scale data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121739932A_ABST
    Figure CN121739932A_ABST
Patent Text Reader

Abstract

The invention relates to a greenhouse cucumber leaf area index measurement method and system. The greenhouse cucumber leaf area index measurement method comprises the following steps: collecting a canopy image of a cucumber plant to be measured, and carrying out noise reduction preprocessing on the image; inputting a pre-trained deep learning instance segmentation model to obtain an initial edge contour of the cucumber leaf; carrying out incomplete contour supplementation on the initial edge contour of the cucumber leaf through a pre-trained contour complementation model; calculating the total leaf area of the cucumber plant according to the complete leaf edge contour, and calculating the cucumber leaf area index according to the total leaf area and the cucumber flowerpot area; establishing a cucumber leaf area index grade judgment standard, and determining the growth grade of the cucumber plant. According to the scheme provided by the invention, a leaf area index measurement error caused by leaf overlapping in a complex canopy environment of cucumbers can be effectively solved, and high precision and stability of large-scale data acquisition are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of leaf area measurement, in particular to a greenhouse cucumber leaf area index measurement method and system. BACKGROUND

[0002] Leaf area index (LAI) is a key physiological and ecological indicator for measuring the growth state and photosynthetic efficiency of crops such as cucumbers, and its accurate determination is crucial for guiding water and fertilizer management and yield prediction.

[0003] Current leaf area index measurement methods include the punch weighing method, leaf area meter method, gap ratio theory measurement method, digital hemispherical photography method, ground laser radar / three-dimensional scanning method, and remote sensing measurement method. The punch weighing method and leaf area meter method are manual measurement methods, but manual measurement is prone to introduce unstable product control and data accuracy interference, has high labor intensity, low efficiency, and is difficult to meet actual needs, especially in substrate selection experiments that require large quantities and high frequency data collection. The gap ratio theory measurement method, digital hemispherical photography method, and ground laser radar / three-dimensional scanning method rely on models and theoretical assumptions, and when the actual situation violates these assumptions, the measurement results will be biased, and are susceptible to environmental conditions. Remote sensing measurement method is suitable for open-air large-area planting conditions.

[0004] In the greenhouse cucumber cultivation environment, the cucumber canopy grows densely, and there is a serious mutual shading problem between the leaves. The existing methods based on two-dimensional image processing are difficult to accurately distinguish and extract the complete contour of the shaded leaves, which becomes a key technical problem restricting the high-precision calculation of LAI.

[0005] Therefore, there is an urgent need for a method that uses deep learning and contour completion technology to solve the problem of rapid, batch, and accurate measurement of greenhouse cucumber leaf area index, and to realize automatic and high-throughput cucumber phenotype data collection. SUMMARY

[0006] To solve or partially solve the problems in the related art, the present application provides a greenhouse cucumber leaf area index measurement method and system, aiming to solve the problem of rapid, batch, and accurate measurement of greenhouse cucumber leaf area index.

[0007] The first aspect of the present application provides a greenhouse cucumber leaf area index measurement method, comprising: Collecting a canopy image of a cucumber plant to be measured to obtain a cucumber plant image, and performing noise reduction preprocessing on the cucumber plant image; Inputting the preprocessed cucumber plant image into a pre-trained deep learning instance segmentation model to obtain an initial edge contour of the cucumber leaf; Supplementing the initial edge contour of the cucumber leaf with a pre-trained contour completion model to obtain a complete set of leaf edge contours; The total leaf area of ​​the cucumber plant is calculated based on the complete set of leaf edge contours. The cucumber leaf area index is then calculated by comparing the total leaf area with the size of the cucumber flowerpot. Establish a standard for judging the grade of cucumber leaf area index, and determine the growth grade of cucumber plants by combining the cucumber leaf area index.

[0008] Optional, pre-trained deep learning instance segmentation models include: The deep learning instance segmentation model adopts a YOLACT-based architecture, adding an additional prototype mask branch and a mask coefficient branch at the end of the feature fusion network. The main body of the deep learning instance segmentation model follows the decoupled header structure of YOLOv8, decomposing the instance segmentation task into two parallel, decoupled subtasks to generate a general prototype and predicted instance coefficients. The prototype mask branch is a fully convolutional network that receives the highest-resolution feature map output from the feature fusion network as input and generates a set of dimensions [missing information - likely a dimensionality value]. prototype mask matrix Prototype mask matrix The basic shape and texture templates of all leaf instances in the image are obtained; the mask coefficient branch is integrated inside the detection head and runs in parallel with the bounding box regression and class classification branches, for each detected leaf candidate box. Predict one dimensional mask coefficient vector ; During the model inference phase, the final pixel-level instance mask is synthesized through linear combination to ensure the independence of each overlapping leaf; obtained from the detection head. Mask coefficient matrix corresponding to each valid blade instance ; the mask coefficient matrix With prototype mask matrix Perform matrix multiplication: (1) Matrix multiplication operation along Linear weighted summation is performed on the dimensions to generate Candidate masks for each instance ; For each candidate mask, apply binarization processing by cropping to the corresponding bounding box region, applying Sigmoid activation, and applying a preset threshold to generate the final binary instance mask; The prototype-coefficient decoupling mechanism ensures that even with severe blade overlap, the deep learning instance segmentation model can extract independent, unambiguous pixel-level masks from the shared prototype through independent coefficient vectors, and accurately calculate the pixel area of ​​each blade.

[0009] Optional contour completion models include: The contour completion model is constructed based on a conditional generative adversarial network architecture, and is used for accurately restoring the geometric contour of the occluded part, and includes a generator G and a discriminator D; the generator G adopts a U-Net as a backbone network, captures global context information through an encoder, and transmits high-resolution features of the encoder to a decoder through a skip connection, so as to ensure the detail accuracy and edge definition of the completed contour; the generator G is responsible for receiving the incomplete leaf contour image and predicting the missing pixel value; The discriminator D adopts a PatchGAN structure, divides the image into a plurality of N×N local small blocks, and judges the authenticity of each small block independently, so as to force the generator G to generate a realistic and topologically coherent contour in the local geometric details, and effectively prevent the completion area from appearing blurred or structure incoherent artifacts; The contour completion model training involves an adversarial game between the generator G and the discriminator D, and is optimized through a weighted combination of multiple loss functions: (2) In the formula, Ladversarial represents an adversarial loss, Ladversarial represents an adversarial loss weight, Lreconstruction represents a reconstruction loss, Lreconstruction represents a reconstruction loss weight, Lperception represents a perception loss, Lperception represents a perception loss weight.

[0010] Optionally, the initial edge contour of the cucumber leaf is supplemented with an incomplete contour, including: The generator G of the pre-trained contour completion model receives the incomplete leaf edge contour image output by the deep learning instance segmentation model; the generator G automatically fills the pixels and infers the structure of the incomplete area caused by occlusion based on the learned geometric mapping rule; and finally outputs a complete leaf edge contour set with accurate topological structure, overcoming the systematic underestimation error caused by leaf overlap.

[0011] Optionally, the total leaf area of the cucumber plant is calculated, including: Count the number of pixel points contained in all complete leaf edge contours to obtain a total pixel area; According to the pixel-physical size calibration coefficient, the total pixel area is converted into an actual total physical leaf area, and the total pixel area obtained by statistics is multiplied by the pixel-physical size calibration coefficient to obtain the total physical leaf area of the cucumber plant : (6) In the formula, Ltotal represents a total pixel area, Lpixel represents a pixel-physical size calibration coefficient, is a physical distance from the camera lens center to the leaf canopy measurement plane, and is the pixel focal length of the X-axis and Y-axis.

[0012] Optionally, the cucumber leaf area index is calculated, comprising: According to the total physical leaf area of the cucumber plant and the corresponding cucumber flowerpot area calculated, the cucumber leaf area index is calculated: (7) In the formula, represents the cucumber leaf area index, represents the total physical leaf area of the cucumber plant, represents the surface area of the land or flowerpot occupied by the cucumber plant.

[0013] Optionally, a cucumber leaf area index grade determination standard is established, comprising: According to the greenhouse cucumber cultivation technology and historical cultivation experience, the LAI growth grade determination standard is divided into four grades of best growth state, good growth state, general growth state and poor growth state; The cucumber leaf area index value range of the best growth state is greater than or equal to , the plant photosynthetic efficiency is high, and the growth is vigorous; The cucumber leaf area index value range of the good growth state is greater than or equal to , less than , the plant photosynthetic efficiency is moderate, and the management is normal; The cucumber leaf area index value range of the general growth state is greater than or equal to , less than , the plant needs to pay attention to water and fertilizer management, and there is room for improvement; The cucumber leaf area index value range of the poor growth state is less than , the plant development is slow, and the management measures need to be adjusted immediately.

[0014] The second aspect of the present application provides a greenhouse cucumber leaf area index measurement system, comprising: The host computer, the PLC controller, the communication module, the visual detection device, and the positioning conveying module; The host computer is used to load and execute a deep learning instance segmentation model and a contour completion model, realize image processing, leaf area calculation and area index calculation; The visual detection device is used to collect high-definition cucumber plant images; The positioning conveying module is used to convey and stop the visual detection device in the cucumber plant planting area to be measured; The PLC controller is used to realize accurate timing control of the measurement process and control of the visual detection device; A communication module is configured to realize communication between the host computer, the PLC controller, the visual detection device and the positioning and conveying module assembly.

[0015] Optionally, the positioning and conveying module comprises: a high-resolution camera, a slide rail, a fixed knob, a high-strength locking mechanism and a base; The base is installed on a greenhouse top frame above the cucumber plants, and the slide rail is installed on the base. The high-resolution camera is slidably installed on the slide rail, the high-strength locking mechanism is installed on both sides of the slide rail, and the fixed knob is installed on the high-strength locking mechanism. The high-resolution camera is fixed by the fixed knob and the high-strength locking mechanism, so as to realize accurate positioning of the camera optical axis and the center of the measurement area and the working distance, and accurately calibrate and determine the conversion coefficient of the pixels to the physical size of the camera under the fixed working distance.

[0016] The technical scheme provided by the present application can have the following beneficial effects: By using the deep learning instance segmentation model based on optimization and combining the contour completion model to complete the occluded contour, the leaf area index measurement error caused by the overlapping of leaves in the complex cucumber canopy environment is effectively solved, and the high precision and stability of large-scale data acquisition are ensured. Through the full-process automatic system from image acquisition, leaf identification, area calculation to leaf area index output, the dependence on large-scale manpower investment is reduced, and the problems of low data acquisition efficiency and large human error are solved.

[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0018] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like parts throughout the several views, and in which the exemplary embodiments of the present application are shown.

[0019] Figure 1 is a flowchart of the greenhouse cucumber leaf area index measurement method shown in the embodiments of the present application; Figure 2 is an image segmentation schematic diagram of the greenhouse cucumber leaf area index measurement method shown in the embodiments of the present application; Figure 3 is a schematic diagram of the incomplete contour completion of the greenhouse cucumber leaf area index measurement method shown in the embodiments of the present application; Figure 4 is a structural schematic diagram of the greenhouse cucumber leaf area index measurement system shown in the embodiments of the present application; Figure 5Fig. 1 is a schematic structural diagram of a positioning and conveying module of a greenhouse cucumber leaf area index measurement system according to an embodiment of the present application.

[0020] In the figure: 1-1-1, high-resolution camera, 1-1-2, sliding rail, 1-1-3, fixed knob, 1-1-4, high-strength locking mechanism, 1-1-5, base. DETAILED DESCRIPTION

[0021] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0022] The technical solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0023] Figure 1 Fig. 2 is a flowchart of a greenhouse cucumber leaf area index measurement method according to an embodiment of the present application.

[0024] In some embodiments, referring to Figure 1 A greenhouse cucumber leaf area index measurement method and system, comprising: S101, collecting a canopy image of a cucumber plant to be measured to obtain a cucumber plant image, and performing noise reduction preprocessing on the cucumber plant image; Specifically, a high-precision image of the canopy of the cucumber plant to be measured located in the measurement area is collected by using a high-resolution industrial camera module to obtain a cucumber plant image.

[0025] In order to ensure the quality of the collected cucumber plant image, the image needs to be preprocessed. This includes median filter noise reduction processing of the cucumber plant image. The natural light in the greenhouse environment is complex and variable, and factors such as dust and water vapor may introduce salt and pepper noise. Median filtering can effectively suppress discrete noise points in the image, smooth the image, and at the same time preserve the edge information of the leaves to the greatest extent, providing high-quality input data for the accurate segmentation of the subsequent deep learning model.

[0026] S102, inputting the preprocessed cucumber plant image into a pre-trained deep learning instance segmentation model to obtain an initial edge contour of the cucumber leaf; Specifically, the deep learning instance segmentation model is constructed based on the YOLOv8 framework. To deal with the challenges of dense canopy and serious overlap between leaf instances in greenhouse cucumber canopy, a mask coefficient branch and a prototype mask branch are added in the head network of the model. By generating an independent mask for each detected leaf instance, even if there is overlap between leaves, the model can accurately assign each leaf pixel-level precision, thereby avoiding misidentifying multiple leaves as a whole and solving the problem that traditional image processing methods cannot distinguish leaf instances in complex canopy environments.

[0027] Specifically, the deep learning instance segmentation model adopts a YOLACT-based architecture design, and an additional prototype mask branch and a mask coefficient branch are added at the end of the feature fusion network Neck. The main body of the model follows the decoupled head structure of YOLOv8, which decomposes the instance segmentation task into two parallel and decoupled subtasks to generate general prototypes and predict instance coefficients.

[0028] The prototype mask branch is a fully convolutional network FCN that receives the highest resolution feature map output by the feature fusion Neck network as input. Through upsampling and convolution operations, a set of prototype mask matrices with dimensions are generated, where is the number of prototype masks, and the prototype mask matrix obtains the basic shape and texture template of all leaf instances in the image.

[0029] The mask coefficient branch is integrated inside the detection head and is parallel to the bounding box regression and class classification branch. For each detected leaf candidate box , a dimensional mask coefficient vector is predicted.

[0030] The running process of the deep learning instance segmentation model, i.e., the linear synthesis process of the instance mask, includes: During the model inference stage, the final pixel-level instance mask is synthesized through linear combination to ensure the independence of each overlapping leaf. First, the mask coefficient matrix corresponding to the effective leaf instances is obtained from the detection head. Then, the coefficient matrix and the prototype mask matrix are multiplied by matrix: (1) This multiplication operation performs linear weighted summation along the dimension to generate candidate masks for each instance.

[0031] ​​Finally, the final binary instance mask is generated by applying cropping to the corresponding bounding box region, sigmoid activation and preset threshold binarization to each candidate mask.

[0032] This prototype-coefficient decoupling mechanism ensures that even with severe leaf overlap, the deep learning instance segmentation model can extract independent and unambiguous pixel-level masks from shared prototypes through independent coefficient vectors, accurately calculating the pixel area of each leaf and avoiding misidentifying multiple leaves as a whole. It can distinguish leaf edge profiles in complex canopy environments.

[0033] S103, the initial edge contour of the cucumber leaf is supplemented by the pre-trained contour completion model, and a complete set of leaf edge contours is obtained; For the obtained initial edge contour of the leaf, due to the mutual occlusion of the cucumber canopy, the contour of part of the leaf may be incomplete. Therefore, the trained contour completion model is used to automatically supplement the incomplete contour of the leaf, and a complete set of leaf edge contours is obtained.

[0034] Specifically, the pre-trained contour completion model comprises: The contour completion model is constructed based on a conditional generative adversarial network (GAN) architecture, including a generator G and a discriminator D, for accurately restoring the geometric contour of the occluded part. The GAN model structure includes: The generator G is responsible for receiving incomplete leaf contour images and predicting missing pixel values. The generator G uses U-Net or its variants as the backbone network, captures global context information through the encoder, and transmits high-resolution features of the encoder to the decoder through the skip connection, ensuring the detail accuracy and edge clarity of the completed contour.

[0035] The discriminator D adopts a PatchGAN structure, which divides the image into multiple N×N local patches, and judges the authenticity of each patch independently, to force the generator G to generate realistic and topologically coherent contours in local geometric details, effectively preventing the completion area from appearing blurred or structure incoherent artifacts.

[0036] The training process and loss function of the contour completion model: The model training involves an adversarial game between the generator G and the discriminator D, which is optimized through the weighted combination of multiple loss functions: (2) In the formula, Ladversarial represents the adversarial loss, Ladversarial represents the adversarial loss weight, Lreconstruction represents the reconstruction loss, Lreconstruction represents the reconstruction loss weight, Lperception represents the perception loss, perceptual loss weight; adversarial loss The generator G generates contours that the discriminator D cannot distinguish. Reconstruction loss The L1 norm loss is adopted to ensure that the pixel values filled by the generator G in the missing area are exactly matched with the ground truth GT, which is the core loss term to ensure the accuracy of the geometric area of the completed contour, and its weight needs to be set to the highest. Perceptual loss By comparing the difference between the generator G output and the GT image on the high-level feature map of the pre-trained network, the coherence of the completed area and the surrounding visible edge in terms of semantics and structure is ensured.

[0037] The running process of the contour completion model: The completed generator G receives the incomplete leaf edge contour image output by the deep learning instance segmentation model. The generator G automatically fills the pixels and infers the structure of the missing area caused by occlusion based on the learned geometric mapping rule. Finally, the complete leaf edge contour set with accurate topological structure is output, overcoming the systematic underestimation error caused by leaf overlap.

[0038] S104, according to the complete leaf edge contour set, calculate the total leaf area of the cucumber plant, and calculate the cucumber leaf area index through the total leaf area and the size of the cucumber flowerpot area; Specifically, the calculation of the total leaf area of the cucumber plant includes: Count the number of pixel points contained in the complete leaf edge contour set to obtain the total pixel area; and convert the pixel area into the actual physical area according to the pre-determined pixel-physical size calibration coefficient.

[0039] Pixel-physical size calibration coefficient is a constant determined by geometric derivation based on the pinhole camera model and the fixed working distance, and its calculation method includes: Camera calibration and internal parameter acquisition: use a high-precision standard plane calibration pattern with known physical size to perform multi-view acquisition and Zhang Zhengyou calibration method calibration when the visual detection device is locked at a fixed working distance .

[0040] The internal parameter matrix K and the distortion coefficient D of the camera are accurately obtained during the calibration process. The internal parameter matrix K contains the focal length and represented in pixels. The acquired cucumber plant image must be de-distorted by the distortion coefficient D to eliminate the problem of non-uniform scale on the image plane caused by lens distortion, ensuring that the is applicable to the entire measurement area.

[0041] Based on the pinhole camera model and the principle of similar triangles, at a fixed working distance , the corresponding physical linear size of a single pixel on the measurement plane is: (3) (4) wherein, is the physical distance from the center of the camera lens to the leaf canopy measurement plane, and are the pixel focal lengths of the X-axis and Y-axis.

[0042] Pixel-physical size calibration coefficient is the actual physical area occupied by a single pixel on the measurement plane: (5) Total physical leaf area calculation: Multiply the total pixel area calculated statistically by the calibration coefficient , and the total physical leaf area of the cucumber plant is obtained: (6) The greenhouse cucumber leaf area index measurement system locks by fixing the knob and locking mechanism, ensuring that the coefficient becomes a reliable constant for system operation, ensuring high accuracy of area measurement.

[0043] According to the total physical leaf area of the cucumber plant and the corresponding cucumber pot area calculated, the cucumber leaf area index is calculated: (7) wherein, represents the cucumber leaf area index, represents the total physical leaf area of the cucumber plant, represents the surface area of the land or pot occupied by the cucumber plant.

[0044] S105, establish a cucumber leaf area index grade determination standard, combine the cucumber leaf area index, and determine the growth grade of the cucumber plant; After calculating the leaf area index value, according to the leaf area index and the preset cucumber leaf area index grade determination standard, the growth grade of the cucumber plant is determined.

[0045] The cucumber leaf area index grade determination standard is shown in Table 1 as follows: In some embodiments, corresponding to the foregoing application function implementation device embodiments, the application also provides a greenhouse cucumber leaf area index measurement system.

[0046] Referring to Figure 3 A greenhouse cucumber leaf area index measurement system comprises: a host computer, a PLC controller, a communication module, a visual detection device, and a positioning conveying module; The host computer is used to carry and execute a deep learning instance segmentation model and a contour completion model, and realize image processing, leaf area calculation, and area index calculation. The visual detection device is used to collect high-definition cucumber plant images. The positioning conveying module is used to convey and stop the visual detection device at a planting area of a cucumber plant to be measured. The positioning conveying module comprises: a high-resolution camera 1-1-1, a slide rail 1-1-2, a fixed knob 1-1-3, a high-strength locking mechanism 1-1-4, and a base 1-1-5. The base 1-1-5 is installed on a greenhouse top frame above the cucumber plant, and the slide rail 1-1-2 is installed on the base 1-1-5. The high-resolution camera 1-1-1 is slidably installed on the slide rail 1-1-2, the high-strength locking mechanism 1-1-4 is installed on both sides of the slide rail 1-1-2, the fixed knob 1-1-3 is installed on the high-strength locking mechanism 1-1-4, and the high-strength locking mechanism 1-1-4 is fixed on the high-resolution camera 1-1-1 through the fixed knob 1-1-3.

[0047] The PLC controller is used to realize accurate timing control of the measurement process and control of the visual detection device. The communication module is used to realize communication among the host computer, the PLC controller, the visual detection device, and the positioning conveying module assembly.

[0048] The above has described the embodiments of the application, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other ordinary skilled persons in the art to understand the disclosed embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other ordinary skilled persons in the art to understand the disclosed embodiments.

Claims

1. A method for measuring the leaf area index of greenhouse cucumbers, characterized in that, include: Acquire canopy images of the cucumber plants to be measured to obtain cucumber plant images, and perform noise reduction preprocessing on the cucumber plant images; The preprocessed cucumber plant image is input into a pre-trained deep learning instance segmentation model to obtain the initial edge contour of the cucumber leaves. The incomplete contours of the initial edge contours of cucumber leaves are supplemented by a pre-trained contour completion model to obtain a complete set of leaf edge contours. Based on the complete set of leaf edge contours, the total leaf area of ​​the cucumber plant is calculated, and the cucumber leaf area index is calculated by comparing the total leaf area with the size of the cucumber flowerpot. Establish a grading standard for cucumber leaf area index, and determine the growth grade of the cucumber plant by combining the cucumber leaf area index.

2. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The pre-trained deep learning instance segmentation model includes: The deep learning instance segmentation model adopts a YOLACT-based architecture design, with an additional prototype mask branch and a mask coefficient branch added at the end of the feature fusion network. The deep learning instance segmentation model adopts the decoupled header structure of YOLOv8, decomposing the instance segmentation task into two parallel, decoupled subtasks to generate a general prototype and predict instance coefficients. The prototype mask branch is a fully convolutional network that receives the highest-resolution feature map output from the feature fusion network as input, and generates a set of features with dimension through upsampling and convolution operations. prototype mask matrix Prototype mask matrix Obtain the base shape and texture templates for all leaf instances in the image; The mask coefficient branch is integrated inside the detection head and runs in parallel with the bounding box regression and category classification branches for each detected leaf candidate box. Predict one dimensional mask coefficient vector ; During the model inference phase, the final pixel-level instance mask is synthesized through linear combination to ensure the independence of each overlapping leaf; obtained from the detection head. Mask coefficient matrix corresponding to each valid blade instance ; the mask coefficient matrix With prototype mask matrix Perform matrix multiplication: (1) Matrix multiplication operation along Linear weighted summation is performed on the dimensions to generate Candidate masks for each instance ; For each candidate mask, apply binarization processing by cropping to the corresponding bounding box region, applying Sigmoid activation, and applying a preset threshold to generate the final binary instance mask; The prototype-coefficient decoupling mechanism ensures that even with severe blade overlap, the deep learning instance segmentation model can extract independent, unambiguous pixel-level masks from the shared prototype through independent coefficient vectors, and accurately calculate the pixel area of ​​each blade.

3. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The contour completion model includes: The contour completion model is built on a conditional generative adversarial network architecture to accurately recover the geometric contour of the occluded part, and includes a generator G and a discriminator D. The generator G uses U-Net as the backbone network, captures global context information through the encoder, and passes the high-resolution features of the encoder to the decoder through skip connections to ensure the detail accuracy and edge sharpness of the completed contour. The generator G is responsible for receiving the outline image of the missing leaf and predicting the missing pixel values. The discriminator D adopts the PatchGAN structure, which divides the image into multiple N×N local blocks and independently judges the authenticity of each block, so as to force the generator G to generate realistic and topologically coherent contours in local geometric details, effectively preventing artifacts such as blurring or structural inconsistency in the completed area. Training the contour completion model involves an adversarial game between the generator G and the discriminator D, which is optimized through a weighted combination of multiple loss functions: (2) In the formula, Indicating resistance to loss, Indicates the weight of the resistance loss. Indicates the losses incurred during reconstruction. Indicates the reconstruction loss weight. Indicates perceived loss. This represents the perceived loss weight.

4. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The process of supplementing the incomplete outline of the initial edge contour of the cucumber leaf includes: The generator G of the pre-trained contour completion model receives the incomplete leaf edge contour image output by the deep learning instance segmentation model. The generator G automatically performs pixel filling and structure inference on the incomplete regions caused by occlusion based on the geometric mapping rules learned during training; The final output is a complete set of blade edge contours with accurate topological structure, overcoming the systematic underestimation error of area caused by blade overlap.

5. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The calculation of the total leaf area of ​​the cucumber plant includes: Count the number of pixels contained in all complete leaf edge contours to obtain the total pixel area; Based on the pixel-physical size calibration coefficient, the total pixel area is converted into the actual total physical leaf area. Multiplying the statistically obtained total pixel area by the pixel-physical size calibration coefficient yields the total physical leaf area of ​​the cucumber plant. : (6) In the formula, Represents the total pixel area. Represents the pixel-to-physical size calibration factor. It is the physical distance from the center of the camera lens to the plane measuring the leaf canopy. and It represents the pixel focal length along the X and Y axes.

6. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The calculation of cucumber leaf area index includes: The cucumber leaf area index is calculated based on the total physical leaf area of ​​the cucumber plant and the corresponding area of ​​the cucumber flowerpot. (7) In the formula, Indicates the cucumber leaf area index, This represents the total physical leaf area of ​​the cucumber plant. This indicates the surface area of ​​the land or flowerpot occupied by the cucumber plant.

7. The method for measuring the leaf area index of greenhouse cucumbers according to claim 1, characterized in that, The criteria for establishing cucumber leaf area index grades include: Based on greenhouse cucumber cultivation techniques and historical cultivation experience, the LAI growth grade assessment criteria are divided into four levels: optimal growth status, good growth status, average growth, and poor growth. The optimal leaf area index (LAI) value for cucumbers in their optimal growth state is greater than or equal to 100%. The plants have high photosynthetic efficiency and vigorous growth; A healthy cucumber leaf area index is defined as a value greater than or equal to [value missing]. less than The plant has moderate photosynthetic efficiency and is under normal management. For cucumbers with average growth, the leaf area index range is greater than or equal to less than The plants need attention in terms of water and fertilizer management, and there is room for improvement. The leaf area index of poorly growing cucumbers is less than [value missing]. The plants are developing slowly, and management measures need to be adjusted immediately.

8. A greenhouse cucumber leaf area index measurement system, used to perform the greenhouse cucumber leaf area index measurement method according to any one of claims 1-7, characterized in that, include: Host computer, PLC controller, communication module, vision inspection device, positioning and conveying module; The host computer is used to carry and execute the deep learning instance segmentation model and contour completion model, and to realize image processing, leaf area calculation and area index calculation. The visual inspection device is used to acquire high-definition images of cucumber plants; The positioning and conveying module is used to convey the visual detection device to and stop it in the planting area of ​​the cucumber plant to be measured. The PLC controller is used to achieve precise timing control of the measurement process and control of the vision inspection device; The communication module is used to enable communication between the host computer, PLC controller, vision inspection device, and positioning and conveying module components.

9. The greenhouse cucumber leaf area index measurement system according to claim 8, characterized in that, The positioning and conveying module includes: High-resolution camera, slide rail, fixed knob, high-strength locking mechanism and base; The base is installed on the greenhouse top frame located above the cucumber plants, and the slide rail is installed on the base; The high-resolution camera is slidably mounted on a slide rail. A high-strength locking mechanism is installed on both sides of the slide rail, and a fixing knob is installed on the high-strength locking mechanism. The high-strength locking mechanism is controlled by the fixing knob to fix the high-resolution camera, so as to achieve precise positioning of the camera optical axis, the center of the measurement area, and the working distance, and to accurately calibrate and determine the conversion coefficient from pixel to physical size of the camera at a fixed working distance.