Tea picking time prediction method based on deep learning
Through the tea picking time prediction method based on the YOLOv8n network, the receptive field convolution attention module, the reverse residual attention module and the slice-assisted super inference algorithm are used, combined with the loss function of the auxiliary bounding box, to solve the tea picking time prediction method. The problem of insufficient accuracy and efficiency is identified and higher prediction accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202410799021.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing tea picking time prediction methods have shortcomings in identification accuracy and efficiency, especially the low accuracy of identifying long-distance buds, which affects the prediction accuracy and efficiency of tea picking time.
A tea picking time prediction method based on the YOLOv8n network is used to build a model through the receptive field convolution attention module, reverse residual attention module and slice-assisted super inference algorithm. Combined with the loss function of the auxiliary bounding box, the recognition accuracy and accuracy of the model are improved. Generalization ability to enhance the recognition ability of long-distance targets and small targets.
It significantly improves the prediction accuracy and efficiency of tea picking time, enhances the convergence speed and generalization ability of the model, and improves attention to fresh tea leaves and downstream task processing capabilities.
Smart Images

Figure CN118658043A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tea planting, and in particular to a tea picking time prediction method based on deep learning. Background Art
[0002] After the tea leaves of the tea trees are ripe, they need to be picked. Since the tea leaves of large-leaf tea trees may have a single bud, one bud and one leaf, or one bud and two leaves, and the maturity time of single bud, one bud and one leaf, and one bud and two leaves is different, in the past, tea farmers only made rough judgments based on their planting experience, resulting in a large amount of tea being wasted every year due to missed picking. Therefore, there is a need to predict the tea picking time.
[0003] There are currently the following methods for predicting tea picking time: (1) Zhiyong Gui et al. used Ghost_conv to replace the convolution in the original YOLOv5 to reduce the computational complexity and size of the model; added BAM (Bottleneck Attention Module) to the backbone network to suppress invalid information; and used weighted feature fusion in the Neck layer to improve the model detection accuracy. The results show that compared with the original YOLOv5, the improved model has an improved recognition accuracy of 9.66%, a reduced floating-point operation of 52.402G, and a reduced parameter volume of 22.71M. It can effectively realize tea bud detection and thus predict the tea picking time. However, the improved YOLOv5 algorithm still cannot perform statistical classification on the recognition results, and the recognition accuracy of long-distance buds is still low, which affects the prediction accuracy of tea picking time. (2) Shuang Xie et al. constructed the Tea-YOLOv8s network for the complex background of the tea garden, adopted a variety of data enhancement calculations to increase the amount of information in the image and improve its quality, added deformable convolution and attention mechanism, and improved the spatial pyramid pooling structure (SPP, Spatial Pyramid Pooling), thereby enhancing the model's recognition ability for complex objects, reducing the interference of irrelevant factors, and improving the model's detection accuracy. Finally, the Tea-YOLOv8s network achieved an accuracy of 88.27% for tea bud recognition, and the number of parameters and floating-point operations increased by 15.4M and 17.5G respectively; however, the Tea-YOLOv8s network still could not perform statistical classification on the recognition results, and the FPS of the model was only 37.1ms, which was slow, thus affecting the accuracy and efficiency of tea picking time prediction. (3) The YOLOv4-lighted+ICBAM network developed by Shudan Guo et al. uses SENet (Squeeze-and-Excitation Networks), ECA (Efficient Channel Attention), CBAM (Convolutional Block Attention Module), and ICBAM (Improved Convolutional Block Attention Module) to improve the YOLOv4 network to improve the detection accuracy of tea leaves; PANet (Path Aggregation Network) and FPN (Feature Pyramid Network) are added to the Neck layer. The accuracy, recall rate, and average precision of the data collected by RGB-D are 94.19%, 93.50%, and 97.29%, respectively.However, the accuracy of the YOLOv4-lighted+ICBAM network was only 87.10% in external verification, and the delay rate was high, which made it impossible to quickly realize tea grading, identification, positioning and result statistics, thus affecting the accuracy and efficiency of tea picking time prediction.
[0004] Therefore, how to provide a tea picking time prediction method based on deep learning to improve the accuracy and efficiency of tea picking time prediction has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a tea picking time prediction method based on deep learning, so as to improve the accuracy and efficiency of tea picking time prediction.
[0006] The present invention is implemented as follows: a tea picking time prediction method based on deep learning, comprising the following steps:
[0007] Step S1, collecting a large number of tea leaves images, annotating each tea leaf image and performing image expansion preprocessing to construct a data set;
[0008] Step S2, dividing the data set into a training set, a test set and a validation set;
[0009] Step S3: creating a picking time prediction model based on the YOLOv8n network, and setting a loss function of the picking time prediction model;
[0010] Step S4, training the picking time prediction model by using the training set, testing the trained picking time prediction model by using the test set, and verifying the tested picking time prediction model by using the verification set;
[0011] Step S5: predicting the tea picking time by using the verified picking time prediction model.
[0012] Furthermore, in step S1, the tea image includes different shooting angles, lighting intensities and tea types; the shooting angle is front, overhead, upward, side or overall; the lighting intensity is low illumination, medium illumination or high illumination; the tea type is single bud, one bud and one leaf or one bud and two leaves.
[0013] Furthermore, in step S1, the pre-processing of labeling each tea leaf image and expanding the image to construct a data set is specifically as follows:
[0014] Through Make Sense, the tea area, tea type, tea maturity, and picking time of each tea image are annotated, and brightness adjustment, contrast adjustment, and scaling image expansion operations are performed on each annotated tea image, and a data set is constructed based on each tea image after image expansion.
[0015] Furthermore, the step S2 is specifically as follows:
[0016] The dataset is divided into training set, test set and validation set in a ratio of 7:2:1.
[0017] Furthermore, in step S3, the formula of the loss function is:
[0018]
[0019] union=(w gt *h gt )*(ratio) 2 +(w*h)*(ratio) 2 -inter;
[0020]
[0021] Among them, L Inner-CIoU Represents the loss value of the loss function; ρ 2 (c,c gt ) represents the Euclidean distance between the center points of the predicted box and the true box; d represents the diagonal distance of the minimum closed bounding box containing the predicted box and the true box; α represents the balance parameter; v represents the aspect ratio consistency measurement coefficient; inter represents the overlapping area of the predicted box and the true box; union represents the union area of the predicted box and the true box; represents the scale-optimized width of the real box inside the auxiliary bounding box; c r Indicates the width of the real box inside the auxiliary bounding box; represents the scale-optimized height of the real box inside the auxiliary bounding box; c l Indicates the height of the real box inside the auxiliary bounding box; represents the scale-optimized width of the prediction box inside the auxiliary bounding box; c b Indicates the width of the prediction box inside the auxiliary bounding box; represents the scale-optimized height of the prediction box inside the auxiliary bounding box; c t Indicates the height of the prediction box inside the auxiliary bounding box; w gt Indicates the width of the real box; h gt Represents the height of the real box; ratio represents the scaling factor; w represents the width of the predicted box; h represents the height of the predicted box; Indicates the center point of the real box; (x d ,y d ) represents the center point of the prediction box.
[0022] Furthermore, in step S3, the YOLOv8n network is constructed based on a receptive field convolutional attention module, a reverse residual attention module, and a slice-assisted hyper-inference algorithm.
[0023] Furthermore, the receptive field convolution attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability;
[0024] The reverse residual attention module is used to improve the receptive field and downstream task processing capabilities of the picking time prediction model;
[0025] The slice-assisted hyper-inference algorithm is used to improve the recognition capability of the picking time prediction model for long-distance targets and small targets.
[0026] Furthermore, the step S4 is specifically as follows:
[0027] The picking time prediction model is trained by using the training set until the loss value of the loss function is less than a preset loss threshold;
[0028] The trained picking time prediction model is tested by the test set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the training set is expanded to continue training; if yes, then:
[0029] The tested picking time prediction model is verified by the verification set to determine whether the confidence is greater than a preset confidence threshold. If not, the training set is expanded to continue training; if yes, the training is terminated.
[0030] Furthermore, in step S4, during the training process of the picking time prediction model, hyperparameters including at least random deactivation rate, weight decay rate and learning rate are continuously optimized.
[0031] Furthermore, the step S5 is specifically as follows:
[0032] A user interface for calling the verified picking time prediction model is created through Gradio, an input tea image to be predicted is obtained through the user interface, and the tea image to be predicted is input into the picking time prediction model to predict the tea picking time.
[0033] The advantages of the present invention are:
[0034] 1. A large number of tea images are collected and annotated, and a data set is constructed after image expansion preprocessing. The data set is divided into training set, test set and verification set. Then a picking time prediction model is created based on the YOLOv8n network, and the loss function of the picking time prediction model is set. The picking time prediction model is trained with the training set, and the trained picking time prediction model is tested with the test set. The tested picking time prediction model is verified with the verification set, and finally the tea picking time is predicted with the verified picking time prediction model. Since the YOLOv8n network is based on the receptive field convolution attention module, the reverse residual attention module, and the slice-assisted super-inference algorithm, the tea picking time prediction model is used to predict the tea picking time. The method is constructed; the receptive field convolutional attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability; the reverse residual attention module is used to improve the receptive field and downstream task processing ability of the picking time prediction model; the slice-assisted super-inference algorithm is used to improve the recognition ability of the picking time prediction model for long-distance targets and small targets; that is, the traditional YOLOv8n network is improved, and an auxiliary bounding box is introduced into the loss function to improve the convergence speed, recognition accuracy, generalization ability, long-distance target recognition ability, and small target recognition ability of the picking time prediction model, thereby greatly improving the accuracy and efficiency of tea picking time prediction.
[0035] 2. By collecting tea images with different shooting angles, lighting intensities and tea types, and performing brightness adjustment, contrast adjustment and scaling operations on each tea image, the sample size of tea images is greatly expanded, thereby greatly improving the generalization ability of the picking time prediction model.
[0036] 3. By continuously optimizing the hyperparameters including at least the random deactivation rate, weight decay rate and learning rate during the training process of the picking time prediction model, the prediction accuracy of the picking time prediction model is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0038] Figure 1 It is a flow chart of a tea picking time prediction method based on deep learning of the present invention. DETAILED DESCRIPTION
[0039] The technical solution in the embodiment of the present application has the following overall idea: the picking time of tea is predicted based on a picking time prediction model constructed based on an improved YOLOv8n network, and the YOLOv8n network is constructed based on a receptive field convolutional attention module, a reverse residual attention module, and a slice-assisted super-inference algorithm; the receptive field convolutional attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability; the reverse residual attention module is used to improve the receptive field and downstream task processing capabilities of the picking time prediction model; the slice-assisted super-inference algorithm is used to improve the recognition ability of the picking time prediction model for long-distance targets and small targets; and an auxiliary bounding box is introduced into the loss function of the picking time prediction model to improve the convergence speed, recognition accuracy, generalization ability, long-distance target recognition ability, and small target recognition ability of the picking time prediction model, thereby improving the accuracy and efficiency of tea picking time prediction.
[0040] Please refer to Figure 1 As shown, a preferred embodiment of a tea picking time prediction method based on deep learning of the present invention comprises the following steps:
[0041] Step S1, collecting a large number of tea leaves images, annotating each tea leaf image and performing image expansion preprocessing to construct a data set;
[0042] In the specific implementation, in order to enhance the prediction effect of the picking time prediction model in practical applications, during the tea image acquisition process, the distance between the tea garden patrol robot and the tea trees can be imitated, and the shooting distance is set to 20-100cm, the distance from the ground is 100-160cm, the OS is set to 200, the locked aperture is 4.0, and the locked shutter speed is 1 / 300.
[0043] Step S2, dividing the data set into a training set, a test set and a validation set;
[0044] Step S3, creating a picking time prediction model based on the YOLOv8n network, and setting a loss function of the picking time prediction model that introduces an auxiliary bounding box; the picking time prediction model is used to identify tea regions, tea types, and tea maturity, and predict the optimal picking time of tea;
[0045] According to the depth, width and maximum number of channels of the model, the YOLOv8 network is divided into five types: n, s, m, l and x. In order to ensure the efficiency of tea picking time prediction (tea recognition speed), the YOLOv8n network is selected to create the picking time prediction model;
[0046] Step S4, training the picking time prediction model by using the training set, testing the trained picking time prediction model by using the test set, and verifying the tested picking time prediction model by using the verification set;
[0047] Step S5: predicting the tea picking time by using the verified picking time prediction model.
[0048] In step S1, the tea image includes different shooting angles, lighting intensities and tea types; the shooting angle is front, overhead, upward, side or overall; the lighting intensity is low illumination, medium illumination or high illumination; the tea type is single bud, one bud and one leaf or one bud and two leaves.
[0049] In order to further ensure that the picking time prediction model has a strong recognition effect on tea leaves under different lighting, different slopes, and different angles, and has stronger versatility in field applications, tea images are collected in multiple time periods (different light intensities) and multiple angles (different shooting angles).
[0050] In step S1, the steps of labeling each tea image and preprocessing the image expansion to construct a data set are specifically as follows:
[0051] Through Make Sense, the tea area, tea type, tea maturity, and picking time of each tea image are annotated, and brightness adjustment, contrast adjustment, and scaling image expansion operations are performed on each annotated tea image, and a data set is constructed based on each tea image after image expansion.
[0052] In order to further enhance the generalization ability of the picking time prediction model in complex environments and low-light environments, and to better extract the features of tea leaves at different distances and different fields of view, image expansion operations are performed.
[0053] The step S2 is specifically as follows:
[0054] The dataset is divided into training set, test set and validation set in a ratio of 7:2:1.
[0055] In step S3, the formula of the loss function is:
[0056]
[0057] union=(w gt *h gt )*(ratio) 2 +(w*h)*(ratio) 2 -inter;
[0058]
[0059]
[0060] Among them, L Inner-CIoU Represents the loss value of the loss function; ρ 2 (c,c gt ) represents the Euclidean distance between the center points of the predicted box and the true box; d represents the diagonal distance of the minimum closed bounding box containing the predicted box and the true box; α represents the balance parameter; v represents the aspect ratio consistency measurement coefficient; inter represents the overlapping area of the predicted box and the true box; union represents the union area of the predicted box and the true box; represents the scale-optimized width of the real box inside the auxiliary bounding box; c r Indicates the width of the real box inside the auxiliary bounding box; represents the scale-optimized height of the real box inside the auxiliary bounding box; c l Indicates the height of the real box inside the auxiliary bounding box; represents the scale-optimized width of the prediction box inside the auxiliary bounding box; c b Indicates the width of the prediction box inside the auxiliary bounding box; represents the scale-optimized height of the prediction box inside the auxiliary bounding box; c t Indicates the height of the prediction box inside the auxiliary bounding box; w gt Indicates the width of the real box; h gt Indicates the height of the real box; ratio indicates the scaling factor, which is used to control the size of the auxiliary bounding box and calculate the loss. The value range is 0.5 to 1.5. When the ratio is less than 1, the auxiliary bounding box is smaller than the real box. Although the effective range of regression is smaller than IoU, the absolute value of the gradient is higher than IoU, which can accelerate the convergence of the model. When the ratio is greater than 1, the auxiliary bounding box can expand the effective range of regression and enhance the regression effect; w indicates the width of the prediction box; h indicates the height of the prediction box; Indicates the center point of the real box; (x d ,y d ) represents the center point of the prediction box.
[0061] The CI oU loss function used by the YOLOv8n network in the prediction box regression can describe the regression state of the prediction box, but it lacks adaptive adjustment function for different detection tasks and has relatively weak generalization ability. In order to enhance the detection performance of the YOLOv8n network, accelerate the prediction box regression, and improve the generalization ability, auxiliary bounding boxes are further introduced for loss calculation. That is, for high I oU samples, small auxiliary bounding boxes are used for loss calculation to improve the convergence speed. For low I oU samples, large auxiliary bounding boxes are used for loss calculation.
[0062] In the step S3, the YOLOv8n network is constructed based on a receptive-field convolutional attention module (RFCBAMConv), an inverted residual attention module (i RMB), and a slice-assisted super-inference algorithm.
[0063] The receptive field convolution attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability;
[0064] The receptive field convolutional attention module is the basis of RFCBAMConv. As a lightweight attention module, the receptive field convolutional attention module is mainly composed of independently running channel attention modules (CAM, Channel Attention Module) and spatial attention modules (SAM, Spatial Attention Module); among them, the channel attention module is responsible for paying attention to the key information in the image, and the spatial attention module is responsible for paying attention to the position information of fresh tea leaves. In the CAM stage, the convolutional block attention module calculates the maximum eigenvalue and average eigenvalue of the input feature map through the parallel MaxPool layer and AvgPool layer, uses the Share MLP module to compress and expand the number of channels, and uses the ReLU activation function to obtain two activated results. Finally, the activation results are added element by element, processed by the Sigmoid activation function, and then multiplied with the original image to ensure that the channel dimension remains unchanged. In the SAM stage, CBAM generates two feature maps through the MaxPool layer and the AvgPool layer respectively, which are concatenated and processed through the convolution layer to generate spatial attention weights, which are processed through the Sigmoid activation function and then multiplied with the original image to restore (C: number of channels, H: height, W: width).
[0065] In specific implementation, SE (Squeeze-and-Excitation Networks) can be used to replace the channel attention module in the receptive field convolution attention module to reduce the amount of calculation; K with a step size of K is used. 2 The convolution operation extracts feature information and performs weighted calculations on channel and spatial attention to further enhance RFCBAMConv’s attention to the spatial features of the receptive field.
[0066] The reverse residual attention module is used to improve the receptive field and downstream task processing capabilities of the picking time prediction model;
[0067] The reverse residual attention module only contains basic deep convolution and expanded window multi-head self-attention (EW-MHSA); the reverse residual attention module not only has the static short-range modeling capability of CNN and the dynamic long-range feature interaction capability of Transformer, but also can enhance the receptive field of the YOLOv8n network and improve the ability to handle downstream tasks.
[0068] Compared with the Meta mobile module (MMB), the reverse residual attention module is changed to a series of extended window multi-head self-attention and deep convolution (DW-Conv) operations. Compared with the original multi-head self-attention (MHSA), the parameters Q and K in the extended window multi-head self-attention both use the image input X, and the parameter V uses the expanded Xe. This series connection method can enhance the receptive field expansion speed of the YOLOv8n network to a certain extent.
[0069] The slice-assisted hyper-inference algorithm is used to improve the recognition capability of the picking time prediction model for long-distance targets and small targets.
[0070] In the process of fresh tea grading and identification, it is difficult to accurately identify and locate long-distance targets and small targets only by improving the YOLOv8n network, so the slice-assisted hyper-inference algorithm is further integrated. Compared with the direct recognition of the YOLOv8n network, the slice-assisted hyper-inference algorithm first processes the tea image into multiple slices (the number of slices can be set), performs target detection on each slice separately, and then restores the slice; for overlapping detection frames, the slice-assisted hyper-inference algorithm can directly perform intelligent merging during the splicing process to ensure the accuracy of the recognition results; in addition, after integrating the slice-assisted hyper-inference algorithm, the model can achieve memory optimization through image decomposition, reducing the hardware requirements of the model.
[0071] The step S4 is specifically as follows:
[0072] The picking time prediction model is trained by using the training set until the loss value of the loss function is less than a preset loss threshold;
[0073] The trained picking time prediction model is tested by the test set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the training set is expanded to continue training; if yes, then:
[0074] The tested picking time prediction model is verified by the verification set to determine whether the confidence is greater than a preset confidence threshold. If not, the training set is expanded to continue training; if yes, the training is terminated.
[0075] In step S4, during the training process of the picking time prediction model, hyperparameters including at least random deactivation rate, weight decay rate and learning rate are continuously optimized.
[0076] The step S5 is specifically as follows:
[0077] A user interface for calling the verified picking time prediction model is created through Grad io, an input tea image to be predicted is obtained through the user interface, and the tea image to be predicted is input into the picking time prediction model to predict the tea picking time.
[0078] In order to reduce the difficulty of operating the picking time prediction model and allow users to easily input data, select models, and view the prediction results of the picking time prediction model, Grad io is used to build and deploy the visual recognition system, that is, to create a user interface for calling the picking time prediction model.
[0079] In summary, the advantages of the present invention are:
[0080] 1. A large number of tea images are collected and annotated, and a data set is constructed after image expansion preprocessing. The data set is divided into training set, test set and verification set. Then a picking time prediction model is created based on the YOLOv8n network, and the loss function of the picking time prediction model is set. The picking time prediction model is trained with the training set, and the trained picking time prediction model is tested with the test set. The tested picking time prediction model is verified with the verification set, and finally the tea picking time is predicted with the verified picking time prediction model. Since the YOLOv8n network is based on the receptive field convolution attention module, the reverse residual attention module, and the slice-assisted super-inference algorithm, the tea picking time prediction model is used to predict the tea picking time. The method is constructed; the receptive field convolutional attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability; the reverse residual attention module is used to improve the receptive field and downstream task processing ability of the picking time prediction model; the slice-assisted super-inference algorithm is used to improve the recognition ability of the picking time prediction model for long-distance targets and small targets; that is, the traditional YOLOv8n network is improved, and an auxiliary bounding box is introduced into the loss function to improve the convergence speed, recognition accuracy, generalization ability, long-distance target recognition ability, and small target recognition ability of the picking time prediction model, thereby greatly improving the accuracy and efficiency of tea picking time prediction.
[0081] 2. By collecting tea images with different shooting angles, lighting intensities and tea types, and performing brightness adjustment, contrast adjustment and scaling operations on each tea image, the sample size of tea images is greatly expanded, thereby greatly improving the generalization ability of the picking time prediction model.
[0082] 3. By continuously optimizing the hyperparameters including at least the random deactivation rate, weight decay rate and learning rate during the training process of the picking time prediction model, the prediction accuracy of the picking time prediction model is greatly improved.
[0083] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A tea picking time prediction method based on deep learning, characterized in that: The steps include: Step S1, collecting a large number of tea leaves images, annotating each tea leaf image and performing image expansion preprocessing to construct a data set; Step S2, dividing the data set into a training set, a test set and a validation set; Step S3: creating a picking time prediction model based on the YOLOv8n network, and setting a loss function of the picking time prediction model; Step S4, training the picking time prediction model by using the training set, testing the trained picking time prediction model by using the test set, and verifying the tested picking time prediction model by using the verification set; Step S5: predicting the tea picking time by using the verified picking time prediction model.
2. A tea picking time prediction method based on deep learning as claimed in claim 1, characterized in that: In step S1, the tea image includes different shooting angles, lighting intensities and tea types; the shooting angle is front, overhead, upward, side or overall; the lighting intensity is low illumination, medium illumination or high illumination; the tea type is single bud, one bud and one leaf or one bud and two leaves.
3. The tea picking time prediction method based on deep learning as claimed in claim 1, characterized in that: In step S1, the steps of labeling each tea image and preprocessing the image expansion to construct a data set are specifically as follows: Through Make Sense, the tea area, tea type, tea maturity, and picking time of each tea image are annotated, and brightness adjustment, contrast adjustment, and scaling image expansion operations are performed on each annotated tea image, and a data set is constructed based on each tea image after image expansion.
4. The tea picking time prediction method based on deep learning as claimed in claim 1, characterized in that: The step S2 is specifically as follows: The dataset is divided into training set, test set and validation set in a ratio of 7:2:
1.
5. The tea picking time prediction method based on deep learning according to claim 1, characterized in that: In step S3, the formula of the loss function is: union=(w gt *h gt )*(ratio) 2 +(w*h)*(ratio) 2 -inter; Among them, L Inner-CIoU Represents the loss value of the loss function; ρ 2 (c,c gt ) represents the Euclidean distance between the center points of the predicted box and the true box; d represents the diagonal distance of the minimum closed bounding box containing the predicted box and the true box; α represents the balance parameter; v represents the aspect ratio consistency measurement coefficient; inter represents the overlapping area of the predicted box and the true box; union represents the union area of the predicted box and the true box; represents the scale-optimized width of the real box inside the auxiliary bounding box; c r Indicates the width of the real box inside the auxiliary bounding box; represents the scale-optimized height of the real box inside the auxiliary bounding box; c l Indicates the height of the real box inside the auxiliary bounding box; represents the scale-optimized width of the prediction box inside the auxiliary bounding box; c b Indicates the width of the prediction box inside the auxiliary bounding box; represents the scale-optimized height of the prediction box inside the auxiliary bounding box; c t Indicates the height of the prediction box inside the auxiliary bounding box; w gt Indicates the width of the real box; h gt Represents the height of the real box; ratio represents the scaling factor; w represents the width of the predicted box; h represents the height of the predicted box; Indicates the center point of the real box; (x d ,y d ) represents the center point of the prediction box.
6. The tea picking time prediction method based on deep learning according to claim 1, characterized in that: In step S3, the YOLOv8n network is constructed based on a receptive field convolutional attention module, a reverse residual attention module, and a slice-assisted hyper-inference algorithm.
7. The tea picking time prediction method based on deep learning as claimed in claim 6, characterized in that: The receptive field convolution attention module is used to improve the attention of the picking time prediction model to fresh tea leaves, suppress irrelevant background noise, and enhance recognition accuracy and generalization ability; The reverse residual attention module is used to improve the receptive field and downstream task processing capabilities of the picking time prediction model; The slice-assisted hyper-inference algorithm is used to improve the recognition capability of the picking time prediction model for long-distance targets and small targets.
8. The tea picking time prediction method based on deep learning according to claim 1, characterized in that: The step S4 is specifically as follows: The picking time prediction model is trained by using the training set until the loss value of the loss function is less than a preset loss threshold; The trained picking time prediction model is tested by the test set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the training set is expanded to continue training; if yes, then: The tested picking time prediction model is verified by the verification set to determine whether the confidence is greater than a preset confidence threshold. If not, the training set is expanded to continue training; if yes, the training is terminated.
9. The tea picking time prediction method based on deep learning according to claim 1, characterized in that: In step S4, during the training process of the picking time prediction model, hyperparameters including at least random deactivation rate, weight decay rate and learning rate are continuously optimized.
10. The tea picking time prediction method based on deep learning according to claim 1, characterized in that: The step S5 is specifically as follows: A user interface for calling the verified picking time prediction model is created through Gradio, an input tea image to be predicted is obtained through the user interface, and the tea image to be predicted is input into the picking time prediction model to predict the tea picking time.
Citation Information
Cited By
Tunnel equipment control method and system based on AI
CN120178771A
