Banana plant growth cycle detection method, device, equipment and medium
The second banana leaf recognition model with enhanced features and adaptive mechanisms improves detection accuracy for banana plant growth cycles, addressing environmental obstructions and interference, facilitating effective agricultural management.
Patent Information
- Application Number
- CN202411253867.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-09
AI Technical Summary
Banana leaves in the planting environment are obstructed and easily interfered by leaves of different sizes and similar plants, leading to low detection accuracy for agricultural robots, which hinders accurate judgment of banana plant growth cycles.
A method involving a second banana leaf recognition model with a multi-scale channel attention module, multi-rate deep separation dilated convolution, and SEAM module, combined with a DyHead detection head, for precise mask segmentation and leaf area calculation to determine the growth cycle.
Enhances detection accuracy by capturing detailed features and adapting to complex environments, enabling precise leaf recognition and growth cycle determination, supporting efficient agricultural management and increased crop yields.
Smart Images

Figure CN119205881A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of agricultural production, and in particular to a method for detecting the growth cycle of a banana plant, a corresponding device, an electronic device, and a computer-readable storage medium. Background Art
[0002] Artificial intelligence is widely used in agriculture, promoting the development of mechanization and smart agricultural technology. Smart agricultural robots automate tedious farm tasks and reduce the labor burden of farmers. The focus of research on these robots is on their ability to obtain, analyze and perceive operational information. Among various data sources, visual information has become the most important information source for agricultural robots due to its rich perception data and comprehensive information collection advantages.
[0003] In the intelligent management of banana planting, the number or area of banana leaves during the growth period directly reflects the growth status and health of the banana plants. Therefore, leaf detection is an important link and can be used for banana leaf counting, leaf area statistics, banana leaf disease detection, etc. At present, due to the certain obstruction of banana leaves in the banana planting environment and the easy interference by leaves of different sizes and plants similar to banana leaves, the detection accuracy of banana leaves is not high, resulting in the inability of agricultural robots to accurately judge the growth cycle of banana plants.
[0004] To sum up, in the prior art, due to the fact that banana leaves are obstructed to a certain extent in the banana planting environment and are easily interfered by leaves of different sizes and plants similar to banana leaves, the detection accuracy of banana leaves is not high, resulting in the agricultural robot being unable to accurately judge the growth cycle of banana plants. The applicant has made corresponding explorations to solve this problem. Summary of the invention
[0005] The purpose of the present application is to solve the above-mentioned problems and to provide a banana plant growth cycle detection method, a corresponding device, an electronic device and a computer-readable storage medium.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] A method for detecting the growth cycle of a banana plant proposed to meet one of the purposes of the present application comprises:
[0008] In response to a banana plant growth cycle detection instruction, an image of a banana plant to be detected including banana leaves is obtained;
[0009] A multi-scale channel attention module is introduced into the C2f module in the backbone feature extraction network of the preset first banana leaf recognition model, a multi-rate deep separation dilated convolution module and a SEAM module are introduced into the C2f module of the feature fusion network, and a Dyhead detection head is introduced into the detection head network to construct a second banana leaf recognition model;
[0010] Inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergence state, performing mask segmentation on the banana plant image to be detected, so as to determine mask image data corresponding to each banana leaf in the banana plant image to be detected;
[0011] Calculate and determine the number of pixel points of the projection area 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 pixel points of the projection area;
[0012] The leaf area threshold range corresponding to the banana leaves in each growth cycle is determined, and the leaf area average value between the leaf areas corresponding to the respective banana leaves is calculated and determined. If it is detected that the leaf area average value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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.
[0013] Optionally, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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:
[0014] Inputting 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, dividing the feature map 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 first performed, feature conversion is performed through Reshape operation and 1D convolution operation, and Reshape operation is performed again;
[0016] In the global average pooling path, a global average pooling process is performed, a feature conversion is performed through a Reshape operation and a 1D convolution operation, a Reshape operation is performed again, and finally an unpooling operation is performed to increase the feature map resolution;
[0017] Combining 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 performing a de-pooling operation on the combined feature map to further increase the spatial resolution of the feature map;
[0018] Combine the feature map after the unpooling operation with the original input feature map.
[0019] Optionally, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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:
[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 regional residualization and semantic residualization;
[0021] The extracted regional feature maps are divided into several groups, each group of feature maps represents a different area of the image, and depth-separated dilated convolution with different dilation rates is applied to each group of feature maps to perform regional residualization;
[0022] A single depthwise separable dilated convolution with desired receptive field is applied to each region feature map, and the features are further refined by morphological filtering at the semantic level for semantic residualization.
[0023] Optionally, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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:
[0024] 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, and a convolution kernel is independently applied to each input channel to extract features in each channel to determine a feature map after the deep convolution;
[0025] Point-by-point convolution is used to mix the feature maps after depth convolution, and the features of each channel are linearly combined to fuse the information of different channels to further enhance the expressiveness of the features;
[0026] Perform residual connection to fuse the feature map processed by depthwise separable convolution with the input feature map through addition operation to keep the original information of the input feature map and fuse the new features after convolution processing;
[0027] Point-to-point convolution is used to effectively fuse the features generated by convolutions of different depths 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, learn the importance of each channel through the fully connected network, and adjust the response of the channel.
[0029] Optionally, the step of calculating and determining the number of pixel points of the projection area 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 pixel points of the projection area comprises:
[0030] Determine the actual area corresponding to each projection area pixel point, wherein the projection area pixel point represents the pixel point of the banana leaf in the mask image;
[0031] The product between the actual area corresponding to each projection area pixel point and the number of projection area pixel points corresponding to each banana leaf is calculated to determine the leaf area corresponding to each banana leaf.
[0032] Optionally, if it is detected that the leaf area average value is within the leaf area threshold range, the step of taking the growth cycle corresponding to the leaf area threshold range as the growth cycle of the banana plant to be detected includes:
[0033] Determine the leaf area corresponding to each banana leaf, and calculate and determine the average leaf area between each banana leaf according to the leaf area corresponding to each banana leaf;
[0034] The leaf area average value is compared with the leaf area threshold range of each growth cycle. If the leaf area average value falls within the leaf area threshold range of a certain growth cycle, the growth cycle is the growth cycle of the banana plant to be detected, wherein 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 a YOLOv8n model, and the basic network architecture of the second banana leaf recognition model is an improved YOLOv8n model.
[0036] A banana plant growth cycle detection device provided for another purpose of the present application includes:
[0037] An image acquisition module is configured to respond to a banana plant growth cycle detection instruction and acquire an image of a banana plant to be detected including banana leaves;
[0038] A model building 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 recognition model, introduce a multi-rate deep separation dilated convolution module and a SEAM module into the C2f module of a feature fusion network, and introduce a Dyhead detection head into a detection head network, so as to build a second banana leaf recognition model;
[0039] a mask image generating module, configured to input the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergence state, and perform 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;
[0040] a leaf area determination module, configured to calculate and determine the number of projection 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 projection area pixels;
[0041] The growth cycle detection module is configured to determine a leaf area threshold range corresponding to banana leaves of each growth cycle, calculate and determine an average leaf area value between leaf areas corresponding to the respective banana leaves, and if it is detected that the leaf area average value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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.
[0042] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the banana plant growth cycle detection method described in the present application.
[0043] A computer-readable storage medium is provided for another purpose of the present application, which stores a computer program implemented according to the banana plant growth cycle detection method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0044] Compared with the prior art, the present application aims at the problems that the banana leaves in the prior art are blocked to a certain extent in the banana planting environment and are easily interfered by leaves of different sizes and plants similar to banana leaves, and the detection accuracy of the banana leaves is not high, resulting in the agricultural robot being unable to accurately judge the growth cycle of the banana plants. The present application includes but is not limited to the following beneficial effects:
[0045] First, the second banana leaf recognition model of the present application uses a multi-scale channel attention mechanism and an anti-pooling technique to enhance the expressiveness of feature maps. Through shunting processing and feature combination, the model can better capture the detailed information of banana plant images and improve recognition accuracy.
[0046] Secondly, the multi-rate deep separation dilated convolution module in the second banana leaf recognition model of the present application provides a powerful multi-scale feature extraction capability through the combination of regional 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] Third, the SEAM module of the C2f module of the feature fusion network in the second banana leaf recognition model of the present application can effectively make up for the lack of information relationship between channels through the comprehensive application of deep separable convolution, point-to-point convolution and fully connected network, and enhance the ability of the network to handle complex and occluded environments. Deep convolution captures detailed features, point-by-point convolution performs feature fusion, residual connection retains original information and introduces new features, point-to-point convolution integrates features at different levels, and fully connected network performs channel recalibration. This comprehensive method ensures the comprehensiveness and accuracy of feature fusion, allowing the network to perform more accurately and robustly in complex scenarios.
[0048] Fourthly, the DyHead detection head in the second banana leaf recognition model of the present application improves the performance of the target detection model in various scenarios through dynamic adjustment and adaptive mechanism, especially when processing complex features and targets;
[0049] Furthermore, the second banana leaf recognition model of the present application not only retains the network structure of YOLOv8n, but also significantly improves the detection accuracy by introducing multi-scale dynamic detection technology. While maintaining efficient operation, the model reduces the consumption of computing resources, making it more suitable for deployment in resource-limited environments, such as farmland edge devices;
[0050] The second banana leaf recognition model of the present 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 precise detection capability will greatly improve the efficiency of agricultural management and help farmers understand the growth cycle and health status of banana plants in a timely manner, so as to take more effective management measures, reduce disease losses and increase crop yields. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0052] Figure 1 This is a schematic diagram of the process of the banana plant growth cycle detection method in the embodiment of the present application;
[0053] Figure 2 This is an exemplary network architecture of the second banana leaf recognition model in the embodiment of the present application;
[0054] Figure 3 An exemplary network architecture for introducing a multi-scale channel attention module into the C2f module in the backbone feature extraction network of the YOLOv8n model in an embodiment of the present application;
[0055] Figure 4 An exemplary network architecture for introducing a multi-rate deep separation dilated convolution module into the C2f module of the feature fusion network of the YOLOv8n model in an embodiment of the present application;
[0056] Figure 5 An exemplary network architecture for adding a SEAM module to the C2f module of the feature fusion network of the YOLOv8n model in an embodiment of the present application;
[0057] Figure 6 This is a principle block diagram of a banana plant growth cycle detection device in an embodiment of the present application;
[0058] Figure 7 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION
[0059] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0060] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the 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 refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit 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 (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0062] It will be understood by those skilled in the art that the terms "client", "terminal" and "terminal device" as used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capability, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Services) which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant) which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices which have and / or include a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or may be a smart TV, a set-top box and other devices.
[0063] The hardware referred to by the names such as "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 principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0064] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.
[0065] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for access.
[0066] The neural network models referenced or may be referenced in this application, unless expressly specified, can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0067] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as it is suitable for being called by the technical solution of this application.
[0068] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.
[0069] Unless the mutually exclusive relationship between the embodiments to be disclosed in this application is explicitly stated, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct a new embodiment, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.
[0070] See also Figure 1 In one embodiment, the banana plant growth cycle detection method of the present application comprises:
[0071] Step S10, responding to the banana plant growth cycle detection instruction, obtaining an image of a banana plant to be detected including banana leaves;
[0072] The banana plant growth cycle detection system can respond to the banana plant growth cycle detection instruction and obtain the image of the banana plant to be detected including the banana leaves;
[0073] In some embodiments, the banana plant image to be detected can be collected in a banana garden in a university, and collected using iPhone 12 and a color digital camera SONY (α5100), respectively, 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 in JPG format, and the images were scaled to 1080×810 pixels and 1280×720 pixels in proportion to the original image resolution, respectively, which not only retained the information of the original image, but also reduced the computational burden. In order to make the data set more generalized, the collected plant images were enhanced using data enhancement methods, including rotation, flipping, brightness change, salt and pepper noise, and Gaussian noise. One to two data enhancement methods were randomly selected to expand the data set to 1113 images. The Label Imag annotation tool was used to manually annotate the data set, and the annotation format was YOLO format. The data set was divided into a training set and a validation set in a ratio of 8:2. The training set includes 890 images and the validation set contains 223 images; the original and enhanced images of banana plants are as follows Figure 1 shown.
[0074] Step S20, introducing a multi-scale channel attention module into the C2f module in the backbone feature extraction network of the preset first banana leaf recognition model, introducing a multi-rate deep separation dilated convolution module and a SEAM module into the C2f module of the feature fusion network, and introducing a Dyhead detection head into the detection head network, so as to construct a second banana leaf recognition model;
[0075] After obtaining a banana plant image to be detected containing banana leaves, a multi-scale channel attention module is introduced into the C2f module in the backbone feature extraction network of the preset first banana leaf recognition model, a multi-rate deep separation dilated convolution module and a SEAM module are introduced into the C2f module of the feature fusion network, and a Dyhead detection head is introduced into the detection head network to construct a second banana leaf recognition model; wherein the basic network architecture of the first banana leaf recognition model is a 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 of models have been widely used due to their excellent accuracy and compact model structure. Compared with YOLOv5, the network structure idea is retained and some innovations are added. The YOLOv8 model adopts an anchor-free detection mechanism. This innovation makes the model no longer rely on predefined anchor boxes to predict the offset of the target position, but directly predicts the center coordinates of the target. This method essentially simplifies the detection process and reduces the number of candidate areas that the model needs to evaluate. Considering the need to deploy the model to embedded devices in the later stage, it is chosen to improve the YOLOv8n model, which can not only maintain high accuracy, but also the number of model parameters will not be too large.
[0077] The network structure of the YOLOv8n benchmark model is mainly composed of the following three parts, including: Backbone (backbone feature extraction network): It uses a series of convolutions and deconvolutions to extract features, and also uses residual connections and bottleneck structures to reduce the size of the network and improve performance. This part uses the C2f module as the basic building block. Compared with the C3 module of YOLOv5, the C2f module has fewer parameters and better feature extraction capabilities; Neck (feature fusion network): It uses multi-scale feature fusion technology to fuse feature maps from different stages of Backbone to enhance feature representation capabilities. Specifically, the Neck part of YOLOv8 includes an SPPF module, a PAA module, and two PAN modules; Head (detection head network): It is responsible for the final target detection and classification tasks, including a detection head and a classification head. The detection head contains a series of convolutional layers and deconvolution layers to generate detection results; the classification head uses global average pooling to classify each feature map.
[0078] For further information, see Figure 2The basic network architecture of the second banana leaf recognition model of the present application is an improved YOLOv8n model, named as the YOLOv8n-MDSD model. The improved YOLOv8n model introduces a multi-scale channel attention module in the C2f module in the backbone feature extraction network of the preset YOLOv8n model, introduces a multi-rate deep separation dilated convolution module and a SEAM module in the C2f module of the feature fusion network, and introduces a Dyhead detection head in the detection head network to construct a second banana leaf recognition model; the second banana leaf recognition model of the present application not only provides the efficiency of multi-scale information fusion in the model detection task, but also improves the effect of the model on occlusion detection in complex scenes; finally, a new type of Dyhead detection head is introduced to integrate scale perception, space perception and task perception into a unified framework, which significantly improves the representation ability of the target detection head.
[0079] In some embodiments, see Figure 3 , in order to enhance the ability of the second banana leaf recognition model to capture multi-scale features and contextual information, while only increasing a small amount of parameters, thereby improving the detection performance of the network model, a multi-scale channel attention (MLCA) module is introduced into the C2f module in 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, firstly dividing it into two paths, and performing two-path parallel processing, which includes a local average pooling (LAP) path and a global average pooling (GAP) path;
[0080] For the local average pooling (LAP) path, local average pooling is first performed, and then feature transformation is performed through Reshape operation and 1D convolution operation, and then Reshape operation is performed again;
[0081] For the global average pooling (GAP) path, global average pooling is performed, and then Reshape, 1D convolution and Reshape operations are performed, and finally an unpooling operation (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 the unpooling operation (UNAP) operation is performed again to increase the spatial resolution of the feature map; the feature map obtained by the unpooling (UNAP) operation is combined with the feature map of the original image.
[0083] In some embodiments, see Figure 4,In order to capture multi-scale context information simultaneously from a single input feature map, the network can more flexibly adapt to features of different scales, and more accurately identify the banana leaves in the image of the banana plant to be detected, a multi-rate deep ,separated dilated convolution (DWR_Conv) module is introduced in the C2f module of the feature fusion network of the preset YOLOv8n model.
[0084] The workflow of the multi-rate deep separable dilated convolution (DWR_Conv) module includes a two-step residual feature extraction, which includes regional residualization and semantic residualization, aiming to improve the efficiency of multi-scale information capture in inspection tasks; in regional residualization, the regional feature maps are first divided into several groups, and then these groups are subjected to deep separable dilated convolutions at different rates, so that the feature maps can be learned according to the receptive field size in the next step to reversely match the receptive field; in semantic residualization, only one deep separable dilated convolution with the desired receptive field is used to perform semantic-based morphological filtering on each concise regional form feature map; in order to make full use of the feature maps of different regional sizes that can be achieved in each network stage, the dilation rate and the capacity of the deep separable convolution need to be carefully designed to adapt to the different receptive field requirements of each network stage.
[0085] In some embodiments, see Figure 5 , a SEAM module is added to the C2f module of the feature fusion network of the preset YOLOv8n model, which is implemented by combining deep separable convolution and residual connection. Although it can learn the importance of different channels and reduce the amount of parameters, it ignores the information relationship between channels; to make up for this loss, the outputs of convolutions of different depths are combined through point-to-point convolution, and then a two-layer fully connected network is used to fuse the information of each channel to enhance the connection between all channels; the occlusion loss is compensated by enhancing the response of the unoccluded area, thereby enhancing the network's attention and capture ability of the occluded surface features.
[0086] In some embodiments, in order to improve the accuracy of the second banana leaf recognition model and accurately detect the banana leaves in the picture 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, by coherently combining multiple self-attention mechanisms between feature levels of scale perception, spatial perception between spatial positions, 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 behavior of the network in object detection to improve the performance and adaptability of the model. The DyHead detection head is designed to solve some challenges that traditional detection heads may face when processing different target features, such as the adaptability of feature expression 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 in the second banana leaf recognition model. The feature map is a high-dimensional representation extracted from the input image, which contains various semantic information in the image. The core of the DyHead detection head lies in its dynamic adaptive mechanism. Unlike traditional detection heads, it can dynamically adjust its prediction strategy according to the specific characteristics of the feature map (such as the distribution of the feature map, the size and shape of the target). Specifically, it dynamically adjusts in the following ways: First, the DyHead detection head uses dynamic convolution operations to adjust the weights of the convolution kernel according to the contextual information in the feature map. This can help the model better adapt to the shapes and sizes of different targets; second, the DyHead detection head can dynamically adjust the weights of the network layer according to the input data, so that the network can better adapt to different target features and complex scenes; third, DyHead usually adopts a multi-branch design, and each branch is responsible for different prediction tasks, such as target classification, bounding box regression, mask prediction, etc. These branches can be dynamically adjusted and optimized according to different regions and contextual information of the feature map. After processing the feature map and making dynamic adjustments, DyHead fuses the outputs of different branches. The fused information is used to generate the final target detection results, including target category, bounding box position, 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 requirements 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 prediction strategy of the model so that it can better adapt to different target features and complex scenarios. This capability improves the generalization ability and detection accuracy of the model. Second, multi-branch design: Through multi-branch design, DyHead can handle multiple tasks (such as classification, regression) at the same time and optimize according to different input features. Third, adaptive mechanism: DyHead's adaptive mechanism enables it to show better adaptability when dealing with targets with different characteristics. Dynamic convolution and adaptive weight adjustment are its main adaptive strategies. Fourth, improve detection accuracy and efficiency: Due to its dynamic adjustment capability, DyHead can provide higher detection performance in various application scenarios while maintaining high reasoning efficiency.
[0092] In summary, the DyHead detection head improves the performance of the object detection model in various scenarios through dynamic adjustment and adaptive mechanisms, especially when dealing with complex features and targets.
[0093] Step S30, inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergence state, performing mask segmentation on the banana plant image to be detected, so as to determine mask image data corresponding to each banana leaf in the banana plant image to be detected;
[0094] After the second banana leaf recognition model is constructed, the banana plant image to be detected is input into the second banana leaf recognition model that has been trained to a convergence state, and mask segmentation is performed 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;
[0095] Specifically, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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:
[0096] Step S301, inputting 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, dividing the feature map into two parallel processing paths, which include a local average pooling path and a global average pooling path;
[0097] Step S302: In the local average pooling path, firstly perform local average pooling, perform feature conversion through Reshape operation and 1D convolution operation, and then perform Reshape operation again;
[0098] Step S303: In the global average pooling path, perform global average pooling, perform feature conversion through Reshape operation and 1D convolution operation, perform Reshape operation again, and finally perform depooling operation to increase feature map resolution;
[0099] Step S304: combining 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 performing a de-pooling operation on the combined feature map to further increase the spatial resolution of the feature map;
[0100] Step S305: Combine the feature map after the depooling operation with the original input feature map.
[0101] It can be seen from the above steps that the feature map is divided into two parallel processing paths, including a local average pooling path and a global average pooling path. The multi-scale channel attention mechanism and the anti-pooling technology are used to enhance the expression ability of the feature map. Through the diversion processing and feature combination, the model can better capture the detailed information of the banana plant image and improve the recognition accuracy.
[0102] Furthermore, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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:
[0103] Step S3001, 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, performing regional residualization and semantic residualization on the input feature map;
[0104] Step S3002, dividing the extracted regional feature maps into several groups, each group of feature maps represents a different region of the image, and applying a depth separation dilated convolution with different dilation rates to each group of feature maps to perform regional residualization;
[0105] Step S3003: Apply a single depth-separated dilated convolution with a desired receptive field to each regional feature map, and further optimize the features through morphological filtering at the semantic level to perform semantic residualization.
[0106] From the above steps, we can see that the multi-rate deep separation dilated convolution module provides a powerful multi-scale feature extraction capability through the combination of regional residualization and semantic residualization. This enables the network to better capture and fuse multi-scale features in the processing of banana plant images, thereby improving the accuracy of leaf recognition and mask segmentation.
[0107] Furthermore, the step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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 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, and a convolution kernel is independently applied to each input channel to extract features in each channel to determine a feature map after deep convolution;
[0109] Step S1200: using point-by-point convolution to mix the feature maps after the depth convolution, linearly combining the features of each channel to fuse the information of different channels, so as to further enhance the expressiveness of the features;
[0110] Step S1300: Perform residual connection to fuse the feature map processed by depthwise separable convolution with the input feature map through addition operation to maintain the original information of the input feature map and fuse the new features processed by convolution;
[0111] Step S1400: effectively fuse the features generated by convolutions at different depths using point-to-point convolution to ensure that feature information at different levels can complement and integrate each other;
[0112] Step S1500: recalibrate the information of each channel using a two-layer fully connected network, learn the importance of each channel through the fully connected network, and adjust the response of the channel.
[0113] From the above steps, it can be seen that the SEAM module of the C2f module of the feature fusion network of the second banana leaf recognition model can effectively make up for the lack of information relationship between channels through the comprehensive application of deep separable convolution, point-to-point convolution and fully connected network, and enhance the network's ability to handle complex and occluded environments. Deep convolution captures detailed features, point-by-point convolution performs feature fusion, residual connection retains original information and introduces new features, point-to-point convolution integrates features at different levels, and fully connected network performs channel recalibration. This comprehensive method ensures the comprehensiveness and accuracy of feature fusion, allowing the network to perform more accurately and robustly in complex scenarios.
[0114] Step S40, calculating and determining the number of pixel points of the projection area 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 pixel points of the projection area;
[0115] After determining the mask image data corresponding to each banana leaf in the banana plant image to be detected, calculating and determining the number of projection 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 projection area pixel points;
[0116] Specifically, the steps of calculating and determining the number of pixel points of the projection area 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 pixel points of the projection area include:
[0117] Step S401, determining the actual area corresponding to each projection area pixel point, wherein the projection area pixel point represents the pixel point of the banana leaf in the mask image;
[0118] Step S402: Calculate and determine the product of the actual area corresponding to each projection area pixel point and the number of projection area pixel points corresponding to each banana leaf, so as to determine the leaf area corresponding to each banana leaf.
[0119] Step S50, determining a leaf area threshold range corresponding to banana leaves in each growth cycle, calculating and determining an average leaf area value between the leaf areas corresponding to the respective banana leaves, and if it is detected that the average leaf area value is within the leaf area threshold range, then the growth cycle corresponding to the leaf area threshold range is used 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.
[0120] After the leaf areas corresponding to the respective banana leaves are determined by calculation according to the number of pixel points of the projection area, a threshold range of leaf areas corresponding to the banana leaves in each growth cycle is determined, and an average leaf area value between the leaf areas corresponding to the respective banana leaves is determined by calculation. When it is detected that the average leaf area value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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, if it is detected that the leaf area average value is within the leaf area threshold range, the step of taking the growth cycle corresponding to the leaf area threshold range as the growth cycle of the banana plant to be detected includes:
[0122] Step S501, determining the leaf area corresponding to each banana leaf, and calculating and determining the average leaf area between each banana leaf according to the leaf area corresponding to each banana leaf;
[0123] Step S502: compare the leaf area average value with the leaf area threshold range of each growth cycle. If the leaf area average value falls within the leaf area threshold range of a certain growth cycle, the growth cycle is the growth cycle of the banana plant to be detected, wherein 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 the present application is an improved YOLOv8n model, named as the YOLOv8n-MDSD model. In order to evaluate the performance improvement effect of the YOLOv8n-MDSD model relative to the original YOLOv8n model, the improved modules are gradually added to the YOLOv8n for comparison, and ablation experiments are performed on a self-made data set. A total of 11 schemes are tested, and each scheme is in the same test environment and test parameters to verify the improvement effect of each improved module on the model performance. The test results are shown in Table 1. From the data of the first five schemes of the test results, it can be concluded that the use of four single improvement methods has a certain improvement in model accuracy. Compared with the original YOLOv8n algorithm, the four improvements of using C2f_MLCA module, using C2f_DWR module, adding SEMA attention mechanism, and introducing dynamic detection head have increased AP0.5% by 0.34%, 0.32%, 0.56% and 0.98%, and AP0.5-0.95% by 0.17%, 0.07%, 0.54% and 0.9%. The subsequent scheme is to combine the four schemes. The YOLOv8n-MDSD algorithm (the algorithm combines the above four schemes together in the original YOLOv8n algorithm) has reached 90.84% and 67.52% on AP0.5% and AP0.5-0.95, respectively, which is 2.58% and 3.6% higher than the AP of the original YOLOv8n algorithm.
[0125] However, from the experimental results shown in Table 1, it can be seen that on the baseline YOLOv8n model, the C2f module in the backbone network of YOLOv8n is improved to the C2f_MLCA module. The computational complexity and parameter amount of the obtained YOLOv8n-C2f_MLCA model are basically the same as those of the YOLOv8n model, while the recall rate is 0.3% lower than that of the original YOLOv8n model. This is because the C2f_MLCA module adjusts the weights between local and global features. Although this adjustment can help the model better focus on important features, it also causes the model to be less sensitive to some smaller targets or targets that are difficult to detect, thereby reducing the recall rate. The SEAM attention mechanism is introduced in the Neck part. Although the SEAM module adaptively enhances multi-scale features To improve the detection accuracy, the model is more focused on the key feature area, but enhancing the response of the unoccluded area to compensate for the occlusion loss will tend to suppress minor or noise features, resulting in some edge or inconspicuous targets being ignored, resulting in a recall rate lower than the original YOLOv8n model by 0.27%; when the C2f_MLCA module and the C2f_DWR module are combined and used in the original YOLOv8n model, the model obtains more multi-scale context information and a wider receptive field, enabling the model to have stronger detection and recognition capabilities in complex environments and improve detection accuracy. However, since this combination focuses more on key features, the model will not detect some edge or complex targets well, resulting in a recall rate lower than the original YOLOV8n model by 0.2%. The YOLOv8n-MDSD model formed by combining the four schemes with the original YOLOv8n model effectively reduces information loss through multi-level and multi-scale feature enhancement and the synergy of multiple modules, and reduces the problems of missed detection and false detection caused by targets in complex environments that occlude each other. The YOLOv8n-MDSD model is an improvement on the baseline YOLOv8n model. The number of model parameters has increased, but the accuracy of banana leaf detection has been significantly improved.
[0126] Table 1 YOLOv8n-MDSD model ablation experiment training results
[0127]
[0128] In order to verify the effectiveness and accuracy of the improved method proposed in this study in banana leaf detection, the YOLOv8n-MDSD model of this study was compared with some one-stage mainstream models YOLOv5n, YOLOv6n, YOLOv7-t i ny, YOLOv8n and YOLOv8s. The comparative experiments were carried out in the same experimental environment. The data of the comparative experimental results are shown in Table 2. From the comparative experimental results, the YOLOv8n-MDSD model has certain performance improvements compared with the YOLOv5n, YOLOv6n, YOLOv7-tiny and YOLOv8n models, which are 3.24%, 2.45%, 2.71% and 2.58% higher in AP0.5%, and 5.6%, 3.3%, 11.18% and 3.6% higher in AP0.5-0.95% respectively; in terms of model size, the YOLOv8n-MDSD model size is 9.7M, which is smaller than the 11.7M of the YOLOv7-tiny model. Although the model size is larger than YOLOv5n, YOLOv6n and YOLOv8n, some detection time is sacrificed, but considering the detection of banana leaves, the detection speed requirement will not be too high, and improving the detection accuracy is more in line with the scene. 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 the YOLOv8s model by 0.84% and 2.44%, respectively, its model size and number of parameters were nearly half of those of the YOLOv8s model. The comprehensive comparison shows that the YOLOv8n-MDSD model has a good detection effect in banana leaf detection.
[0129] Table 2. Experimental training results of different model performance comparison
[0130]
[0131] In some embodiments, under the recognition of different models, YOLOv5n, YOLOv6n, YOLOv7-t i ny, YOLOv8n and YOLOv8n-MDSD models can all achieve the banana leaf detection task, but due to the serious leaf occlusion in the scene, YOLOv5n, YOLOv6n, YOLOv7-t i ny and YOLOv8n models will have misdetection, identifying two leaves as one leaf, or repeatedly detecting a leaf; when small target leaves and marginalized leaves appear, YOLOv5n, YOLOv7-t i ny and YOLOv8n will have misdetection, detecting grass that looks like banana leaves as banana leaves, while YOLOv6n will miss the leaves at the edge. Finally, the detection of the YOLOv8n-MDSD model is more complete and accurate, and the confidence of the same area is compared to find that the confidence of the YOLOv8n-MDSD model is improved.
[0132] It can be seen from the above embodiments that, compared with the prior art, the present application aims at the problems that the banana leaves in the prior art are blocked to a certain extent in the banana planting environment and are easily interfered by leaves of different sizes and plants similar to banana leaves, and the detection accuracy of the banana leaves is not high, resulting in the inability of the agricultural robot to accurately judge the growth cycle of the banana plants. The present application includes but is not limited to the following beneficial effects:
[0133] First, the second banana leaf recognition model of the present application uses a multi-scale channel attention mechanism and an anti-pooling technique to enhance the expressiveness of feature maps. Through shunting processing and feature combination, the model can better capture the detailed information of banana plant images and improve recognition accuracy.
[0134] Secondly, the multi-rate deep separation dilated convolution module in the second banana leaf recognition model of the present application provides a powerful multi-scale feature extraction capability through the combination of regional 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] Third, the SEAM module of the C2f module of the feature fusion network in the second banana leaf recognition model of the present application can effectively make up for the lack of information relationship between channels through the comprehensive application of deep separable convolution, point-to-point convolution and fully connected network, and enhance the ability of the network to handle complex and occluded environments. Deep convolution captures detailed features, point-by-point convolution performs feature fusion, residual connection retains original information and introduces new features, point-to-point convolution integrates features at different levels, and fully connected network performs channel recalibration. This comprehensive method ensures the comprehensiveness and accuracy of feature fusion, allowing the network to perform more accurately and robustly in complex scenarios.
[0136] Fourthly, the DyHead detection head in the second banana leaf recognition model of the present application improves the performance of the target detection model in various scenarios through dynamic adjustment and adaptive mechanism, especially when processing complex features and targets;
[0137] Furthermore, the second banana leaf recognition model of the present application not only retains the network structure of YOLOv8n, but also significantly improves the detection accuracy by introducing multi-scale dynamic detection technology. While maintaining efficient operation, the model reduces the consumption of computing resources, making it more suitable for deployment in resource-limited environments, such as farmland edge devices;
[0138] The second banana leaf recognition model of the present 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 precise detection capability will greatly improve the efficiency of agricultural management and help farmers understand the growth cycle and health status of banana plants in a timely manner, so as to take more effective management measures, reduce disease losses and increase crop yields.
[0139] See also Figure 6, a banana plant growth cycle detection device provided to meet one of the purposes of the present application, includes an image acquisition module 1100, a model construction module 1200, a mask image generation module 1300, a leaf area determination module 1400 and a growth cycle detection module 1500. Among them, the image acquisition module 1100 is configured to respond to a banana plant growth cycle detection instruction and acquire a banana plant image to be detected containing banana leaves; the model construction module 1200 is configured to introduce a multi-scale channel attention module into the C2f module in the backbone feature extraction network of the preset first banana leaf recognition model, introduce a multi-rate deep 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; the mask image generation module 1300 is configured to input the banana plant image to be detected into the second banana leaf recognition model that has been trained to a convergence state, and perform mask segmentation on the banana plant image to be detected to determine the banana plant area of the banana plant image to be detected. The invention relates to a method for detecting a banana plant by detecting a mask image data corresponding to each banana leaf in the banana plant image; a leaf area determination module 1400, configured to calculate and determine the number of projection area pixels corresponding to each banana leaf in the mask image data, and to calculate and determine the leaf area corresponding to each banana leaf according to the number of projection area pixels; a growth cycle detection module 1500, configured to determine a leaf area threshold range corresponding to banana leaves in each growth cycle, calculate and determine the leaf area average value between the leaf areas corresponding to each banana leaf, and if it is detected that the leaf area average value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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.
[0140] Based on any embodiment of this application, please refer to Figure 7 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 7 As shown, a schematic diagram of 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. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions, and the database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a banana plant growth cycle detection method. The processor of the computer device is used to provide computing and control capabilities to support 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 the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0141] In this embodiment, the processor is used to execute Figure 6 The memory stores the program codes and data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program codes and data required to execute all modules / submodules in the banana plant growth cycle detection device of the present application, and the server can call the program codes and data of the server to execute the functions of all submodules.
[0142] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the banana plant growth cycle detection method described in any embodiment of the present application.
[0143] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the banana plant growth cycle detection method described in any embodiment of the present application.
[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0145] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
[0146] In summary, the second banana leaf recognition model of the present 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 precise detection capability will greatly improve the efficiency of agricultural management and help farmers understand the growth cycle and health status of banana plants in a timely manner, so as to take more effective management measures, reduce disease losses and increase crop yields.
Claims
1. A method for detecting the growth cycle of a banana plant, characterized in that: include: In response to a banana plant growth cycle detection instruction, an image of a banana plant to be detected including banana leaves is obtained; A multi-scale channel attention module is introduced into the C2f module in the backbone feature extraction network of the preset first banana leaf recognition model, a multi-rate deep separation dilated convolution module and a SEAM module are introduced into the C2f module of the feature fusion network, and a Dyhead detection head is introduced into the detection head network to construct a second banana leaf recognition model; Inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergence state, performing mask segmentation on the banana plant image to be detected, so as to determine mask image data corresponding to each banana leaf in the banana plant image to be detected; Calculate and determine the number of pixel points of the projection area 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 pixel points of the projection area; The leaf area threshold range corresponding to the banana leaves in each growth cycle is determined, and the leaf area average value between the leaf areas corresponding to the respective banana leaves is calculated and determined. If it is detected that the leaf area average value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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.
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 a second banana leaf recognition model that has been trained to a convergent state, and 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 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, 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, local average pooling is first performed, feature conversion is performed through Reshape operation and 1D convolution operation, and Reshape operation is performed again; In the global average pooling path, a global average pooling process is performed, a feature conversion is performed through a Reshape operation and a 1D convolution operation, a Reshape operation is performed again, and finally an unpooling operation is performed to increase the feature map resolution; Combining 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 performing a de-pooling operation on the combined feature map to further increase the spatial resolution of the feature map; Combine the feature map after the unpooling operation with the original input feature map.
3. The banana plant growth cycle detection method according to claim 1, wherein The step of inputting the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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 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 regional residualization and semantic residualization; The extracted regional feature maps are divided into several groups, each group of feature maps represents a different area of the image, and depth-separated dilated convolution with different dilation rates is applied to each group of feature maps to perform regional residualization; A single depthwise separable dilated convolution with desired receptive field is applied to each region feature map, and the features are further refined by 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 banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergent state, and 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 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, and a convolution kernel is independently applied to each input channel to extract features in each channel to determine a feature map after the deep convolution; Point-by-point convolution is used to mix the feature maps after depth convolution, and the features of each channel are linearly combined to fuse the information of different channels to further enhance the expressiveness of the features; Perform residual connection to fuse the feature map processed by depthwise separable convolution with the input feature map through addition operation to keep the original information of the input feature map and fuse the new features after convolution processing; Point-to-point convolution is used to effectively fuse the features generated by convolutions of different depths to ensure that feature information at different levels can complement and integrate each other; A two-layer fully connected network is used to recalibrate the information of each channel, learn the importance of each channel through the fully connected network, and adjust the response of the channel.
5. The banana plant growth cycle detection method according to any one of claim 1, characterized in that: The steps of calculating and determining the number of pixel points of the projection area 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 pixel points of the projection area include: Determine the actual area corresponding to each projection area pixel point, wherein the projection area pixel point represents the pixel point of the banana leaf in the mask image; The product between the actual area corresponding to each projection area pixel point and the number of projection area pixel points corresponding to each banana leaf is calculated 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: If it is detected that the leaf area average value is within the leaf area threshold range, the step of taking the growth cycle corresponding to the leaf area threshold range as the growth cycle of the banana plant to be detected includes: Determine the leaf area corresponding to each banana leaf, and calculate and determine the average leaf area between each banana leaf according to the leaf area corresponding to each banana leaf; The leaf area average value is compared with the leaf area threshold range of each growth cycle. If the leaf area average value falls within the leaf area threshold range of a certain growth cycle, the growth cycle is the growth cycle of the banana plant to be detected, wherein 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.
7. The method for detecting the growth cycle of a banana plant according to any one of claims 1 to 6, characterized in that: 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.
8. A banana plant growth cycle detection device, characterized in that: include: An image acquisition module is configured to respond to a banana plant growth cycle detection instruction and acquire an image of a banana plant to be detected including banana leaves; A model building 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 recognition model, introduce a multi-rate deep separation dilated convolution module and a SEAM module into the C2f module of a feature fusion network, and introduce a Dyhead detection head into a detection head network, so as to build a second banana leaf recognition model; a mask image generating module, configured to input the banana plant image to be detected into a second banana leaf recognition model that has been trained to a convergence state, and perform 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; a leaf area determination module, configured to calculate and determine the number of projection 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 projection area pixels; The growth cycle detection module is configured to determine a leaf area threshold range corresponding to banana leaves of each growth cycle, calculate and determine an average leaf area value between leaf areas corresponding to the respective banana leaves, and if it is detected that the leaf area average value is within the leaf area threshold range, the growth cycle corresponding to the leaf area threshold range is used 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.
9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute 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 described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Deep learning plant growth model analysis method and system based on computer vision
CN111862194A
Banana growth period identification method and system based on deep learning
CN114972292A
Lightweight convolutional neural network-based method for identifying banana fruit shafts and banana strings
CN115690776A
Banana leaf growth parameter extraction method, device, equipment and medium
CN117853562A
Litchi growth stage information detection method and system, and electronic equipment
CN118608960A
