Methods, apparatus, equipment and media for detecting the growth cycle of banana plants
By constructing an enhanced banana leaf recognition model and utilizing multi-scale feature extraction and the Dyhead detection head, the problem of low detection accuracy of banana leaves was solved, enabling accurate growth cycle detection and health management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2026-03-13
AI Technical Summary
The low accuracy of banana leaf detection means that agricultural robots cannot accurately determine the growth cycle of banana plants.
A second banana leaf recognition model was constructed by employing a multi-scale channel attention module, a multi-rate depth separation dilated convolution module, and a SEAM module to enhance feature extraction. Combined with the Dyhead detection head, the model performed mask segmentation and leaf area calculation to determine the growth cycle.
It significantly improves the accuracy of banana leaf detection, provides a basis for leaf quantity and area statistics, helps farmers understand the plant growth cycle and health status in a timely manner, and increases crop yield.
Smart Images

Figure CN119205881B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural production, and in particular to a method for detecting the growth cycle of banana plants, a corresponding device, electronic equipment, and a computer-readable storage medium. Background Technology
[0002] The widespread application of artificial intelligence in agriculture has driven the development of mechanization and intelligent agricultural technologies. Intelligent agricultural robots have automated tedious farm tasks, reducing the labor burden on farmers. Research on these robots focuses on their ability to acquire, analyze, and perceive operational information. Among various data sources, visual information, due to its rich perceptual data and comprehensive information gathering advantages, has become the most important information source for agricultural robots.
[0003] In intelligent management of banana cultivation, the number or area of banana leaves during the growing season directly reflects the growth status and health of the banana plant. Therefore, leaf detection is an important step and can be used for banana leaf counting, leaf area statistics, and banana leaf disease detection. Currently, due to the shading of banana leaves in the growing environment and their susceptibility to interference from leaves of different sizes and plants with similar leaves, the accuracy of banana leaf detection is not high, making it impossible for agricultural robots to accurately determine the growth cycle of banana plants.
[0004] In summary, existing technologies address the problems of banana leaves obstructing the banana plant's growth cycle due to their size and the presence of leaves of different sizes or similar plants, resulting in low detection accuracy. This leads to agricultural robots being unable to accurately determine the growth cycle of banana plants. The applicant has explored solutions to these problems. Summary of the Invention
[0005] The purpose of this application is to solve the above-mentioned problems by providing a method, device, electronic equipment and computer-readable storage medium for detecting the growth cycle of banana plants.
[0006] To achieve the various objectives of this application, the following technical solution is adopted:
[0007] A method for detecting the growth cycle of a banana plant, proposed to meet one of the purposes of this application, includes:
[0008] In response to the banana plant growth cycle detection command, acquire an image of the banana plant to be detected, which includes banana leaves;
[0009] A multi-scale channel attention module is introduced into the C2f module of the backbone feature extraction network of the preset first banana leaf recognition model. A multi-rate depth separation dilated convolution module and a SEAM module are introduced into the C2f module of the feature fusion network. A Dyhead detection head is introduced into the detection head network to construct the second banana leaf recognition model.
[0010] The image of the banana plant to be detected is input into the second banana leaf recognition model that has been trained to convergence, and the image of the banana plant to be detected is masked to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected.
[0011] The number of projected area pixels corresponding to each banana leaf is calculated and determined in the mask image data, and the leaf area corresponding to each banana leaf is calculated and determined based on the number of projected area pixels;
[0012] Determine the leaf area threshold range corresponding to banana leaves in each growth cycle, calculate the average leaf area between the corresponding leaf areas of each banana leaf, and if the average leaf area is detected to be within the leaf area threshold range, then the growth cycle corresponding to the leaf area threshold range is taken as the growth cycle of the banana plant to be tested, so as to complete the detection of the banana plant growth cycle.
[0013] Optionally, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0014] The feature map corresponding to the banana plant image to be detected is input into the multi-scale channel attention module in the C2f module of the backbone feature extraction network of the second banana leaf recognition model. The feature map is divided into two parallel processing paths, which include a local average pooling path and a global average pooling path.
[0015] In the local average pooling path, local average pooling is performed first, followed by feature transformation through Reshape and 1D convolution operations, and then Reshape operation is performed again.
[0016] In the global average pooling path, global average pooling is performed, followed by feature transformation through Reshape and 1D convolution operations, then another Reshape operation, and finally depooling to increase the feature map resolution.
[0017] The feature map processed by the local average pooling path is combined with the feature map processed by the global average pooling path to determine the combined feature map. The combined feature map is then depooled to further increase the spatial resolution of the feature map.
[0018] The feature map after unpooling is combined with the original input feature map.
[0019] Optionally, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0020] In the multi-rate depth separation dilated convolution module of the C2f module of the feature fusion network of the second banana leaf recognition model, the input feature map is subjected to region residualization and semantic residualization.
[0021] The extracted regional feature maps are divided into several groups, each group representing a different region of the image. Depth-separated dilated convolution with different dilation rates is applied to each group of feature maps to perform regional residual processing.
[0022] A single depthwise separable dilated convolution with the desired receptive field is applied to each region feature map, and the features are further optimized by semantic-level morphological filtering to achieve semantic residuals.
[0023] Optionally, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0024] In the SEAM module of the C2f module of the feature fusion network of the second banana leaf recognition model, a depthwise convolution operation is performed on the input feature map. A convolution kernel is applied independently to each input channel to extract features in each channel in order to determine the feature map after depthwise convolution.
[0025] Pointwise convolution is used to mix the feature maps after depthwise convolution, and the features of each channel are linearly combined to fuse the information of different channels, so as to further enhance the expressive power of the features.
[0026] Residual connections are performed to fuse the feature map after depthwise separable convolution with the input feature map through an addition operation, so as to preserve the original information of the input feature map and fuse the new features after convolution.
[0027] Point-to-point convolution is used to effectively fuse features generated by convolutions at different depths, so as to ensure that feature information at different levels can complement and integrate each other;
[0028] A two-layer fully connected network is used to recalibrate the information of each channel. The importance of each channel is learned through the fully connected network, and the channel response is adjusted.
[0029] Optionally, the step of calculating and determining the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculating and determining the leaf area corresponding to each banana leaf based on the number of projected area pixels, includes:
[0030] Determine the actual area corresponding to each projected area pixel, wherein the projected area pixel represents the pixel of the banana leaf in the mask image;
[0031] The actual area corresponding to each projected area pixel is calculated and the number of projected area pixels corresponding to each banana leaf is used to determine the leaf area corresponding to each banana leaf.
[0032] Optionally, the step of determining whether the average leaf area is within the leaf area threshold range, and using the growth cycle corresponding to the leaf area threshold range as the growth cycle of the banana plant to be tested, includes:
[0033] Determine the leaf area corresponding to each banana leaf, and calculate the average leaf area among the banana leaves based on the corresponding leaf areas of each banana leaf.
[0034] The average leaf area is compared with the leaf area threshold range of each growth cycle. If the average leaf area falls within the leaf area threshold range of a certain growth cycle, then that growth cycle is the growth cycle of the banana plant to be tested. The growth cycle includes a first growth cycle, a second growth cycle, and a third growth cycle. The leaf area threshold range of the first growth cycle is between 60 and 80 square centimeters, the leaf area threshold range of the second growth cycle is between 80 and 100 square centimeters, and the leaf area threshold range of the third growth cycle is between 100 and 120 square centimeters.
[0035] Optionally, the basic network architecture of the first banana leaf recognition model is the YOLOv8n model, and the basic network architecture of the second banana leaf recognition model is the improved YOLOv8n model.
[0036] A banana plant growth cycle detection device provided for another purpose of this application includes:
[0037] The image acquisition module is configured to acquire an image of a banana plant containing banana leaves in response to a banana plant growth cycle detection command.
[0038] The model building module is configured to introduce a multi-scale channel attention module into the C2f module of the backbone feature extraction network of the preset first banana leaf recognition model, introduce a multi-rate depth separation dilated convolution module and a SEAM module into the C2f module of the feature fusion network, and introduce a Dyhead detection head into the detection head network to build a second banana leaf recognition model.
[0039] The mask image generation module is configured to input the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and to perform mask segmentation on the image of the banana plant to be detected in order to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected.
[0040] The leaf area determination module is configured to calculate and determine the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculate and determine the leaf area corresponding to each banana leaf based on the number of projected area pixels;
[0041] The growth cycle detection module is configured to determine the leaf area threshold range corresponding to banana leaves in each growth cycle, calculate the average leaf area between the corresponding leaf areas of each banana leaf, and if the average leaf area is detected to be within the leaf area threshold range, then the growth cycle corresponding to the leaf area threshold range is taken as the growth cycle of the banana plant to be detected, so as to complete the detection of the banana plant growth cycle.
[0042] An electronic device provided for another purpose of this application includes a central processing unit and a memory, the central processing unit being configured to invoke and run a computer program stored in the memory to perform the steps of the banana plant growth cycle detection method of this application.
[0043] A computer-readable storage medium is provided for another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the banana plant growth cycle detection method, which, when called by a computer, executes the steps included in the corresponding method.
[0044] Compared to existing technologies, this application addresses the problems in existing technologies where banana leaves are partially obstructed by the environment in which bananas are grown, and are easily interfered with by leaves of different sizes and plants with similar banana leaves, resulting in low detection accuracy of banana leaves and making it impossible for agricultural robots to accurately determine the growth cycle of banana plants. This application includes, but is not limited to, the following beneficial effects:
[0045] Firstly, the second banana leaf recognition model of this application utilizes a multi-scale channel attention mechanism and anti-pooling technology to enhance the expressive power of the feature map. Through split processing and feature combination, the model can better capture the detailed information of banana plant images and improve the accuracy of recognition.
[0046] Secondly, the multi-rate depthwise separating dilated convolution module in the second banana leaf recognition model of this application provides a powerful multi-scale feature extraction capability through the combination of region residualization and semantic residualization. This enables the network to better capture and fuse multi-scale features during the processing of banana plant images, thereby improving the accuracy of leaf recognition and mask segmentation.
[0047] Thirdly, the SEAM module of the C2f module in the feature fusion network of the second banana leaf recognition model in this application, through the comprehensive application of depthwise separable convolution, point-to-point convolution, and fully connected networks, can effectively compensate for the lack of information relationships between channels and enhance the network's ability to handle complex and occluded environments. Depthwise convolution captures detailed features, point-to-point convolution performs feature fusion, residual connections preserve original information and introduce new features, point-to-point convolution integrates features at different levels, and fully connected networks perform channel recalibration. This comprehensive approach ensures the comprehensiveness and accuracy of feature fusion, enabling the network to perform more accurately and robustly in complex scenarios.
[0048] Fourth, the DyHead detection head in the second banana leaf recognition model of this application improves the performance of the target detection model in various scenarios through dynamic adjustment and adaptive mechanisms, especially when dealing with complex features and targets.
[0049] Furthermore, the second banana leaf recognition model in this application not only retains the YOLOv8n network structure but also significantly improves detection accuracy by introducing multi-scale dynamic detection technology. While maintaining high efficiency, the model reduces computational resource consumption, making it more suitable for deployment in resource-constrained environments, such as edge devices in farmland.
[0050] The second banana leaf recognition model of this application can not only significantly improve the detection and recognition accuracy of banana leaves, but also provide a solid technical foundation for subsequent leaf quantity statistics, leaf area statistics and disease classification. This accurate detection capability will greatly improve the efficiency of agricultural management, help farmers understand the growth cycle and health status of banana plants in a timely manner, and thus take more effective management measures to reduce disease losses and increase crop yield. Attached Figure Description
[0051] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0052] Figure 1 This is a flowchart illustrating the banana plant growth cycle detection method in the embodiments of this application;
[0053] Figure 2 This is an exemplary network architecture for the second banana leaf recognition model in the embodiments of this application;
[0054] Figure 3 This application provides an exemplary network architecture for introducing a multi-scale channel attention module into the C2f module of the backbone feature extraction network of the YOLOv8n model in this embodiment.
[0055] Figure 4 This is an exemplary network architecture in which a multi-rate deep separating dilated convolutional module is introduced into the C2f module of the feature fusion network of the YOLOv8n model in the embodiments of this application.
[0056] Figure 5 This is an exemplary network architecture for adding a SEAM module to the C2f module of the feature fusion network of the YOLOv8n model in this embodiment of the application.
[0057] Figure 6 This is a schematic diagram of the banana plant growth cycle detection device in the embodiments of this application;
[0058] Figure 7 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0059] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0060] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0061] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0062] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include radio frequency receivers, pagers, internet / intranet access, web browsers, notepads, calendars, and / or GPS (Global Positioning System) receivers; and conventional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.
[0063] The hardware referred to by the names "server," "client," and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, execute the instructions in the program, and interact with the input and output devices to complete specific functions.
[0064] It should be noted that the concept of "server" used in this application can also be extended to the case of server clusters. Based on the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can be independent of each other but accessible through interfaces, or they can be integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method in this application.
[0065] One or more of the technical features of this application, unless explicitly specified herein, can be deployed on a server and accessed by a client remotely calling the online service interface provided by the server, or can be directly deployed and run on a client for access.
[0066] Unless otherwise specified, the neural network models referenced or potentially referenced in this application may be deployed on a remote server and invoked remotely on the client, or deployed on a client with the capability to invoke directly. In some embodiments, when running on the client, the corresponding intelligence may be acquired through transfer learning in order to reduce the requirements on the client's hardware resources and avoid excessive consumption of the client's hardware resources.
[0067] Unless otherwise specified, all data involved in this application may be stored remotely on a server or on a local terminal device, as long as it is suitable for use by the technical solution of this application.
[0068] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.
[0069] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should be aware of such modifications.
[0070] Please see Figure 1 In one embodiment of the banana plant growth cycle detection method of this application, the method includes:
[0071] Step S10: Respond to the banana plant growth cycle detection command and acquire an image of the banana plant to be detected containing banana leaves;
[0072] The banana plant growth cycle detection system can respond to banana plant growth cycle detection commands and acquire images of the banana plant to be detected, including banana leaves.
[0073] In some embodiments, the banana plant images to be detected can be collected from a banana orchard in a university, using an iPhone 12 and a Sony (α5100) color digital camera, with image resolutions of 4032×3024 pixels and 6024×4000 pixels, respectively. A total of 466 banana plant images were collected, and the images were obtained as JPG files. The images were scaled proportionally to 1080×810 pixels and 1280×720 pixels, respectively, preserving the information of the original images while reducing the computational burden. To improve the generalization performance of the dataset, data augmentation methods were applied to the collected plant images, including rotation, flipping, brightness adjustment, salt-and-pepper noise, and Gaussian noise. One or two data augmentation methods were randomly selected to expand the dataset to 1113 images. The dataset was manually labeled using Label Image in YOLO format. The dataset was divided into training and validation sets in an 8:2 ratio. The training set includes 890 images, and the validation set contains 223 images; original and enhanced images of banana plants are shown below. Figure 1 As shown.
[0074] Step S20: Introduce a multi-scale channel attention module into the C2f module of the backbone feature extraction network of the preset first banana leaf recognition model, introduce a multi-rate depth separation dilated convolution module and a SEAM module into the C2f module of the feature fusion network, and introduce a Dyhead detection head into the detection head network to construct a second banana leaf recognition model.
[0075] After acquiring an image of a banana plant containing banana leaves, a multi-scale channel attention module is introduced into the C2f module of the backbone feature extraction network of the preset first banana leaf recognition model. A multi-rate depthwise segregating dilated convolution module and a SEAM module are introduced into the C2f module of the feature fusion network. A Dyhead detection head is introduced into the detection head network to construct a second banana leaf recognition model. The basic network architecture of the first banana leaf recognition model is the YOLOv8n model, and the basic network architecture of the second banana leaf recognition model is an improved YOLOv8n model.
[0076] Specifically, in the rapidly developing field of computer vision, the YOLO series models have been widely used due to their excellent accuracy and compact model structure. Compared to YOLOv5, it retains the network structure concept and incorporates some innovations. The YOLOv8 model adopts an anchor-free detection mechanism. This innovation allows the model to directly predict the center coordinates of the target instead of relying on predefined anchor boxes to predict the offset of the target position. This method essentially simplifies the detection process and reduces the number of candidate regions that the model needs to evaluate. Considering the need to deploy the model to embedded devices later, the choice was made to improve the YOLOv8n model, which not only maintains high accuracy but also avoids an excessively large number of model parameters.
[0077] The YOLOv8n baseline model network structure mainly consists of three parts: Backbone (feature extraction network): It employs a series of convolutions and deconvolutions to extract features, and also uses residual connections and bottleneck structures to reduce network size and improve performance. This part uses C2f modules as basic building blocks, which have fewer parameters and better feature extraction capabilities compared to the C3 module in YOLOv5; Neck (feature fusion network): It uses multi-scale feature fusion technology to fuse feature maps from different stages of the Backbone to enhance feature representation capabilities. Specifically, the YOLOv8 Neck part includes one SPPF module, one PAA module, and two PAN modules; Head (detection head network): It is responsible for the final object detection and classification tasks, including a detection head and a classification head. The detection head contains a series of convolutional and deconvolutional layers to generate detection results; the classification head uses global average pooling to classify each feature map.
[0078] For further details, please refer to Figure 2The basic network architecture of the second banana leaf recognition model in this application is an improved YOLOv8n model, named YOLOv8n-MDSD model. The improved YOLOv8n model introduces a multi-scale channel attention module into the C2f module of the backbone feature extraction network of the preset YOLOv8n model, introduces a multi-rate depthwise dilated convolution module and a SEAM module into the C2f module of the feature fusion network, and introduces a Dyhead detection head into the detection head network to construct the second banana leaf recognition model. The second banana leaf recognition model of this application not only improves the efficiency of multi-scale information fusion in the model detection task, but also improves the model's performance in occlusion detection in complex scenes. Finally, a novel Dyhead detection head is introduced, which integrates scale awareness, spatial awareness and task awareness into a unified framework, significantly improving the representation capability of the target detection head.
[0079] In some embodiments, please refer to Figure 3 To enhance the ability of the second banana leaf recognition model to capture multi-scale features and contextual information while increasing the number of parameters by only a small amount, thereby improving the detection performance of the network model, a multi-scale channel attention (MLCA) module is introduced into the C2f module of the backbone feature extraction network of the preset YOLOv8n model. The workflow of the multi-scale channel attention (MLCA) module includes: inputting the feature map (C, W, H) corresponding to the banana plant image to be detected into the multi-scale channel attention module in the C2f module of the backbone feature extraction network of the second banana leaf recognition model, which is first divided into two paths for parallel processing, including the local average pooling (LAP) path and the global average pooling (GAP) path.
[0080] For the Local Average Pooling (LAP) path, local average pooling is performed first, followed by feature transformation through Reshape and 1D convolution operations, and then Reshape operation is performed again.
[0081] For the Global Average Pooling (GAP) path, global average pooling is performed, followed by Reshape, 1D convolution and Reshape operations, and finally unpooling (UNAP) operation is performed to increase the feature map resolution.
[0082] The feature map processed by the Local Average Pooling (LAP) path is combined with the feature map processed by the Global Average Pooling (GAP) path, and then an unpooling (UNAP) operation is performed to increase the spatial resolution of the feature map; the feature map obtained by the unpooling (UNAP) operation is then combined with the feature map of the original image.
[0083] In some embodiments, please refer to Figure 4To facilitate the simultaneous capture of multi-scale contextual information from a single input feature map, enabling the network to adapt more flexibly to features at different scales and thus more accurately identify banana leaves in the image of the banana plant to be detected, a multi-rate depthwise dilated convolution (DWR_Conv) module is introduced into the C2f module of the feature fusion network of the preset YOLOv8n model.
[0084] The workflow of the Multi-Rate Deep Separating Dilated Convolution (DWR_Conv) module includes two steps of residual feature extraction: region residualization and semantic residualization. This aims to improve the efficiency of multi-scale information capture in inspection tasks. In region residualization, the region feature maps are first divided into several groups, and then these groups are subjected to deep separating dilated convolutions at different rates. This allows the feature maps to be learned based on the receptive field size in the next step, effectively matching the receptive field. In semantic residualization, only one deep separating dilated convolution with the desired receptive field is used to perform semantic-based morphological filtering on each concise region-form feature map. To fully utilize the different region sizes of feature maps achievable at each network stage, the dilation rate and the capacity of the deep separating convolutions need to be carefully designed to adapt to the different receptive field requirements of each network stage.
[0085] In some embodiments, please refer to Figure 5 A SEAM module was added to the C2f module of the feature fusion network of the pre-defined YOLOv8n model. This module is implemented by combining depthwise separable convolutions and residual connections. While this can learn the importance of different channels and reduce the number of parameters, it ignores the information relationships between channels. To compensate for this loss, the outputs of convolutions at different depths are combined through point-to-point convolutions, and then two fully connected layers are used to fuse the information of each channel to enhance the connections between all channels. The occlusion loss is compensated by enhancing the response of unoccluded regions, thereby enhancing the network's attention to and capture of occluded surface features.
[0086] In some embodiments, in order to improve the accuracy of the second banana leaf recognition model and accurately detect banana leaves in the image of the banana plant to be detected, a Dyhead detection head is introduced into the detection head network of the preset YOLOv8n model to unify scale perception, spatial perception and task perception. Multiple self-attention mechanisms are coherently combined between feature levels of scale perception, spatial perception between spatial locations and output channels of task perception without any computational overhead.
[0087] Specifically, the DyHead (Dynamic Head) detection head is an advanced detection head design for object detection tasks. Its core idea is to dynamically adjust the network's behavior in object detection to improve the model's performance and adaptability. The DyHead detection head is designed to address some challenges that traditional detection heads may face when processing different object features, such as the adaptability of feature representation and the accuracy of prediction.
[0088] Furthermore, the working principle of the DyHead detection head includes:
[0089] The DyHead detection head receives features from the backbone feature extraction network of the second banana leaf recognition model. The feature map is a high-dimensional representation extracted from the input image, containing various semantic information. The core of the DyHead detection head lies in its dynamic adaptive mechanism. Unlike traditional detection heads, it can dynamically adjust its prediction strategy based on the specific characteristics of the feature map (such as its distribution, target size, and shape). Specifically, it dynamically adjusts in the following ways: First, the DyHead detection head uses dynamic convolution operations, adjusting the weights of the convolution kernels based on the contextual information in the feature map. This helps the model better adapt to different target shapes and sizes. Second, the DyHead detection head can dynamically adjust the weights of the network layers based on the input data, enabling the network to better adapt to different target features and complex scenes. Third, DyHead typically employs a multi-branch design, with each branch responsible for different prediction tasks, such as target classification, bounding box regression, and mask prediction. These branches can be dynamically adjusted and optimized based on different regions and contextual information in the feature maps. After processing the feature maps and making dynamic adjustments, DyHead fuses the outputs of different branches. This fused information is used to generate the final object detection results, including object category, bounding box location, etc. Fourth, DyHead uses specific loss functions to guide the model training process. These loss functions may be dynamically adjusted according to the characteristics of the target and the needs of the detection task to improve the accuracy and robustness of the model.
[0090] The DyHead detection head has the following advantages, including:
[0091] First, dynamic adjustment capability: DyHead can dynamically adjust the model's prediction strategy, enabling it to better adapt to different target features and complex scenarios. This capability improves the model's generalization ability and detection accuracy. Second, multi-branch design: Through multi-branch design, DyHead can handle multiple tasks simultaneously (such as classification and regression) and optimize according to different input features. Third, adaptive mechanism: DyHead's adaptive mechanism enables it to exhibit better adaptability when handling targets with different features. Dynamic convolution and adaptive weight adjustment are its main adaptive strategies. Fourth, improved detection accuracy and efficiency: Due to its dynamic adjustment capability, DyHead can provide higher detection performance in various application scenarios while maintaining high inference efficiency.
[0092] In summary, the DyHead detection head improves the performance of object detection models in various scenarios through dynamic adjustment and adaptive mechanisms, especially when dealing with complex features and objects.
[0093] Step S30: Input the image of the banana plant to be detected into the second banana leaf recognition model that has been trained to convergence, and perform mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected.
[0094] After constructing the second banana leaf recognition model, the image of the banana plant to be detected is input into the second banana leaf recognition model that has been trained to convergence. The image of the banana plant to be detected is then segmented by mask to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected.
[0095] Specifically, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0096] Step S301: Input the feature map corresponding to the banana plant image to be detected into the multi-scale channel attention module in the C2f module of the backbone feature extraction network of the second banana leaf recognition model, and divide the feature map into two parallel processing paths, including a local average pooling path and a global average pooling path.
[0097] Step S302: In the local average pooling path, local average pooling is first performed, followed by feature transformation through Reshape operation and 1D convolution operation, and then Reshape operation is performed again.
[0098] Step S303: In the global average pooling path, global average pooling is performed, followed by feature transformation through Reshape operation and 1D convolution operation, then Reshape operation is performed again, and finally unpooling operation is performed to increase the feature map resolution.
[0099] Step S304: Combine the feature map processed by the local average pooling path with the feature map processed by the global average pooling path to determine the combined feature map, and perform depooling operation on the combined feature map to further increase the spatial resolution of the feature map.
[0100] Step S305: Combine the feature map after unpooling with the original input feature map.
[0101] As can be seen from the above steps, the feature map is divided into two parallel processing paths, including a local average pooling path and a global average pooling path. Multi-scale channel attention mechanism and anti-pooling technology are used to enhance the expressive power of the feature map. Through split processing and feature combination, the model can better capture the detailed information of banana plant images and improve the accuracy of recognition.
[0102] Further, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0103] Step S3001: In the multi-rate deep separation dilated convolution module of the C2f module of the feature fusion network of the second banana leaf recognition model, the input feature map is subjected to region residualization and semantic residualization.
[0104] Step S3002: Divide the extracted region feature maps into several groups, each group of feature maps representing different regions of the image. Apply depthwise split dilation convolution with different dilation rates to each group of feature maps to perform region residualization.
[0105] Step S3003: Apply a single depthwise split dilated convolution with the desired receptive field to each region feature map, and further optimize the features through semantic-level morphological filtering to perform semantic residualization.
[0106] As demonstrated by the steps above, the multi-rate deep separable dilated convolution module provides a powerful multi-scale feature extraction capability through the combination of region residualization and semantic residualization. This enables the network to better capture and fuse multi-scale features during the processing of banana plant images, thereby improving the accuracy of leaf recognition and mask segmentation.
[0107] Furthermore, the step of inputting the image of the banana plant to be detected into a second banana leaf recognition model that has been trained to a convergent state, and performing mask segmentation on the image of the banana plant to be detected to determine the mask image data corresponding to each banana leaf in the image of the banana plant to be detected, includes:
[0108] Step S1100: In the SEAM module of the C2f module of the feature fusion network of the second banana leaf recognition model, a deep convolution operation is performed on the input feature map. A convolution kernel is applied independently to each input channel to extract features in each channel and determine the feature map after deep convolution.
[0109] Step S1200: Use pointwise convolution to mix the feature maps after depthwise convolution, and linearly combine the features of each channel to fuse the information of different channels, so as to further enhance the expressive power of the features.
[0110] Step S1300: Perform residual connection, fusing the feature map after depthwise separable convolution with the input feature map through addition operation, so as to maintain the original information of the input feature map and fuse the new features after convolution.
[0111] Step S1400: Use point-to-point convolution to effectively fuse features generated by convolutions at different depths to ensure that feature information at different levels can complement and integrate each other.
[0112] Step S1500: Use a two-layer fully connected network to recalibrate the information of each channel, learn the importance of each channel through the fully connected network, and adjust the channel response.
[0113] As can be seen from the above steps, the SEAM module of the C2f module in the feature fusion network of the second banana leaf recognition model, through the comprehensive application of depthwise separable convolution, point-to-point convolution, and fully connected networks, can effectively compensate for the lack of information relationships between channels and enhance the network's ability to handle complex and occluded environments. Depthwise convolution captures detailed features, point-to-point convolution performs feature fusion, residual connections preserve original information and introduce new features, point-to-point convolution integrates features at different levels, and fully connected networks perform channel recalibration. This comprehensive approach ensures the comprehensiveness and accuracy of feature fusion, enabling the network to perform more accurately and robustly in complex scenarios.
[0114] Step S40: Calculate and determine the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculate and determine the leaf area corresponding to each banana leaf based on the number of projected area pixels;
[0115] After determining the mask image data corresponding to each banana leaf in the banana plant image to be detected, the number of projected area pixels corresponding to each banana leaf is calculated in the mask image data, and the leaf area corresponding to each banana leaf is calculated based on the number of projected area pixels.
[0116] Specifically, the step of calculating and determining the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculating and determining the leaf area corresponding to each banana leaf based on the number of projected area pixels, includes:
[0117] Step S401: Determine the actual area corresponding to each projected area pixel, wherein the projected area pixel represents the pixel of the banana leaf in the mask image;
[0118] Step S402: Calculate the product between the actual area corresponding to each projected area pixel and the number of projected area pixels corresponding to each banana leaf, so as to determine the leaf area corresponding to each banana leaf.
[0119] Step S50: Determine the leaf area threshold range corresponding to the banana leaves in each growth cycle, calculate and determine the average leaf area between the corresponding leaf areas of each banana leaf, and if the average leaf area is detected to be within the leaf area threshold range, then the growth cycle corresponding to the leaf area threshold range is taken as the growth cycle of the banana plant to be tested, so as to complete the detection of the banana plant growth cycle.
[0120] After calculating and determining the leaf area corresponding to each banana leaf based on the number of pixels in the projected area, the threshold range of the leaf area corresponding to each banana leaf in each growth cycle is determined. The average leaf area between the corresponding leaf areas of each banana leaf is calculated and determined. If the average leaf area is detected to be within the threshold range of the leaf area, the growth cycle corresponding to the threshold range of the leaf area is taken as the growth cycle of the banana plant to be detected, so as to complete the detection of the growth cycle of the banana plant.
[0121] Specifically, the step of determining whether the average leaf area is within the leaf area threshold range, and using the growth cycle corresponding to that leaf area threshold range as the growth cycle of the banana plant to be tested, includes:
[0122] Step S501: Determine the leaf area corresponding to each banana leaf, and calculate the average leaf area between each banana leaf based on the leaf area corresponding to each banana leaf.
[0123] Step S502: Compare the average leaf area with the leaf area threshold range of each growth cycle. If the average leaf area falls within the leaf area threshold range of a certain growth cycle, then that growth cycle is the growth cycle of the banana plant to be tested. The growth cycle includes a first growth cycle, a second growth cycle, and a third growth cycle. The leaf area threshold range of the first growth cycle is between 60 and 80 square centimeters, the leaf area threshold range of the second growth cycle is between 80 and 100 square centimeters, and the leaf area threshold range of the third growth cycle is between 100 and 120 square centimeters.
[0124] In some embodiments, the basic network architecture of the second banana leaf recognition model of this application is an improved YOLOv8n model, named the YOLOv8n-MDSD model. To evaluate the performance improvement effect of the YOLOv8n-MDSD model compared with the original YOLOv8n model, the improved modules were gradually added to YOLOv8n for comparison. Ablation experiments were conducted on a self-made dataset, with a total of 11 schemes tested. Each scheme was tested under the same experimental environment and parameters to verify the performance improvement effect of each improved module on the model. The experimental results are shown in Table 1. The data from the first five schemes in the experiment show that using each of the four individual improvement methods improves the model accuracy to some extent. Compared with the original YOLOv8n algorithm, the four improvements—using the C2f_MLCA module, using the C2f_DWR module, adding the SEMA attention mechanism, and introducing a dynamic detector head—improved the AP at 0.5% by 0.34%, 0.32%, 0.56%, and 0.98%, respectively, and improved the AP at 0.5-0.95% by 0.17%, 0.07%, 0.54%, and 0.9%, respectively. The next scheme combines the four methods. The YOLOv8n-MDSD algorithm (which combines the above four methods into the original YOLOv8n algorithm) achieved AP at 0.5% and AP at 0.5-0.95% by 90.84% and 67.52%, respectively, representing improvements of 2.58% and 3.6% in AP compared to the original YOLOv8n algorithm.
[0125] However, the experimental results shown in Table 1 also indicate that, based on the baseline YOLOv8n model, modifying the C2f module in the YOLOv8n backbone network to a C2f_MLCA module results in a YOLOv8n-C2f_MLCA model with essentially the same computational and parameter count as the original YOLOv8n model, but a 0.3% lower recall rate. This is because the C2f_MLCA module adjusts the weights between local and global features. While this adjustment helps the model better focus on important features, it also reduces the model's sensitivity to smaller or harder-to-detect targets, thus lowering the recall rate. Introducing the SEAM attention mechanism into the Neck part, although the SEAM module adaptively enhances multi-scale features... To improve detection accuracy, the model focuses more on key feature regions. However, enhancing the response of unoccluded regions to compensate for occlusion loss tends to suppress secondary or noisy features, causing some edge or inconspicuous targets to be ignored, resulting in a recall rate 0.27% lower than the original YOLOv8n model. Combining the C2f_MLCA and C2f_DWR modules in the original YOLOv8n model allows the model to acquire more multi-scale contextual information and a wider receptive field, enabling it to have stronger detection and recognition capabilities in complex environments and improving detection accuracy. However, because this combination focuses more on key features, the model performs poorly in detecting some edge or complex targets, resulting in a recall rate 0.2% lower than the original YOLOv8n model. The YOLOv8n-MDSD model, which combines four schemes in combination with the original YOLOv8n model, effectively reduces information loss and reduces false positives and missed detections caused by targets in complex environments with mutual occlusion through multi-level, multi-scale feature enhancement and the synergistic effect of multiple modules. The YOLOv8n-MDSD model is an improvement on the baseline YOLOv8n model. The number of parameters in the model has increased, but it has significantly improved the accuracy of banana leaf detection.
[0126] Table 1. Training results of YOLOv8n-MDSD model ablation experiments
[0127]
[0128] To verify the effectiveness and accuracy of the improved method proposed in this study for banana leaf detection, the YOLOv8n-MDSD model was compared with some mainstream first-stage models YOLOv5n, YOLOv6n, YOLOv7-tini, YOLOv8n, and YOLOv8s. All comparison experiments were conducted in the same experimental environment, and the results are shown in Table 2. The comparative experimental results show that the YOLOv8n-MDSD model exhibits performance improvements over the YOLOv5n, YOLOv6n, YOLOv7-tiny, and YOLOv8n models, with improvements of 3.24%, 2.45%, 2.71%, and 2.58% in AP 0.5%, respectively, and improvements of 5.6%, 3.3%, 11.18%, and 3.6% in AP 0.5-0.95%, respectively. Regarding model size, the YOLOv8n-MDSD model is 9.7M, smaller than the 11.7M YOLOv7-tiny model. Although the larger model size sacrifices some detection time compared to YOLOv5n, YOLOv6n, and YOLOv8n, considering the banana leaf detection scenario, the requirement for detection speed is not too high, while improving detection accuracy is more in line with the scenario. In the comparative experiment, the YOLOv8s model was introduced for comparison. Although the AP0.5% and AP0.5-0.95% of the YOLOv8n-MDSD model were lower than those of YOLOv8s (0.84% and 2.44%, respectively), its model size and number of parameters were nearly half that of the YOLOv8s model. Overall, the comparison shows that the YOLOv8n-MDSD model has good detection performance in banana leaf detection.
[0129] Table 2. Experimental training results comparing the performance of different models.
[0130]
[0131] In some embodiments, under different recognition conditions, YOLOv5n, YOLOv6n, YOLOv7-tini, YOLOv8n, and YOLOv8n-MDSD models can all achieve the task of detecting banana leaves. However, due to severe leaf occlusion in the scene, all three models will produce false detections, identifying two leaves as one or detecting the same leaf repeatedly. When small or marginal leaves are present, YOLOv5n, YOLOv7-tini, and YOLOv8n will also produce false detections, detecting grass that looks similar to banana leaves as banana leaves, while YOLOv6n will miss leaves at the edges. Finally, the YOLOv8n-MDSD model's detection is more complete and accurate, and comparisons of the confidence scores in the same region show that the YOLOv8n-MDSD model has improved confidence scores.
[0132] As can be seen from the above embodiments, compared with the prior art, this application addresses the problems in the prior art where banana leaves are partially obstructed by the banana plantation environment and are easily interfered with by leaves of different sizes and plants with similar banana leaves, resulting in low detection accuracy of banana leaves and making it impossible for agricultural robots to accurately determine the growth cycle of banana plants. This application includes, but is not limited to, the following beneficial effects:
[0133] Firstly, the second banana leaf recognition model of this application utilizes a multi-scale channel attention mechanism and anti-pooling technology to enhance the expressive power of the feature map. Through split processing and feature combination, the model can better capture the detailed information of banana plant images and improve the accuracy of recognition.
[0134] Secondly, the multi-rate depthwise separating dilated convolution module in the second banana leaf recognition model of this application provides a powerful multi-scale feature extraction capability through the combination of region residualization and semantic residualization. This enables the network to better capture and fuse multi-scale features during the processing of banana plant images, thereby improving the accuracy of leaf recognition and mask segmentation.
[0135] Thirdly, the SEAM module of the C2f module in the feature fusion network of the second banana leaf recognition model in this application, through the comprehensive application of depthwise separable convolution, point-to-point convolution, and fully connected networks, can effectively compensate for the lack of information relationships between channels and enhance the network's ability to handle complex and occluded environments. Depthwise convolution captures detailed features, point-to-point convolution performs feature fusion, residual connections preserve original information and introduce new features, point-to-point convolution integrates features at different levels, and fully connected networks perform channel recalibration. This comprehensive approach ensures the comprehensiveness and accuracy of feature fusion, enabling the network to perform more accurately and robustly in complex scenarios.
[0136] Fourth, the DyHead detection head in the second banana leaf recognition model of this application improves the performance of the target detection model in various scenarios through dynamic adjustment and adaptive mechanisms, especially when dealing with complex features and targets.
[0137] Furthermore, the second banana leaf recognition model in this application not only retains the YOLOv8n network structure but also significantly improves detection accuracy by introducing multi-scale dynamic detection technology. While maintaining high efficiency, the model reduces computational resource consumption, making it more suitable for deployment in resource-constrained environments, such as edge devices in farmland.
[0138] The second banana leaf recognition model of this application can not only significantly improve the detection and recognition accuracy of banana leaves, but also provide a solid technical foundation for subsequent leaf quantity statistics, leaf area statistics and disease classification. This accurate detection capability will greatly improve the efficiency of agricultural management, help farmers understand the growth cycle and health status of banana plants in a timely manner, and thus take more effective management measures to reduce disease losses and increase crop yield.
[0139] Please see Figure 6This application provides a banana plant growth cycle detection device, comprising an image acquisition module 1100, a model building module 1200, a mask image generation module 1300, a leaf area determination module 1400, and a growth cycle detection module 1500. The image acquisition module 1100 is configured to acquire an image of a banana plant containing banana leaves in response to a banana plant growth cycle detection command. The model building module 1200 is configured to introduce a multi-scale channel attention module into the C2f module of the backbone feature extraction network of a preset first banana leaf recognition model, introduce a multi-rate depthwise dilated convolution module and a SEAM module into the C2f module of the feature fusion network, and introduce a Dyhead detection head into the detection head network to construct a second banana leaf recognition model. The mask image generation module 1300 is configured to input the image of the banana plant to be detected into the second banana leaf recognition model that has been trained to convergence, and perform mask segmentation on the image of the banana plant to be detected to determine the leaf area. The system measures the mask image data corresponding to each banana leaf in the banana plant image; a leaf area determination module 1400 is configured to calculate and determine the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculate and determine the leaf area corresponding to each banana leaf based on the number of projected area pixels; a growth cycle detection module 1500 is configured to determine the leaf area threshold range corresponding to each banana leaf in each growth cycle, calculate and determine the average leaf area between the leaf areas corresponding to each banana leaf, and if the average leaf area is detected to be within the leaf area threshold range, then the growth cycle corresponding to the leaf area threshold range is taken as the growth cycle of the banana plant to be detected, so as to complete the detection of the banana plant growth cycle.
[0140] Based on any embodiment of this application, please refer to Figure 7 Another embodiment of this application also provides an electronic device, which can be implemented by a computer device, such as... Figure 7 The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, the processor can implement a method for detecting the growth cycle of a banana plant. The processor of the computer device provides computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the banana plant growth cycle detection method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0141] In this embodiment, the processor is used to execute... Figure 6 The system contains the specific functions of each module and its sub-modules, and the memory stores the program code and various data required to execute these modules or sub-modules. A network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the banana plant growth cycle detection device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.
[0142] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the banana plant growth cycle detection method described in any embodiment of this application.
[0143] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the banana plant growth cycle detection method described in any embodiment of this application.
[0144] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).
[0145] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
[0146] In summary, the second banana leaf recognition model of this application can not only accurately detect and identify banana leaves, but also provide a solid technical foundation for subsequent leaf quantity statistics, leaf area statistics and disease classification. This accurate detection capability will greatly improve the efficiency of agricultural management, help farmers understand the growth cycle and health status of banana plants in a timely manner, and thus take more effective management measures to reduce disease losses and increase crop yield.
Claims
1. A method for detecting the growth cycle of a banana plant, characterized by, The method comprises the steps of: in response to a banana plant growth cycle detection instruction, acquiring a banana plant image to be detected containing banana leaves; introducing a multi-scale channel attention module into a C2f module in a backbone feature extraction network of a preset first banana leaf recognition model, introducing a multi-rate depth separation dilation convolution module and an SEAM module into a C2f module in a feature fusion network, and introducing a Dyhead detection head into a detection head network to construct a second banana leaf recognition model; inputting the banana plant image to be detected into the second banana leaf recognition model trained to a convergent state, performing mask segmentation on the banana plant image to be detected to determine mask image data corresponding to each banana leaf in the banana plant image to be detected; calculating the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculating the leaf area corresponding to each banana leaf according to the number of projected area pixels; determining a leaf area threshold range corresponding to each growth cycle, calculating the average leaf area between the leaf areas corresponding to each banana leaf, and detecting that the average leaf area is within the leaf area threshold range, so as to determine the growth cycle of the banana plant corresponding to the leaf area threshold range as the growth cycle of the banana plant to be detected, thereby completing the detection of the growth cycle of the banana plant.
2. The banana plant growth cycle detection method according to claim 1, characterized in that, The step of inputting the banana plant image to be detected into the second banana leaf recognition model trained to a convergent state, performing mask segmentation on the banana plant image to be detected to determine mask image data corresponding to each banana leaf in the banana plant image to be detected, comprises: inputting a feature map corresponding to the banana plant image to be detected into a multi-scale channel attention module in a C2f module of a backbone feature extraction network of the second banana leaf recognition model, and dividing the feature map into two parallel processing paths, which include a local average pooling path and a global average pooling path; in the local average pooling path, first perform local average pooling processing, feature conversion through Reshape operation and 1D convolution operation, and Reshape operation again; in the global average pooling path, perform global average pooling processing, feature conversion through Reshape operation and 1D convolution operation, Reshape operation again, and finally perform de-pooling operation to increase the resolution of the feature map; combine the feature map processed by the local average pooling path with the feature map processed by the global average pooling path to determine a combined feature map, and perform de-pooling operation on the combined feature map to further increase the spatial resolution of the feature map; combine the feature map after de-pooling operation with the original input feature map.
3. The banana plant growth cycle detection method according to claim 1, characterized in that, The step of inputting the banana plant image to be detected into the second banana leaf recognition model trained to a convergent state, performing mask segmentation on the banana plant image to be detected to determine mask image data corresponding to each banana leaf in the banana plant image to be detected, comprises: In the multi-rate deep separation dilated convolution module of the C2f module of the feature fusion network of the second banana leaf recognition model, the input feature map is regionally residualized and semantically residualized; The extracted region feature maps are divided into several groups, each group of feature maps representing a different region of the image, and a deep separation dilated convolution with different dilation rates is applied to each group of feature maps for regional residualization; A single deep separation dilated convolution with an expected receptive field is applied to each region feature map to further optimize the features through morphological filtering at the semantic level for semantic residualization.
4. The banana plant growth cycle detection method according to claim 3, characterized in that, The step of inputting the to-be-detected banana plant image into the second banana leaf recognition model trained to a convergent state and performing mask segmentation on the to-be-detected banana plant image to determine the mask image data corresponding to each banana leaf in the to-be-detected banana plant image, comprises: In the SEAM module of the C2f module of the feature fusion network of the second banana leaf recognition model, the input feature map is subjected to deep convolution operation, and a convolution kernel is independently applied to each input channel to extract features within each channel to determine the feature map after deep convolution; Point-by-point convolution is used to mix the feature maps after deep convolution, and the features of each channel are linearly combined to fuse the information of different channels to further enhance the expression ability of the features; Residual connection is performed to fuse the feature map after deep separable convolution processing with the input feature map through additive operation to maintain the original information of the input feature map while fusing the new features after convolution processing; Point-by-point convolution is used to effectively fuse the features generated by different deep convolutions to ensure that the feature information at different levels can complement and integrate with each other; A two-layer fully connected network is used to re-scale the information of each channel, and the importance of each channel is learned through the fully connected network to adjust the response of the channel.
5. The banana plant growth cycle detection method according to claim 1, characterized in that, The step of calculating and determining the number of projected area pixel points corresponding to each banana leaf in the mask image data and calculating and determining the leaf area corresponding to each banana leaf according to the number of projected area pixel points, comprises: determining the actual area corresponding to each projected area pixel point, wherein the projected area pixel point represents a pixel point of a banana leaf in the mask image; calculating and determining the product of the actual area corresponding to each projected area pixel point and the number of projected area pixel points corresponding to each banana leaf to determine the leaf area corresponding to each banana leaf.
6. The banana plant growth cycle detection method according to claim 1, characterized in that, The step of detecting that the leaf area average value is within the leaf area threshold range and taking the growth period corresponding to the leaf area threshold range as the growth period of the to-be-detected banana plant, comprises: determining the leaf area corresponding to each banana leaf, and calculating and determining the leaf area average value between each banana leaf according to the leaf area corresponding to each banana leaf; The leaf area average value is compared with a leaf area threshold range of each growth period, and if the leaf area average value falls within the leaf area threshold range of a certain growth period, the growth period is the growth period of the banana plant to be detected, wherein the growth period includes a first growth period, a second growth period, and a third growth period, the leaf area threshold range of the first growth period is between 60 and 80 square centimeters, the leaf area threshold range of the second growth period is between 80 and 100 square centimeters, and the leaf area threshold range of the third growth period is between 100 and 120 square centimeters.
7. The banana plant growth cycle detection method according to any one of claims 1 to 6, characterized in that, The basic network architecture of the first banana leaf identification model is a YOLOv8n model, and the basic network architecture of the second banana leaf identification model is an improved YOLOv8n model.
8. A banana plant growth cycle detection device, characterized by, It comprises: An image acquisition module is configured to acquire an image of a banana plant to be detected containing banana leaves in response to a banana plant growth period detection instruction; A model construction module is configured to introduce a multi-scale channel attention module into a C2f module in a backbone feature extraction network of a preset first banana leaf identification model, introduce a multi-rate depth separation dilation convolution module and an SEAM module into a C2f module of a feature fusion network, and introduce a Dyhead detection head into a detection head network to construct a second banana leaf identification model; A mask image generation module is configured to input the image of the banana plant to be detected into the second banana leaf identification model trained to a convergent state, perform mask segmentation on the image of the banana plant to be detected, and determine mask image data corresponding to each banana leaf in the image of the banana plant to be detected; A leaf area determination module is configured to calculate and determine the number of projected area pixels corresponding to each banana leaf in the mask image data, and calculate and determine the leaf area corresponding to each banana leaf according to the number of projected area pixels; A growth period detection module is configured to determine the leaf area threshold range of each growth period of banana leaves, calculate the leaf area average value between the leaf areas corresponding to each banana leaf, and detect that the leaf area average value is within the leaf area threshold range, so as to determine the growth period of the banana plant to be detected as the growth period corresponding to the leaf area threshold range, thereby completing the detection of the growth period of the banana plant.
9. An electronic device comprising a central processing unit and a memory, characterized in that The central processing unit is configured to call and run a computer program stored in the memory to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program implemented according to the method of any one of claims 1 to 7 in the form of computer readable instructions, and when the computer program is called and run by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Banana growth period identification method and system based on deep learning
CN114972292A
Banana leaf growth parameter extraction method, device, equipment and medium
CN117853562A