Tea tender shoot yield estimation method, device and equipment based on deep learning and medium
By introducing super-resolution reconstruction module and multi-scale channel attention mechanism in the YOLOv8 network model, the tea bud recognition model is improved, the problem of inaccurate tea bud count is solved, and the accuracy of tea yield prediction is significantly improved.
Patent Information
- Application Number
- CN202411230702.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing tea bud yield estimation method based on deep learning has the inaccurate results of the tea bud counting results, making it difficult to extract tea bud characteristic information in complex situations, resulting in poor tea yield estimation effect.
The super-resolution reconstruction module was introduced after the CSPDarknet network of the YOLOv8 network model, and a multi-scale channel attention mechanism was introduced into the prediction head of the feature fusion network to build an improved tea bud recognition model.
It significantly improves the detection accuracy and robustness of the tea bud recognition model, improves the accuracy of tea bud yield prediction, and makes agricultural producers more scientific in prediction of tea bud yield.
Smart Images

Figure CN119540743A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of agricultural production, and in particular to a tea bud yield estimation method based on deep learning, corresponding devices, electronic equipment and computer-readable storage medium. Background Art
[0002] As one of the three major beverages in the world, tea contains a variety of nutrients such as tea polyphenols, catechins and trace elements. It is deeply loved by consumers for its unique flavor. According to statistics, the annual global tea production in 2023 is about 660.4 tons. As one of the world's largest tea producers, China's annual production is about 3.55 million tons. Crop yield estimation is an important part of current modern precision agriculture. Yield estimation is of great significance to national agricultural decision-making, farmland production management, and crop storage safety. As China's traditional advantageous and characteristic industry, timely and accurate estimation of tea yield is of great significance to tea garden field management, market stability and sustainable development of the tea industry.
[0003] The traditional method of estimating tea yield is to first measure one acre of land, pick tea buds manually in the same time, and then weigh the picked tea buds to get the yield per acre. In actual operation, this method is easily affected by factors such as species, climate, and environment, resulting in the estimated data not having scientific reference value; the remote sensing yield estimation method based on multispectral and hyperspectral is to construct a yield estimation model by constructing vegetation indexes and characteristic bands in different bands and biomass. This method is simple and easy to build, but its specific implementation requires a large amount of sample data, and it also has limitations when it is extended to other regions or crops; the crop growth model based on the intersection of multiple disciplines such as agronomy, meteorology, statistics, and soil science has a strong mechanism and high estimation accuracy, but the relevant parameters of this method are difficult to obtain, and the interaction relationship between multiple factors is difficult to obtain during the experiment. A more reasonable quantitative description is still needed.
[0004] At present, with the rapid development of computer vision, deep learning has been widely used in agricultural fields such as crop classification, nutrition monitoring, and pest and disease detection by virtue of its deep feature data mining and learning. Tea-related research based on deep learning is also emerging. Most of the existing tea bud yield estimation methods based on deep learning have inaccurate counting results of tea buds and difficulty in extracting tea bud feature information under complex conditions, resulting in poor tea yield estimation results. There are many deficiencies, such as severe tea occlusion from the perspective of drones, diverse shapes, difficulty in extracting target features, and the impact of flight altitude on tea image resolution, resulting in low model detection accuracy and poor robustness.
[0005] To sum up, in order to adapt to the problems in the prior art such as severe occlusion of tea leaves from the perspective of drones, diverse shapes, difficulty in extracting target features, and the impact of flight altitude on tea image resolution, which lead to low model detection accuracy and poor robustness, the applicant has made corresponding explorations to solve these problems. Summary of the invention
[0006] The purpose of this application is to solve the above-mentioned problems and to provide a tea bud yield estimation method based on deep learning, a corresponding device, an electronic device and a computer-readable storage medium.
[0007] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0008] A tea bud yield estimation method based on deep learning is proposed to meet one of the purposes of this application, including:
[0009] In response to the tea bud yield estimation instruction, an image of tea leaves to be detected including tea buds taken by the drone is obtained;
[0010] A super-resolution reconstruction module is introduced after the CSPDarknet network in the preset first tea bud recognition model, and a multi-scale channel attention mechanism is introduced into the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model;
[0011] Inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected;
[0012] A preset tea bud estimation model is used to determine the quality of the tea buds in the tea garden to be estimated according to the number of the tea buds, so as to complete the yield estimation of the tea buds.
[0013] Optionally, a super-resolution reconstruction module is introduced after the CSPDarknet network in the preset first tea bud recognition model, and a multi-scale channel attention mechanism is introduced into the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model, comprising:
[0014] The super-resolution reconstruction module includes a residual dense block and a residual channel attention module.
[0015] Optionally, the step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected includes:
[0016] Inputting the tea leaf image to be detected containing tea buds into a second tea bud recognition model that has been trained to a convergence state, using the CSPDarknet network in the second tea bud recognition model to perform shallow feature extraction to obtain basic low-level features, and inputting the low-level features into the super-resolution reconstruction module;
[0017] In the residual dense block of the super-resolution reconstruction module, the residual dense block adopts multi-layer convolution features and fuses global features to capture detailed information of the image;
[0018] Through global feature fusion, the features of each convolutional layer are combined to extract more expressive global dense features;
[0019] The global dense features are input into the residual channel attention module of the super-resolution reconstruction module. The residual channel attention module adopts the attention mechanism to dynamically adjust the importance of feature channels to enhance the network's ability to distinguish features of different channels and improve the quality and details of the reconstructed image.
[0020] Optionally, the step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected includes:
[0021] A multi-scale channel attention mechanism of the prediction head of the feature fusion network of the second tea bud recognition model is used to extract feature information from feature maps of different scales to capture various levels of details in the image;
[0022] Perform channel attention calculation on the feature map of each scale, and summarize the features of each channel into a global description through global average pooling or global maximum pooling;
[0023] Generate channel attention weights using a fully connected layer or a convolutional layer, wherein the channel attention weights represent the importance of each channel;
[0024] Apply the generated channel attention weights to the original feature map to weight the features of each channel to amplify channel features of high importance and suppress channel features of low importance;
[0025] The weighted feature maps are fused to combine information at different scales to generate a comprehensive feature map with multi-scale context;
[0026] The fused feature map is input into the prediction head of the feature fusion network of the second tea bud recognition model, and the tea buds in the tea leaf image to be detected are output.
[0027] Optionally, the step of constructing a tea bud estimation model includes:
[0028] Determine the number of tea buds corresponding to each tea bud mass, and calculate and determine the average value of the number of tea buds corresponding to each tea bud mass, wherein the tea bud mass can be any value between 10g and 500g;
[0029] The least square method is used to fit the masses of each tea bud and the corresponding number of tea buds to determine the parameters of the linear model, so as to complete the construction of the tea bud estimation model.
[0030] Optionally, the tea bud estimation model is expressed as:
[0031] n=a.m+b;
[0032] Among them, n is the predicted number of tea buds, m is the quality of tea buds, and a and b are the parameters of the tea bud estimation model.
[0033] Optionally, the basic network architecture of the first tea bud identification model is a YOLOv8 model, and the basic network architecture of the second tea bud identification model is an improved YOLOv8 model.
[0034] A tea bud yield estimation device based on deep learning is provided to meet another purpose of the present application, comprising:
[0035] The tea leaf image acquisition module is configured to respond to the tea leaf bud yield estimation instruction and acquire the image of the tea leaf to be detected containing the tea leaf buds taken by the drone;
[0036] The recognition model construction module is configured to introduce a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model, and introduce a multi-scale channel attention mechanism in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model;
[0037] a bud quantity determination module, configured to input the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state, so as to determine the number of tea buds in the tea leaf image to be detected;
[0038] The bud yield estimation module is configured to use a preset tea bud estimation model to determine the quality of the tea buds in the tea garden to be estimated according to the number of tea buds, so as to complete the yield estimation of the tea buds.
[0039] 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 deep learning-based tea bud yield estimation method described in the present application.
[0040] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the deep learning-based tea bud yield estimation 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.
[0041] Compared with the prior art, the present application aims to solve the problems in the prior art such as severe tea occlusion, diverse shapes, difficulty in extracting target features, and the influence of flight altitude on tea image resolution under the perspective of drones, which leads to low model detection accuracy and poor robustness. The present application includes but is not limited to the following beneficial effects:
[0042] First, this application introduces a super-resolution reconstruction module after the CSPDarknet network in the YOLOv8 network model, which can help the model better capture and utilize features of different scales, thereby improving the accuracy of tea bud recognition;
[0043] Second, by introducing a multi-scale channel attention mechanism into the prediction head of the feature fusion network of the YOLOv8 network model, the improved YOLOv8 network model can effectively process and fuse feature maps from different scales and capture various details in the image, thereby improving the recognition accuracy of tea buds.
[0044] Furthermore, in view of the fact that the tea images viewed from the perspective of a drone present global clarity and local blur, as well as the characteristics of high density, multi-scale and complex texture of tea, this application introduces a super-resolution reconstruction module and a multi-scale channel attention mechanism to construct an improved YOLOv8 network model, which realizes the detection and counting of tea buds in complex natural environments, and significantly improves the detection accuracy of the tea bud recognition model. While improving the detection accuracy of the tea bud recognition model, it also greatly improves the accuracy of tea bud yield prediction, making it more scientific for agricultural producers to predict the yield of tea buds, greatly saving manpower and material resources, and laying a solid theoretical foundation for the sustainable development of smart agriculture. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] 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:
[0046] Figure 1 This is a flow chart of a method for estimating tea bud yield based on deep learning in an embodiment of the present application;
[0047] Figure 2 It is a schematic diagram of the structure of the improved YOLOv8 model in the embodiment of the present application;
[0048] Figure 3 Schematic diagram of the structure of the residual module in the embodiment of the present application;
[0049] Figure 4 This is a schematic diagram of the structure of a dense module in an embodiment of the present application;
[0050] Figure 5 This is a schematic diagram of the structure of the residual dense module in the embodiment of the present application;
[0051] Figure 6 This is a schematic diagram of the structure of the residual channel attention module in an embodiment of the present application;
[0052] Figure 7 This is a schematic diagram of the structure of multi-scale channel attention in an embodiment of the present application;
[0053] Figure 8 This is a schematic diagram of the structure of the improved YOLOv8 model trained in the embodiment of the present application;
[0054] Fig. 9 This is a principle block diagram of a tea bud yield estimation device based on deep learning in an embodiment of the present application;
[0055] Fig.10 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] See also Figure 1 In one embodiment, the tea bud yield estimation method based on deep learning of the present application includes:
[0068] Step S10, responding to the tea bud yield estimation instruction, obtaining an image of tea leaves to be detected containing tea buds taken by the drone;
[0069] The tea bud yield estimation system can respond to the tea bud yield estimation instruction and obtain the image of the tea leaf to be detected containing the tea buds taken by the drone;
[0070] Specifically, the tea garden under study can be divided into multiple sampling areas, and 9 data sampling points are randomly selected; the data is acquired and processed to generate a data set for the training model; the drone is used to take RGB images of several tea buds in the picking period (one bud and two leaves) at the 9 data sampling points at different flight altitudes, and the resolution of the drone RGB image is 5472x3648; the drone flies according to the planned path trajectory, and the camera unit on the drone system is installed with set parameters to collect data while flying, setting the heading overlap rate to 90% and the side overlap rate to 80%; in addition, during the entire flight process, the camera unit on the drone system is in a 90° vertical shooting state. Based on the image stitching software Pi x4DMapper, radiation correction and image stitching are performed on several collected tea bud images to obtain digital orthophotos of the tea garden; in order to meet the needs of subsequent models and the needs of data set diversification, the orthophotos are cropped into small images of 640 pixels x 640 pixels, which finally constitute the tea bud data set;
[0071] Label Img software was used to annotate the tea buds in the samples. The standards for determining the tea buds were mainly based on the following requirements: clear and complete tea buds; with the relatively complete one bud and two leaves picking standard within the image range as a reference, the target tea buds were annotated with horizontal frames, and the training set and validation set were divided into training and validation sets in a ratio of 7:1.5:1.5. Since the tea bud images and old leaves are of the same color, in order to reduce the impact of the background on the image, the brightness and contrast of the tea bud images were enhanced to increase the difference between the tea buds and the old leaves and other backgrounds, so that the model can better extract the target features.
[0072] Step S20, introducing a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model, and introducing a multi-scale channel attention mechanism in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model;
[0073] After obtaining the image of tea leaves to be detected containing tea buds taken by a drone, a super-resolution reconstruction module is introduced after the CSPDarknet network in the preset first tea bud recognition model, and a multi-scale channel attention mechanism is introduced in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model, wherein the basic network architecture of the first tea bud recognition model is the YOLOv8 model, and the basic network architecture of the second tea bud recognition model is the improved YOLOv8 model, and the super-resolution reconstruction module includes a residual dense block and a residual channel attention module.
[0074] In some embodiments, the CSPDarknet network in the first tea bud recognition model is the backbone network used for feature extraction in the YOLOv8 target detection model. The CSPDarknet network is an improvement on the traditional Darknet network, and the performance and computational efficiency of the network are improved by introducing the Cross-Stage Partial (CSP) structure.
[0075] Specifically, see Figure 2 , construct the second tea bud recognition model, specifically including: introducing a super-resolution reconstruction module and a multi-scale attention module into the YOLOv8 model that can refine features and realize multi-scale information fusion, wherein the super-resolution reconstruction module is composed of a residual dense block and a residual channel attention module, the residual dense block can make full use of the hierarchical features of each convolutional layer in the image to be reconstructed, and use the global feature fusion method to obtain the global dense features in the image to be reconstructed, thereby improving the image reconstruction performance; the residual channel attention module uses the attention mechanism to distinguish the feature information of different channels, thereby improving the network's super-resolution reconstruction capability for drone tea images, and restoring the complex texture information of the image as much as possible. The residual dense block is an integration of the residual module and the dense module, combining the two to form a residual dense module.
[0076] See also Figures 3 to 5 ,in, Figure 3 is the residual module, Figure 4 For dense modules, Figure 5 The residual dense block is a residual dense block. The model realizes the feature extraction of tea buds through a shallow feature extraction network. After being processed by the residual module, the dense module establishes multi-layer skip links to map the deeper features between feature maps. The residual channel attention module combines attention with residual ideas and integrates channel attention into the residual block to form a residual channel attention module. Figure 6 As shown, for the b-th residual block:
[0077] F g,b =Fg,b-1 +R g,b (X g,b )X g,b ,
[0078] In the formula, F g,b-1 represents the input of the residual channel attention module, F g,b ——The output of the residual channel attention module, R g,b represents channel attention, X g,b Indicates that it has undergone convolution and ReLU operations.
[0079] Specifically, the input is first subjected to convolution and ReLU operations to obtain X g,b , then X g,b After a channel attention mechanism, the result is added to the input to get the output of the residual channel attention module. The convolution operation uses a 3×3 convolution kernel. In addition, in view of the complex texture, various shapes, and inconsistent sizes of the tea bud images collected by drones, a multi-scale channel attention module is introduced. While realizing the multi-scale feature fusion of high-resolution dense images, the information on each channel is retained as the goal, the channel dimensions are grouped into multiple sub-features, focusing on the multi-scale contextual information of tea buds, and optimizing the high-resolution dense target prediction performance. The multi-scale channel attention module is as follows: Figure 7 shown.
[0080] In some embodiments, the present application uses an end-to-end method to train the above-mentioned improved YOLOv8 network, based on the PyTorch deep learning framework for model improvement and algorithm training, and the computer is equipped with an NVIDIA GeForce RTX3060 graphics processor (GPU) and a 12th Gen Intel(R) Core(TM) i5-12500 CPU. The experimental environment is Windows 10 Version 22H2 64-bit system and Python version is 3.8.
[0081] In some embodiments, the model training parameters are set as follows: the number of training rounds (epochs) is determined to be 400 and the batch size (batch) is 16 through preliminary experiments; the training optimizer is Adam, the learning rate is 0.01, the momentum is 0.937, and the weight decay coefficient is 0.000 5. The training set images are input into the network for model training, and the model is verified after every 5 rounds of training, and the best model weight is saved. The saved model weight is used to perform an accuracy test on the test set images and predict the number of tea buds. The model training process is as follows: Figure 8 shown.
[0082] Step S30, inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state, so as to determine the number of tea buds in the tea leaf image to be detected;
[0083] After the second tea bud recognition model is constructed, the tea leaf image to be detected is input into the second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected;
[0084] Furthermore, the step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected includes:
[0085] Step S301, inputting the tea leaf image to be detected containing tea buds into a second tea bud recognition model that has been trained to a convergence state, using the CSPDarknet network in the second tea bud recognition model to perform shallow feature extraction to obtain basic low-level features, and inputting the low-level features into the super-resolution reconstruction module;
[0086] Step S302: In the residual dense block of the super-resolution reconstruction module, the residual dense block adopts multi-layer convolution features and fuses global features to capture detailed information of the image;
[0087] Step S303: combining the features of each convolutional layer by global feature fusion to extract more expressive global dense features;
[0088] Step S304: input the global dense features into the residual channel attention module of the super-resolution reconstruction module. The residual channel attention module uses an attention mechanism to dynamically adjust the importance of feature channels to enhance the network's ability to distinguish features of different channels and improve the quality and details of the reconstructed image.
[0089] From the above steps, it can be seen that introducing a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model can help the model better capture and utilize features of different scales, thereby improving the accuracy of bud recognition.
[0090] Furthermore, the step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected includes:
[0091] Step S3001, using the multi-scale channel attention mechanism of the prediction head of the feature fusion network of the second tea bud recognition model to extract feature information from feature maps of different scales to capture various levels of details in the image;
[0092] Step S3002: perform channel attention calculation on the feature map of each scale, and aggregate the features of each channel into a global description through global average pooling or global maximum pooling;
[0093] Step S3003: Generate channel attention weights using a fully connected layer or a convolutional layer, wherein the channel attention weights represent the importance of each channel;
[0094] Step S3004: Apply the generated channel attention weights to the original feature map to weight the features of each channel to amplify channel features of high importance and suppress channel features of low importance;
[0095] Step S3005: Fusing the weighted feature maps, combining information of different scales, and generating a comprehensive feature map with multi-scale context;
[0096] Step S3006: input the fused feature map into the prediction head of the feature fusion network of the second tea bud recognition model, and output the tea buds in the tea leaf image to be detected.
[0097] From the above steps, it can be seen that by introducing the multi-scale channel attention mechanism in the prediction head of the feature fusion network of the first tea bud recognition model, the second tea bud recognition model can effectively process and fuse feature maps from different scales, capture various details in the image, and thus improve the recognition accuracy of tea buds.
[0098] Step S40: using a preset tea bud estimation model to determine the quality of the tea buds in the tea garden to be estimated according to the number of the tea buds, so as to complete the yield estimation of the tea buds.
[0099] After determining the number of tea buds in the tea leaf image to be detected, a preset tea bud estimation model is used to determine the quality of the tea buds in the tea garden to be estimated based on the number of tea buds, so as to complete the yield estimation of the tea buds.
[0100] In some embodiments, the step of constructing a tea bud estimation model includes:
[0101] Step S401, determining the number of tea buds corresponding to each tea bud mass, and calculating and determining the average value of the number of tea buds corresponding to each tea bud mass, wherein the tea bud mass can be any value between 10g and 500g;
[0102] Step S402: using the least square method to perform fitting according to the masses of each tea bud and the corresponding quantity of tea bud, so as to determine the parameters of the linear model, so as to complete the construction of the tea bud estimation model.
[0103] Specifically, the tea bud yield is estimated by designing an experiment to establish a linear relationship between the number of tea buds and the quality of tea buds, so as to estimate the quality of tea buds by quantity; 30 portions of tea buds, 10, 20, …, 90, 100, 110, 120, …, 190, 200, 210, 220, …, 290, 300 g, can be weighed from the manually harvested tea buds, and each mass is weighed 3 times independently (the buds need to be put back after weighing, and the buds of that mass need to be weighed again from the harvested buds). The experiment is carried out 3 times independently at different sampling points, the number of tea buds at each mass is recorded, the average number of tea buds is calculated, and finally the relationship between the number and quality of tea buds is fitted using the least squares method to construct a tea bud estimation model.
[0104] Furthermore, the expression of the tea bud estimation model is:
[0105] n=a.m+b;
[0106] Among them, n is the predicted number of tea buds, m is the quality of tea buds, and a and b are the parameters of the tea bud estimation model.
[0107] It can be seen from the above embodiments that, compared with the prior art, the present application aims to solve the problems in the prior art such as severe tea leaf occlusion, diverse shapes, difficulty in target feature extraction, and the influence of flight altitude on tea leaf image resolution under the perspective of drones, which leads to low model detection accuracy and poor robustness. The present application includes but is not limited to the following beneficial effects:
[0108] First, this application introduces a super-resolution reconstruction module after the CSPDarknet network in the YOLOv8 network model, which can help the model better capture and utilize features of different scales, thereby improving the accuracy of tea bud recognition;
[0109] Second, by introducing a multi-scale channel attention mechanism into the prediction head of the feature fusion network of the YOLOv8 network model, the improved YOLOv8 network model can effectively process and fuse feature maps from different scales and capture various details in the image, thereby improving the recognition accuracy of tea buds.
[0110] Furthermore, in view of the fact that the tea images viewed from the perspective of a drone present global clarity and local blur, as well as the characteristics of high density, multi-scale and complex texture of tea, this application introduces a super-resolution reconstruction module and a multi-scale channel attention mechanism to construct an improved YOLOv8 network model, which realizes the detection and counting of tea buds in complex natural environments, and significantly improves the detection accuracy of the tea bud recognition model. While improving the detection accuracy of the tea bud recognition model, it also greatly improves the accuracy of tea bud yield prediction, making it more scientific for agricultural producers to predict the yield of tea buds, greatly saving manpower and material resources, and laying a solid theoretical foundation for the sustainable development of smart agriculture.
[0111] See also Fig. 9 A tea bud yield estimation device based on deep learning is provided to meet one of the purposes of the present application, including a tea image acquisition module 1100, a recognition model construction module 1200, a bud quantity determination module 1300 and a bud yield estimation module 1400. Among them, the tea image acquisition module 1100 is configured to respond to the tea bud yield estimation instruction and obtain the image of the tea leaves to be detected containing tea buds taken by the drone; the recognition model construction module 1200 is configured to introduce a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model, and introduce a multi-scale channel attention mechanism in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model; the bud quantity determination module 1300 is configured to input the tea leaf image to be detected into the second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected; the bud yield estimation module 1400 is configured to use the preset tea bud estimation model to determine the quality of the tea buds in the tea garden to be estimated according to the number of tea buds, so as to complete the yield estimation of the tea buds.
[0112] Based on any embodiment of this application, please refer to Fig.10 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Fig.10As 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. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a tea bud yield estimation method based on deep learning. 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 tea bud yield estimation method based on deep learning 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 will understand that Fig.10 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.
[0113] In this embodiment, the processor is used to execute Fig. 9 The memory stores the program code and various 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 code and data required to execute all modules / submodules in the deep learning-based tea bud yield estimation device of the present application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0114] 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 deep learning-based tea bud yield estimation method described in any embodiment of the present application.
[0115] 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 deep learning-based tea bud yield estimation method described in any embodiment of the present application.
[0116] 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).
[0117] 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.
[0118] To sum up, the present application aims at the tea image from the perspective of the drone, which presents the overall clarity of the image and the local blur, as well as the characteristics of high density, multi-scale and complex texture of the tea. The present application introduces a super-resolution reconstruction module and a multi-scale channel attention mechanism to construct an improved YOLOv8 network model, which realizes the detection and counting of tea buds in a natural environment, and significantly improves the detection accuracy of the tea bud recognition model. On the basis of improving the detection accuracy of the tea bud recognition model, it enables agricultural producers to make more scientific predictions on the yield of tea buds, greatly saves manpower and material resources, and lays a solid theoretical foundation for the sustainable development of smart agriculture.
Claims
1. A tea bud yield estimation method based on deep learning, characterized in that: include: In response to the tea bud yield estimation instruction, an image of tea leaves to be detected including tea buds taken by the drone is obtained; A super-resolution reconstruction module is introduced after the CSPDarknet network in the preset first tea bud recognition model, and a multi-scale channel attention mechanism is introduced into the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model; Inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected; A preset tea bud estimation model is used to determine the quality of the tea buds in the tea garden to be estimated according to the number of the tea buds, so as to complete the yield estimation of the tea buds.
2. The tea bud yield estimation method based on deep learning according to claim 1, characterized in that: The steps of introducing a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model, and introducing a multi-scale channel attention mechanism in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model include: The super-resolution reconstruction module includes a residual dense block and a residual channel attention module.
3. The tea bud yield estimation method based on deep learning according to claim 2, characterized in that: The step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected comprises: Inputting the tea leaf image to be detected containing tea buds into a second tea bud recognition model that has been trained to a convergence state, using the CSPDarknet network in the second tea bud recognition model to perform shallow feature extraction to obtain basic low-level features, and inputting the low-level features into the super-resolution reconstruction module; In the residual dense block of the super-resolution reconstruction module, the residual dense block adopts multi-layer convolution features and fuses global features to capture detailed information of the image; Through global feature fusion, the features of each convolutional layer are combined to extract more expressive global dense features; The global dense features are input into the residual channel attention module of the super-resolution reconstruction module. The residual channel attention module adopts the attention mechanism to dynamically adjust the importance of feature channels to enhance the network's ability to distinguish features of different channels and improve the quality and details of the reconstructed image.
4. The tea bud yield estimation method based on deep learning according to claim 1, characterized in that: The step of inputting the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state to determine the number of tea buds in the tea leaf image to be detected comprises: A multi-scale channel attention mechanism of the prediction head of the feature fusion network of the second tea bud recognition model is used to extract feature information from feature maps of different scales to capture various levels of details in the image; Perform channel attention calculation on the feature map of each scale, and summarize the features of each channel into a global description through global average pooling or global maximum pooling; Generate channel attention weights using a fully connected layer or a convolutional layer, wherein the channel attention weights represent the importance of each channel; Apply the generated channel attention weights to the original feature map to weight the features of each channel to amplify channel features of high importance and suppress channel features of low importance; The weighted feature maps are fused to combine information at different scales to generate a comprehensive feature map with multi-scale context; The fused feature map is input into the prediction head of the feature fusion network of the second tea bud recognition model, and the tea buds in the tea leaf image to be detected are output.
5. The tea bud yield estimation method based on deep learning according to claim 1, characterized in that: The steps to construct the tea bud estimation model include: Determine the number of tea buds corresponding to each tea bud mass, and calculate and determine the average value of the number of tea buds corresponding to each tea bud mass, wherein the tea bud mass can be any value between 10g and 500g; The least square method is used to fit the masses of each tea bud and the corresponding number of tea buds to determine the parameters of the linear model, so as to complete the construction of the tea bud estimation model.
6. The tea bud yield estimation method based on deep learning according to claim 5, characterized in that: The expression of the tea bud estimation model is: n=a.m+b; Among them, n is the predicted number of tea buds, m is the quality of tea buds, and a and b are the parameters of the tea bud estimation model.
7. The tea bud yield estimation method based on deep learning according to claims 1 to 6, characterized in that: The basic network architecture of the first tea bud recognition model is the YOLOv8 model, and the basic network architecture of the second tea bud recognition model is the improved YOLOv8 model.
8. A tea bud yield estimation device based on deep learning, characterized in that: include: The tea leaf image acquisition module is configured to respond to the tea leaf bud yield estimation instruction and acquire the image of the tea leaf to be detected containing the tea leaf buds taken by the drone; The recognition model construction module is configured to introduce a super-resolution reconstruction module after the CSPDarknet network in the preset first tea bud recognition model, and introduce a multi-scale channel attention mechanism in the prediction head of the feature fusion network in the first tea bud recognition model to construct a second tea bud recognition model; a bud quantity determination module, configured to input the tea leaf image to be detected into a second tea bud recognition model that has been trained to a convergence state, so as to determine the number of tea buds in the tea leaf image to be detected; The bud yield estimation module is configured to use a preset tea bud estimation model to determine the quality of the tea buds in the tea garden to be estimated according to the number of tea buds, so as to complete the yield estimation of the tea buds.
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
Improved U-net semantic segmentation model construction method and method and system for tea tender shoot recognition and picking point positioning
CN114863112A
Underwater fish target detection method, device and equipment and storage medium
CN118334703A
Full-time sequence detection method and germination activity evaluation system for plant seeds
CN118411584A
Method and system for automated evaluation of animals
US20230342902A1