LAI detection method based on U-Net neural network and porosity analysis
By using U-Net neural network and porosity analysis, the problem of high accuracy and high efficiency in leaf area index (LAI) measurement under greenhouse conditions was solved, achieving low-cost, non-destructive leaf segmentation and LAI estimation, providing high-precision technical support for facility agriculture.
Patent Information
- Application Number
- CN202511344825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-23
AI Technical Summary
Existing technologies struggle to obtain leaf area index (LAI) with high precision and efficiency in greenhouse environments, especially under complex lighting and shading conditions. Traditional methods suffer from high equipment costs, low measurement accuracy, and poor model robustness.
The method of using U-Net neural network and porosity analysis is adopted. The YOLOv11n-seg network is used to identify and remove the non-canopy shading objects. The NJ-Unet network is combined for adaptive image enhancement and pixel-level blade segmentation. The LAI is inverted using the concentric ring porosity features.
It achieves low-cost, high-precision, and non-destructive leaf segmentation and LAI estimation in greenhouse environments, possesses good anti-interference capabilities and multi-scale structural characterization capabilities, and is suitable for intelligent management of facility agriculture.
Smart Images

Figure CN121190976A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent sensing technology in smart agriculture, and particularly relates to a LAI detection method based on U-Net neural network and porosity analysis. BACKGROUND
[0002] In the field of smart agriculture and precision management of facility crops, the leaf area index (LAI) as a core phenotypic parameter representing the structure and morphology of crop canopy, the ability of photosynthetically active radiation interception, the intensity of water and nutrient demand, and the potential of final yield, the precise, efficient and non-destructive acquisition method is the key technical support to realize "on-demand regulation" (such as precise water and fertilizer, light and temperature optimization) and "quality improvement and efficiency increase" in the process of large-scale planting of greenhouse tomatoes. In recent years, with the development of facility agriculture towards intelligence and intensification, the traditional LAI measurement technology has gradually been difficult to adapt to the actual needs of modern greenhouse for high-throughput, all-weather and low-cost monitoring, and the technical bottleneck is increasingly prominent.
[0003] The traditional LAI acquisition method mainly includes destructive measurement and contactless non-destructive measurement. Among them, the destructive measurement (such as direct leaf picking and weighing method, grid paper method) needs to collect plant samples manually and process them off-site. It is not only tedious, time-consuming and laborious, but also destroys the continuity of the growth cycle of crops, and cannot realize the dynamic monitoring of the same plant in different growth periods (such as seedling stage, flowering and fruiting stage, fruiting stage). At the same time, limited by the number and representativeness of samples, this method cannot reflect the spatial heterogeneity of the canopy of greenhouse group tomatoes, resulting in large errors in LAI calculation results, and is not suitable for batch monitoring scenes in large-scale greenhouses. Although the contactless non-destructive measurement (such as handheld measurement based on leaf area meter) avoids the destruction of crops, it still relies on manual operation of each plant, which is low in efficiency and high in cost of equipment, and is difficult to popularize in small and medium-sized greenhouses. In addition, such instruments have strict requirements on the measurement environment. The interior of the greenhouse is blocked by facilities such as hanging vine system, supporting steel wire, reflective film, and the crop itself has characteristics such as leaf overlap, curling, surface fluff reflection, which easily leads to blockage of the measurement light path, further reducing the LAI calculation accuracy.
[0004] In recent years, with the development of computer vision and image processing technology, non-contact phenotyping technology based on RGB images has gradually become a research hotspot for LAI estimation. This technology has the advantages of low equipment cost (ordinary industrial cameras or high-definition cameras can meet the needs), convenient data acquisition, and continuous observation. However, the special closed environment of the greenhouse brings multiple challenges to this technology. On the one hand, the complex lighting in the greenhouse (local strong light, shadow, uneven light transmission of the greenhouse film) leads to the dramatic fluctuation of tomato leaf image gray value. Traditional fixed threshold, edge detection and other shallow visual segmentation algorithms are difficult to effectively distinguish between leaves and background, especially when the hanging vine rope, steel wire and other non-crown layer objects have similar features to leaves, which can easily cause "misclassification" and "missing classification", resulting in insufficient leaf extraction accuracy. On the other hand, the tomato canopy has a three-dimensional multi-layer structure, and the thickness difference is significant at different growth stages, and leaf overlap is common. Shallow algorithms can only capture two-dimensional visual features and cannot reflect three-dimensional structural information, making it difficult to meet the agricultural precision requirements.
[0005] To solve the problem of image segmentation accuracy, deep learning has made breakthroughs in the field of agricultural semantic segmentation due to its end-to-end feature self-learning ability. Fully Convolutional Network (FCN), U-Net, DeepLab and other architectures can achieve pixel-level crop organ segmentation, significantly improving the target extraction accuracy in complex backgrounds. However, when these general models are directly applied to greenhouse tomato leaf segmentation and LAI inversion, there are still two major bottlenecks: first, the interference of non-crown layer in the greenhouse (high light of reflective film, thin structure of hanging vine rope) is easily confused with the edge features of leaves. Although existing solutions can extract global features, they are difficult to capture details such as young leaf tips and damaged leaf gaps, which can easily cause blurred segmentation edges and missed detection of small area leaves, resulting in incomplete extraction of effective leaf area. Second, existing solutions rely on a single scale feature to invert LAI, while the porosity of tomato canopy shows significant multi-scale differences with depth (high in the surface layer and low in the middle layer), and a single scale feature cannot represent this spatial heterogeneity, resulting in poor model robustness and difficulty in large-scale promotion.
[0006] In summary, the current greenhouse tomato LAI measurement technology faces multiple dilemmas such as "high precision and high efficiency cannot be achieved", "poor adaptability to complex environments", and "insufficient model robustness". Therefore, it is urgent to develop a technical solution that balances lightweight (adapted to low-cost hardware for on-site deployment in greenhouses), high precision, and multi-scale structural representation capabilities. SUMMARY
[0007] To alleviate or partially alleviate the above technical problems, the solution of the present application is as follows: on the one hand, the present application discloses a greenhouse tomato leaf area index detection method based on U-Net neural network and porosity analysis, comprising the following steps:
[0008] Step S1: Collecting RGB images of the greenhouse tomato canopy, and constructing a time series image dataset;
[0009] Step S2: Processing the RGB images using a YOLOv11n-seg network, identifying and removing non-canopy occlusions, and obtaining a foreground canopy mask;
[0010] Step S3: Centering on the main optical axis of the RGB image, and cutting the inscribed circle region with a zenith angle of 0°-90°, performing adaptive histogram equalization enhancement processing on the cut region;
[0011] Step S4: Inputting the enhanced image into an NJ-Unet neural network for pixel-level leaf semantic segmentation to obtain a leaf mask;
[0012] Step S5: Performing a bitwise AND operation on the foreground canopy mask and the leaf mask, and then performing binaryzation processing on the fusion result using the Otsu method to obtain an effective leaf area;
[0013] Step S6: Dividing the effective leaf area into multiple concentric ring regions, calculating the porosity ring by ring, constructing a multi-scale porosity feature vector, and inversing the LAI based on a supervised regression model.
[0014] In one class of embodiments, the NJ-Unet network comprises:
[0015] The encoder part adopts a pre-trained ResNet50 backbone network;
[0016] The decoder part is set to a four-level progressive upsampling path, and the encoder features are fused through a jump connection;
[0017] The SCSA module is embedded in the upsampling module of each level of the upsampling path, and the SMU is used as the activation function.
[0018] In one class of embodiments, the SCSA module comprises:
[0019] The SMSA branch is used to capture multi-scale spatial context information;
[0020] The PCSA branch performs self-attention calculation based on the spatial prior provided by the SMSA, and strengthens the channel dimension feature response;
[0021] The output of the SMSA branch and the output of the PCSA branch are added to realize the synergistic enhancement of the spatial and channel dimensions.
[0022] In one class of embodiments, the adaptive histogram equalization processing in step S3 specifically comprises:
[0023] The cropped inner circle region image is converted from the RGB color space to the HSL color space to obtain an H channel, an L channel and an S channel;
[0024] The L channel is extracted, and parameters of the CLAHE are dynamically calculated according to a variance of the L channel;
[0025] The CLAHE processing is performed on the L channel;
[0026] The processed L channel is combined with the H channel and the S channel, and is converted back to the RGB color space.
[0027] In one type of embodiment, the calculation of the CLAHE parameters is calculated by the following formula:
[0028] ;
[0029] ;
[0030] wherein Var-L is the variance of the L channel, Var-MAX is the maximum variance of the image size in the value of 0-255, and width is the width of the input cropped inner circle region image.
[0031] In one type of embodiment, the number of the concentric rings in step S6 is 45.
[0032] In one type of embodiment, the formula for calculating the porosity in step S6 is: porosity = 1-(number of leaf pixels / total number of pixels).
[0033] In one type of embodiment, the supervised regression model in step S6 is: a supervised regression model of a robust mapping relationship from the canopy structure features to the LAI obtained by training based on the LAI true value data measured in the field and the multi-scale porosity feature vector.
[0034] In one type of embodiment, the training data of the supervised regression model in step S6 is obtained by field measurement by a Li-2200C canopy analyzer, and the completed supervised regression model is deployed on an embedded platform such as a Jetson Nano to realize real-time calculation of the LAI.
[0035] On the other hand, the present application discloses an electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the greenhouse tomato leaf area index detection method based on the neural network and porosity analysis according to any one of the preceding embodiments when executing the program.
[0036] The technical scheme of the present application has one or more of the following beneficial technical effects:
[0037] (1) It has the characteristics of low cost, only needs ordinary RGB camera to shoot images, and can automatically, quickly and accurately calculate the leaf area index through a lightweight scheme;
[0038] (2) It has high precision anti-interference ability, and can realize accurate leaf segmentation and feature extraction in the complex light and shielding environment of greenhouse;
[0039] (3) The concentric ring porosity analysis method is innovatively used to extract the multi-scale structure features of the canopy, so that the LAI inversion result is more in line with the principles of plant physiology, and the precision is higher.
[0040] In addition, other beneficial effects of the present application will be mentioned in the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 The overall implementation process of the greenhouse tomato leaf area index (LAI) detection in the present application is shown;
[0042] Figure 2 It is the step-by-step flow chart of the greenhouse tomato LAI detection of the present application;
[0043] Figure 3 It is the NJ-Unet network structure diagram;
[0044] Figure 4 It is the SCSA attention mechanism diagram;
[0045] Figure 5 It is the model training loss curve diagram;
[0046] Figure 6 It is the different model segmentation effect diagram;
[0047] Figure 7 It is the ring number influence on prediction performance diagram;
[0048] Figure 8 It is the NJ-Unet predicted LAI and Li-2200C measured value correlation diagram;
[0049] Figure 9 It is the different model verification set evaluation indication diagram. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.
[0051] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second", etc. are used to distinguish the same or similar items with basically the same function and role. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order.
[0052] In order to enable those skilled in the art to more accurately understand the technical solutions of the present application, first, the main terms used in the present application are explained:
[0053] YOLOv11n-seg: a lightweight real-time instance segmentation network. Where "n" represents "nano", the smallest model size and the fastest version. It is based on the latest YOLO target detection framework, which not only can identify objects in the image (such as hanging vines, steel wires), but also can generate an accurate pixel-level mask (Mask) for each detected object. In the present application, it is responsible for quickly and efficiently identifying and segmenting non-crown layer obstructions in the image, providing a "clean" foreground crown layer area for the subsequent NJ-Unet fine leaf segmentation, thereby greatly reducing the interference of complex background to the main task.
[0054] U-Net: a fully convolutional neural network with encoder-decoder structure, whose core features are symmetric U-shaped structure and skip connection. The encoder gradually extracts deep features of the image through downsampling, while the decoder gradually restores the spatial size and details of the feature map through upsampling. The skip connection fuses the high-resolution, shallow features (containing rich edge and texture information) of the encoder with the corresponding deep, semantic features of the decoder, so that it can achieve accurate pixel-level segmentation while preserving the fine outline of the target.
[0055] NJ-Unet: a semantic segmentation network based on the improved U-Net architecture proposed in the present application, which can be regarded as a kind of U-net. The encoder part adopts a pre-trained ResNet50 backbone network, and the decoder part is set to a four-level progressive upsampling path (the number of channels is 192, 384, 768 and 1024 respectively), and the encoder features are fused through skip connection. Its core improvement lies in embedding a spatial channel self-attention (Spatial-Channel Self-Attention, SCSA) module in each upsampling module, and using a smooth maximum unit (Smooth Maximum Unit, SMU) as the activation function, which significantly improves the discrimination ability of leaf edges and fine structures and the nonlinear expression ability of the model.
[0056] Porosity: In this application, it specifically refers to the proportion of non-leaf pixels in the image concentric ring area. Its calculation formula is: Porosity = 1-(number of leaf pixels / total number of pixels). This feature effectively represents the structure density and light transmission characteristics of the canopy at different radial distances, and is a key multi-scale structure feature for LAI inversion.
[0057] Figure 1 The overall implementation process of greenhouse tomato leaf area index (LAI) detection in the application is shown. The scheme proposes a complete "occlusion removal-precise segmentation-porosity analysis-LAI inversion" technical route: first, based on YOLOv11n-seg network, non-canopy occlusion (such as hanging vine, steel frame, etc.) is efficiently identified and filtered out to obtain the preliminary canopy area; then, within the inscribed circle area with a zenith angle of 0~90°, the contrast limited adaptive histogram equalization (CLAHE) is performed to enhance the image details and suppress uneven illumination; the enhanced image is input into the NJ-Unet network to realize pixel-level leaf semantic segmentation and obtain a refined leaf mask; further, through mask fusion and Otsu adaptive binarization processing, the foreground canopy mask and leaf mask are fused to extract the final effective leaf area; finally, the effective leaf area (binary image) is divided into 45 concentric ring areas, the porosity feature is calculated ring by ring, and a regression model is established based on the constructed multi-scale feature vector to realize accurate inversion of tomato canopy LAI. The application can realize high-precision and high-robustness segmentation of tomato canopy and non-destructive and high-throughput estimation of LAI in complex greenhouse environment, and provides reliable technical support for phenotype analysis in precision agriculture.
[0058] The greenhouse tomato leaf area index detection method based on neural network and porosity analysis of the application can be realized by including the following steps:
[0059] Step S1: image acquisition and data set construction. Before formal detection, use an RGB camera (such as a common digital camera or a smart phone) to collect digital images of the greenhouse tomato canopy. Image acquisition covers different growth stages (such as seedling stage, flowering stage, fruiting stage), and is carried out under different light conditions (morning, noon, evening) and different weather conditions (sunny, cloudy) to construct a time series image data set with strong generalization ability.
[0060] Figure 2 is a step-by-step flowchart of the greenhouse tomato LAI detection of the application.
[0061] Step S2: Non-canopy occlusion segmentation. The digital image of the tomato canopy to be detected is input into the lightweight network YOLOv11n-seg, which is optimized based on the YOLO architecture and has a small number of parameters and a high inference speed, suitable for deployment on edge computing devices. The original image is processed using the YOLOv11n-seg network to identify and remove non-canopy objects (such as hanging vines, steel wires, steel frames, and reflective films), generating a binary mask containing only the tomato canopy region, i.e., the RGB image is processed by the YOLOv11n-seg model and output as a binary "foreground canopy mask", as shown in "Mask-B", where the white area represents the tomato canopy and the black area represents the background and interference. This step significantly reduces background interference in subsequent processing, providing a clean area for subsequent fine segmentation. Figure 1
[0062] Step S3: ROI cropping and image enhancement. In the original RGB image, a circular region inscribed in the range of 0°-90° zenith angle is cropped with the lens principal axis as the center. This operation effectively excludes image edge distortion and far background interference, ensuring that subsequent analysis focuses on the core area of the canopy; and the ROI image is enhanced, i.e., the cropped image is subjected to adaptive histogram equalization (CLAHE).
[0063] Further, the cropped image is converted from the RGB color space to the HSL color space to separate the brightness and color information. The converted HSL color space image is split into three channels H, S, and L, and the L (brightness) channel is extracted. The L channel is most sensitive to changes in illumination, so the CLAHE parameters are dynamically calculated based on the variance of the L channel. The L channel is subjected to contrast-limited adaptive histogram equalization (CLAHE) to enhance local contrast and improve uneven illumination. The histogram-equalized L channel and the S and H channels split from the original image are merged and converted back to the RGB color space to obtain the enhanced canopy image.
[0064] Further, the L channel dynamically calculates the contrast limit threshold (clip-limit) and grid size (grid-size) based on the variance: the parameters of the split L channel are dynamically calculated based on the formula The contrast-limited adaptive histogram equalization is implemented, where Var-L is the variance of the L channel, Var-MAX is the maximum variance controlled by the image size in the range of 0-255, and the grid size tileGridSize is controlled by the natural logarithm of the input image width width.
[0065] Step S4: Leaf semantic segmentation. The RGB image enhanced by CLAHE is input into the customized NJ-Unet segmentation network for pixel-level leaf semantic segmentation. The network outputs a preliminary "leaf mask" (such asFigure 1 The white pixel region represents the identified tomato leaf, and the black region represents the background and other non-leaf parts. This step further filters out the fine background interference remaining in the canopy, providing purer leaf region information for subsequent accurate calculation of leaf area index.
[0066] Further, Figure 3 is the NJ-Unet network structure diagram. The model uses an encoder-decoder framework. The encoder part uses a pre-trained ResNet50 as the backbone network, and gradually extracts multi-scale features through four levels of downsampling. The size of the feature map decreases step by step, and the number of channels increases accordingly. The decoder part is designed as a four-level progressive upsampling path structure framework, with channel numbers of 192, 384, 768, and 1024, respectively. The features of the corresponding levels of the encoder are fused through jump connection to effectively restore spatial details and structural information. The four-level upsampling path of the decoder is implemented by an upsampling module as the core functional carrier at each level, and the module is the "hardware unit" of the path. To further enhance the feature representation capability, an SCSA module is embedded in each upsampling module, as shown in Figure 4 The SCSA module adopts a dual-branch parallel mechanism: the spatial multi-scale attention (SMSA) spatial branch first performs global average pooling in the H / W dimension, and then captures multi-scale spatial context information (such as different scale spatial features of leaf local texture, mesoscopic contour, and global morphology) through multiple groups of one-dimensional convolution; the pseudo-channel spatial attention (PCSA) channel branch relies on the spatial prior provided by SMSA (i.e., feature clues in the spatial dimension) to construct Query, Key, and Value and perform self-attention calculation to enhance feature response in the channel dimension. The outputs of the two branches are added to realize the cooperative enhancement of spatial and channel dimensions, significantly improving the model's ability to distinguish leaf edges and fine structures. In addition, the network uses SMU as the activation function to ensure gradient smoothness while enhancing the model's nonlinear expression capability, effectively alleviating the gradient vanishing problem. Finally, a 1x1 convolution and a Sigmoid activation function are used to output a pixel-level leaf probability map, which is thresholded to generate a binary leaf mask (i.e., Mask-A in Figure 1 ).
[0067] In a preferred embodiment, the total number of network training rounds is set to 100 epochs, and the final model weight is selected according to the principle of minimum validation set loss to ensure optimal generalization performance. As shown in Figure 5As shown, the training process converges rapidly at around 60 epochs, and both the training and validation losses tend to stabilize, with no obvious overfitting, indicating that the model has good convergence and robustness.
[0068] Figure 6 The images show the segmentation results of different models, demonstrating a visual comparison of their performance on leaf segmentation tasks. It is evident that NJ-Unet maintains complete and accurate edge recognition capabilities even when handling complex scenes such as overlapping leaves and intertwined flowers and stems. Its segmentation results significantly outperform the comparison models in terms of structural continuity and detail integrity. In quantitative evaluation, NJ-Unet achieved a 66.46% mIoU (mean Intersection over Union), a 5.3 percentage point improvement over the baseline U-Net model. This performance improvement not only reflects the superiority of the model structure but also demonstrates its ability to effectively suppress missed segmentation and edge drift in practical applications, making it suitable for high-precision agricultural image analysis tasks.
[0069] Step S5: Mask Fusion and Binarization. The "foreground canopy mask" (Mask-B) extracted in step two is fused with the "leaf mask" (Mask-A) generated in step four using a bitwise AND operation to obtain a fused mask. This operation ensures that only pixel regions simultaneously identified as foreground by both types of masks are retained, effectively eliminating mis-segmented non-leaf structures within the canopy (such as stems, flowers, and residual background interference). Based on this, the fused mask is further integrated with the CLAHE-enhanced image. The overall fusion result is binarized using the Otsu adaptive thresholding algorithm to automatically determine the optimal segmentation threshold, generating the final high-precision binary image of the leaf region, i.e., the final effective leaf region (e.g., ...). Figure 2 (As shown in the "Output" section). This fusion and binarization strategy significantly improves the accuracy and robustness of leaf segmentation, providing reliable input for the subsequent accurate calculation of leaf area index.
[0070] Step S6: Concentric Ring Porosity Analysis and LAI Inversion. First, the effective blade region after binarization is restricted to a circular range with a zenith angle of 0°–90°, and then divided into 45 concentric rings based on radial distribution (the number of rings was determined experimentally, e.g., ...). Figure 7The figure showing the influence of the number of rings on the prediction performance shows that when the number of rings is 45, R 2 reaches 0.62 and enters a plateau, and further increasing the number of rings has limited effect on improving accuracy but significantly increases the computational burden, so the optimal number is determined. Then the porosity in each ring is calculated, which is defined as porosity = 1 - (number of leaf pixels / total number of pixels), and the porosity is used to represent the sparsity and light transmission performance of the leaves in the area, and the higher the porosity, the greater the openness of the canopy. Subsequently, the porosity values of the 45 rings are organized in the order of the rings as a multi-scale feature vector, i.e., a porosity feature vector, which effectively captures the structural heterogeneity information of the canopy at different radial distances. On this basis, further combined with the field collected tomato leaf area index data (field data measured by Li-2200C canopy analyzer), a supervised regression model is constructed with the porosity feature vector as the input; through model training, a robust mapping relationship from canopy structure features to LAI is finally established. After the model training is completed, the newly collected images can be automatically inverted for LAI.
[0071] As shown in Figure 8 , the correlation between the NJ-Unet predicted LAI value and the Li-2200C measured value at the flowering stage reaches R 2 =0.90 and RMSE=0.33, indicating that the estimation accuracy meets the requirements of agricultural practical applications. In addition, from Figure 9 the performance comparison of different models, NJ-Unet achieves the optimal comprehensive evaluation index, including mIoU=66.46%, F1=0.802, the model parameter amount is 43.9M, and after INT8 quantization on the Jetson Nano embedded platform, the inference speed reaches 59 fps, with a high-throughput canopy inspection capacity of millions of plants per hour.
[0072] In one class of embodiments, the present application realizes high-precision segmentation of greenhouse tomato leaves and low-cost, non-destructive, real-time estimation of LAI, from single image acquisition to segmentation to LAI output only takes 0.18s, the hardware cost is reduced by more than 90%, has good anti-interference ability, multi-scale structure interpretability and modularization easy migration, and provides strong technical support for intelligent management of facility agriculture.
[0073] The present application solves the three key problems of non-canopy interference rejection, leaf accurate segmentation and canopy multi-scale porosity modeling, realizes low-cost, high-throughput and non-destructive estimation of LAI, and provides core technical support for the landing of intelligent management of facility tomatoes, filling the application gap of existing technologies in complex greenhouse scenarios.
[0074] For a better understanding of the present application, numerous specific details are given in the above description. One skilled in the art will understand that the application can be practiced without the specific details, or with some variations. In some instances, methods, devices, elements and circuits that are well known to those skilled in the art are not described in detail in order to avoid obscuring the present application.
[0075] The above description is only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for detecting leaf area index of greenhouse tomatoes based on neural networks and porosity analysis, characterized in that, Includes the following steps: Step S1: Collect RGB images of the greenhouse tomato canopy and construct a time-series image dataset; Step S2: Use the YOLOv11n-seg network to process the RGB image, identify and remove non-canopy occluders, and obtain the foreground canopy mask; Step S3: Using the principal optical axis of the RGB image as the center, crop the inscribed circle region with a zenith angle of 0°~90°, and perform adaptive histogram equalization enhancement processing on the cropped region; Step S4: Input the enhanced image into the NJ-Unet neural network for pixel-level blade semantic segmentation to obtain the blade mask; Step S5: Perform a bitwise AND operation on the foreground canopy mask and the blade mask, fuse them, and then perform binarization processing using the Otsu method to obtain the effective blade region; Step S6: Divide the effective blade region into multiple concentric ring regions, calculate the porosity ring by ring, construct a multi-scale porosity feature vector, and invert the LAI based on a supervised regression model.
2. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 1, characterized in that, The NJ-Unet network includes: The encoder part uses a pre-trained ResNet50 backbone network; The decoder section is configured with a four-level progressive upsampling path and fuses encoder features through skip connections; Each upsampling path embeds an SCSA module in its upsampling module and uses SMU as the activation function.
3. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 2, characterized in that, The SCSA module includes: The SMSA branch is used to capture multi-scale spatial context information; The PCSA branch performs self-attention computation based on the spatial prior provided by SMSA, enhancing the channel dimension feature response. The outputs of the SMSA branch and the PCSA branch are added together to achieve synergistic enhancement of spatial and channel dimensions.
4. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 1, characterized in that, The adaptive histogram equalization process described in step S3 specifically includes: The cropped inscribed circular region image is converted from the RGB color space to the HSL color space to obtain the H channel, L channel and S channel; Extract the L channel and dynamically calculate the parameters of CLAHE based on its variance; Perform CLAHE processing on channel L; The processed L channel is merged with the H and S channels and converted back to the RGB color space.
5. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 4, characterized in that, The CLAHE parameter is calculated using the following formula: ; ; Where Var-L is the variance of the L channel, Var-MAX is the maximum variance of the image size between 0 and 255, and width is the width of the inscribed circular region of the input image after cropping.
6. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 1, characterized in that: The number of concentric rings mentioned in step S6 is 45.
7. The method for detecting leaf area index of greenhouse tomatoes based on U-Net neural network and porosity analysis according to claim 1, characterized in that: The formula for calculating porosity in step S6 is: Porosity = 1 − (number of blade pixels / total number of pixels).
8. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 1, characterized in that: The supervised regression model mentioned in step S6 is a supervised regression model that obtains a robust mapping relationship from canopy structure features to LAI by training based on ground-value data of LAI measured in the field and multi-scale porosity feature vectors.
9. The method for detecting the leaf area index of greenhouse tomatoes based on neural networks and porosity analysis according to claim 8, characterized in that: The training data for the supervised regression model described in step S6 was obtained through field measurements using a Li-2200C canopy analyzer, and the completed supervised regression model was deployed on an embedded platform, including a Jetson Nano, to achieve real-time calculation of LAI.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of the greenhouse tomato leaf area index detection method based on neural network and porosity analysis as described in any one of claims 1 to 8.