Hybrid rice sowing strip forming property evaluation method, device, equipment and medium

Through the improved YOLOv8n model, the PConv module and ECA channel attention mechanism are used to target detection of the seedling pan sowing area, solving the problem of strong subjectivity of artificial visual inspection, and achieving more accurate sowing stripe evaluation and sowing quality control .

CN119295940AActive Publication Date: 2025-01-10SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411402829.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-10
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In the prior art, the evaluation of the mechanized seedling sowing of hybrid rice mainly relies on artificial visual inspection methods, which is highly subjective and difficult to achieve objective evaluation and real-time feedback.

Method used

Using the improved YOLOv8n model, by replacing the Conv module with the PConv module and introducing the ECA channel attention mechanism in the neck network, the image of the seedling tray seed area was subjected to object detection and the pass rate was calculated to evaluate the seedling tray.

Benefits of technology

It improves the accuracy and robustness of sowing stripe evaluation, reduces artificial subjectivity, and can more accurately identify and calculate the number of rice sprouts that meet the standards to ensure sowing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295940A_ABST
    Figure CN119295940A_ABST
Patent Text Reader

Abstract

The invention relates to a hybrid rice sowing strip forming performance evaluation method, device and equipment and a medium, and the method comprises the steps: in a C2f structure in a backbone network of an original YOLOv8n model, replacing a Conv module in a Bottleneck structure with a PConv module to determine a PConvC2f structure, and adding an ECA channel attention mechanism before up-sampling operation of a neck network to construct an improved YOLOv8n model; adopting an improved YOLOv8n model trained to a convergence state to carry out target detection on the seedling tray seeding area image so as to determine coordinate information and types of rice bud seeds in the seedling tray seeding area, and determining the quantity of the rice bud seeds in a strip qualified area in the seedling tray seeding area image according to the coordinate information; calculating and determining the ratio of the quantity of the rice bud seeds corresponding to the qualified strip forming area to the total quantity of the rice bud seeds in the seedling tray sowing area, and taking the ratio as the seedling tray sowing strip forming percent of pass. According to the method, the detection precision and robustness of the rice bud seeds in the seedling tray seeding area can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of agricultural production, and in particular to a method for evaluating the striping of hybrid rice sowing, a corresponding device, an electronic device and a computer-readable storage medium. Background Art

[0002] Hybrid rice is an important food crop, accounting for more than 50% of China's rice planting area. Mechanized transplanting of hybrid rice blanket seedlings is one of the important ways of mechanized production of hybrid rice.

[0003] Hybrid rice seedling raising with low seeding rate is a seedling raising technology based on seedling raising line. It is one of the important research contents to solve the problem of mechanized transplanting of hybrid rice. The characteristic of low seeding rate seedling raising with low seeding rate is to cultivate strong seedlings with less seeding rate according to the agronomic requirements of hybrid rice. In the process of low seeding rate seedling raising with low seeding rate, the goal of hybrid rice seedling raising with low seeding rate is to achieve uniform arrangement of hybrid rice buds in strips in the seedling tray. Among them, the sowing strip is an important evaluation index of mechanized sowing quality.

[0004] At present, the evaluation of hybrid rice mechanized seedling sowing strips mainly adopts manual visual inspection, which is highly subjective. It is urgent to realize the objective evaluation of sowing strips and timely feedback the sowing quality information to the seeder performance control system to provide data support for the seeder control. Therefore, the research on sowing strip evaluation technology is of great significance.

[0005] In summary, the existing technology for evaluating the strip formation of mechanized hybrid rice seedling raising and sowing mainly adopts manual visual inspection, which has strong subjectivity and other problems. The applicant has made corresponding explorations to solve this problem. Summary of the invention

[0006] The purpose of the present application is to solve the above-mentioned problem and to provide a method for evaluating the striping of hybrid rice, 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 hybrid rice striping evaluation method proposed to meet one of the purposes of this application comprises:

[0009] In response to the hybrid rice sowing strip evaluation instruction, an image of a seedling tray sowing area containing rice sprouts is obtained;

[0010] In the C2f structure in the backbone network of the original YOLOv8n model, which contains multiple Bottleneck structures, the Conv module in the Bottleneck structure is replaced with a PConv module to determine the PConv_C2f structure, and the ECA channel attention mechanism is added before the upsampling operation of the neck network to build an improved YOLOv8n model;

[0011] Using the improved YOLOv8n model that has been trained to a convergent state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information;

[0012] The ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seeding tray sowing area is calculated and determined, and the ratio is used as the qualified rate of seeding tray sowing strips to complete the evaluation of hybrid rice sowing strips.

[0013] Optionally, the backbone network in the improved YOLOv8n model includes 5 Conv modules, 4 PConv_C2f structures and 1 SPPF structure;

[0014] The neck network in the improved YOLOv8n model includes 3 Concat operations, 2 Upsample upsampling operations, 4 PConv_C2f structures, 2 Conv modules and 2 ECA attention mechanism modules;

[0015] The head network in the improved YOLOv8n model adopts a decoupled head structure.

[0016] Optionally, the ECA channel attention mechanism calculates weight values ​​of different channels by means of one-dimensional convolution, multiplies the weight value and the input feature map, and assigns different weights to the input feature map channels, so that the network can focus on key channel information.

[0017] Optionally, the improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes:

[0018] The pre-processed seedling tray sowing area image is input into the improved YOLOv8n model that has been trained to convergence state, and multi-level feature maps are extracted through multiple convolutions and PConv_C2f structures of the backbone network;

[0019] Through the Concat operation, feature maps of different levels are spliced ​​to merge high-level semantic information with low-level detail information. The ECA channel attention mechanism is applied to the spliced ​​feature maps to enhance the model's response to important features and suppress noise and irrelevant features.

[0020] The processed feature map is input into the decoupling head structure, and the model classifies and locates rice sprouts, outputting the category and bounding box coordinates of each detected rice sprout;

[0021] Extracting the coordinate information of the rice sprout from the model output, wherein the coordinate information represents the specific position of the rice sprout in the seeding area of ​​the rice tray;

[0022] According to the coordinate information of the rice sprouts and the preset qualified strip forming area, the number of the rice sprouts in the qualified strip forming area is counted.

[0023] Optionally, the improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes:

[0024] Divide the bottom soil of the seedling tray corresponding to the seeding area of ​​the seedling tray into 18 rows, wherein the center line of each row is the center line of the seed furrow;

[0025] In the sowing area of ​​each row, taking the center line of the seed furrow as the reference, select the area covering two-thirds on both sides of the center line of the seed furrow as the qualified strip area;

[0026] If two-thirds of the volume of a certain rice sprout seed falls within the qualified strip forming area, the rice sprout seed is deemed to fall within the qualified strip forming area, and the number of rice sprout seeds falling within the qualified strip forming area is counted according to the defined qualified strip forming area to determine the number of rice sprout seeds corresponding to the qualified strip forming area;

[0027] The total number of all rice sprouts in the seedling tray sowing area is counted to determine the total number of rice sprouts in the seedling tray sowing area.

[0028] Optional steps to train a modified YOLOv8n model include:

[0029] Collecting images of seedling tray sowing areas containing rice sprout seeds in a sowing experiment, and adjusting and segmenting the images of the seedling tray sowing areas using an image preprocessing algorithm to determine training sample sub-area images, wherein the image preprocessing algorithm includes an edge detection algorithm, a vertical projection algorithm, and a sliding window algorithm;

[0030] The training sample sub-region images are annotated to construct a seedling tray sowing region image dataset containing rice sprout seeds, and the dataset is further expanded by data enhancement, and the dataset is randomly divided into a training set, a validation set, and a test set in proportion;

[0031] The training set is input into a preset improved YOLOv8n model for training to determine an improved YOLOv8n model that has been trained to a convergence state.

[0032] Optionally, the step of calculating and determining the ratio between the number of rice sprout seeds corresponding to the qualified strip-forming area and the total number of rice sprout seeds in the seeding tray sowing area, and taking the ratio as the qualified rate of strip-forming by seeding tray sowing, comprises:

[0033] It is detected whether the qualified rate of sowing strips of the seedling tray exceeds a preset qualified rate threshold. If it exceeds, the seedling tray corresponding to the sowing area of ​​the seedling tray is used as a qualified sowing seedling tray to complete the evaluation of the sowing strips of hybrid rice.

[0034] A hybrid rice sowing strip evaluation device provided for another purpose of the present application comprises:

[0035] An image acquisition module is configured to respond to a hybrid rice sowing strip evaluation instruction and acquire an image of a seedling tray sowing area containing rice sprouts;

[0036] Model building module, in the C2f structure in the backbone network of the original YOLOv8n model, which contains multiple Bottleneck structures, replaces the Conv module in the Bottleneck structure with the PConv module to determine the PConv_C2f structure, and adds the ECA channel attention mechanism before the upsampling operation of the neck network to build an improved YOLOv8n model;

[0037] A seed sprout quantity determination module is configured to use an improved YOLOv8n model that has been trained to a convergence state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice seed sprouts in the seedling tray sowing area, and determine the number of rice seed sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information;

[0038] The strip formation evaluation module is configured to calculate and determine the ratio between the number of rice sprouts corresponding to the strip formation qualified area and the total number of rice sprouts in the seeding tray sowing area, and use the ratio as the seeding tray sowing strip formation qualified rate to complete the hybrid rice sowing strip formation evaluation.

[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 hybrid rice sowing strip evaluation 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 hybrid rice sowing strip evaluation 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 at the problems that the evaluation of the strip formation of mechanized hybrid rice seedling raising and sowing in the prior art mainly adopts the manual visual inspection method and has strong subjectivity. The present application includes but is not limited to the following beneficial effects:

[0042] First, the image preprocessing algorithm used in this application rotates and positions the collected image of the seedling tray sowing area containing rice sprout seeds through edge detection and vertical projection algorithms, thereby solving the problem of the seedling tray border being non-parallel to the image edge line and the difficulty in locating the detection area.

[0043] Secondly, the present application uses a sliding window algorithm to segment the training sample image using a fixed-size window, obtains sub-region images of the detection area and annotates them, thereby solving the problem of data set production;

[0044] Third, the improved YOLOv8n model has higher accuracy in detecting rice sprouts, especially when dealing with partial occlusion or complex backgrounds. The application of the PConv module can effectively improve the recognition rate of rice sprouts; the ECA channel attention mechanism can improve the model's sensitivity to important features, thereby improving the positioning accuracy of rice sprouts. This is particularly important for evaluating the striping of sowing, because the evaluation of striping depends on the accurate location and classification of the sprouts; replacing the Conv module with the PConv module improves the robustness of the model, can effectively cope with environmental changes and sample diversity, and reduce detection errors caused by inconsistent data; by accurately determining the coordinates of the rice sprouts, the improved model can better identify the qualified striping area, thereby more accurately calculating the number of rice sprouts that meet the standards. This is crucial for sowing quality control.

[0045] Furthermore, by replacing the Conv module in the YOLOv8n model with the PConv module and introducing the ECA channel attention mechanism in the neck network, the detection accuracy and robustness of rice sprouts in the seeding area of ​​the seedling tray can be significantly improved. These improvements help to more accurately evaluate the striping of rice seeding and ensure the quality of seeding, thereby providing more reliable technical support for agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] 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:

[0047] Figure 1 This is a schematic diagram of the process of the hybrid rice sowing strip evaluation method in the embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of an image of a seedling tray sowing area containing rice sprout seeds collected in a sowing test in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the improved YOLOv8n model structure in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of the PConv_C2f structure in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of the PC_Bottleneck structure in an embodiment of the present application;

[0052] Figure 6 A schematic diagram of the training results of the improved YOLOv8n model in the embodiment of the present application;

[0053] Figure 7 This is a principle block diagram of a hybrid rice sowing strip evaluation device in an embodiment of the present application;

[0054] Figure 8 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0055] 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.

[0056] 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.

[0057] 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.

[0058] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on 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 Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including 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 suitable for 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, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] See also Figure 1 as well as Figure 2 In one embodiment, the hybrid rice sowing strip evaluation method of the present application comprises:

[0067] Step S10, responding to the hybrid rice sowing strip evaluation instruction, acquiring an image of the seedling tray sowing area containing rice sprouts;

[0068] The hybrid rice sowing strip evaluation system in the terminal device can respond to the hybrid rice sowing strip evaluation instruction and obtain the seedling tray sowing area image containing the rice sprout seeds;

[0069] The type and source of the seedling tray sowing area image depend on the actual application scenario. For example, in the application scenario of seedling tray sowing, the seedling tray sowing area image can be a static picture specified by the user, or it can be an image of the seedling tray sowing area submitted by the onboard camera of the drone to the hybrid rice sowing strip evaluation system in the terminal device, and so on. Depending on the specific application scenario, the seedling tray sowing area image can be determined as needed.

[0070] In some embodiments, the qualified strip-forming area refers to the area within the seedling tray sowing area that has been inspected and evaluated and meets specific standards and requirements. Only the areas that meet these standards are recognized as qualified strip-forming areas.

[0071] In some embodiments, seeding in seedling trays is a commonly used seedling raising technology, which is widely used in various crops, especially rice, vegetables and flowers, etc. Seeding in seedling trays can effectively improve the success rate of seedling raising, reduce labor costs and improve the growth of plants.

[0072] Step S20, in the C2f structure in the backbone network of the original YOLOv8n model, which includes multiple Bottleneck structures, the Conv module in the Bottleneck structure is replaced with a PConv module to determine the PConv_C2f structure, and an ECA channel attention mechanism is added before the upsampling operation of the neck network to construct an improved YOLOv8n model;

[0073] After obtaining the image of the seedling tray sowing area containing rice sprout seeds, in the C2f structure in the backbone network of the original YOLOv8n model, which contains multiple Bottleneck structures, the Conv module in the Bottleneck structure is replaced with the PConv module to determine the PConv_C2f structure, and the ECA channel attention mechanism is added before the upsampling operation of the neck network to construct an improved YOLOv8n model;

[0074] Furthermore, the backbone network in the improved YOLOv8n model includes 5 Conv modules, 4 PConv_C2f structures and 1 SPPF structure; the neck network in the improved YOLOv8n model includes 3 Concat operations, 2 Upsample upsampling operations, 4 PConv_C2f structures, 2 Conv modules and 2 ECA attention mechanism modules; the head network in the improved YOLOv8n model adopts a decoupled head structure. The ECA channel attention mechanism calculates the weight values ​​of different channels by one-dimensional convolution, multiplies the weight value and the input feature map, and assigns different weights to the input feature map channels, so that the network can focus on key channel information.

[0075] The steps to train the improved YOLOv8n model include:

[0076] Step S201, collecting images of seedling tray sowing areas containing rice sprouts in a sowing test, and adjusting and segmenting the images of the seedling tray sowing areas using an image preprocessing algorithm to determine training sample sub-area images, wherein the image preprocessing algorithm includes an edge detection algorithm, a vertical projection algorithm, and a sliding window algorithm;

[0077] Step S202, annotating the training sample sub-region images, constructing a seedling tray sowing region image dataset containing rice sprout seeds, further expanding the dataset by using data enhancement, and randomly dividing the dataset into a training set, a validation set, and a test set in proportion;

[0078] Step S203: input the training set into a preset improved YOLOv8n model for training to determine an improved YOLOv8n model that has been trained to a convergence state.

[0079] Through sowing experiments, images of the sowing area of ​​the seedling tray containing rice sprouts were collected, and images with poor quality were removed. The training samples were adjusted and segmented using an image preprocessing algorithm, and divided into training samples and application samples; the segmented sub-images were annotated, and a rice sprout area image dataset was constructed. The data set was further expanded using the data enhancement method, and the dataset was randomly divided into training set, validation set and test set in proportion; the image dataset of the sowing area of ​​the seedling tray containing rice sprouts was input into the improved YOLOv8n model, and a model with optimal performance was obtained after training; the test set in the dataset was input into the model with optimal performance, and the detection performance of the network was tested to determine the improved YOLOv8n model that has been trained to convergence.

[0080] For further information, see Figure 6,The model test is to input 1042 sub-region images into the ,optimal model for testing, and use multiple indicators such as precision (P), recall (R), ,parameters, floating-point operations (FLOPs), model size, mean average precision (mAP) and ,frames per second (FPS) to comprehensively evaluate the performance of the ,model to ensure the reliability of the recognition results.

[0081] The model test results are shown in Table 1. Compared with the YOLOv8n model, the improved YOLOv8n model has an increase of 3.2 percentage points in precision, 3.1 percentage points in recall, 0.89M fewer parameters, 2.2G fewer floating-point operations, 1.78MB fewer model sizes, 1.5 percentage points more mAP, and 8 frames / s more FPS. -1 .

[0082] Table 1 Comparison of model test results

[0083]

[0084] Furthermore, the strip-forming evaluation of the application samples is to divide the 90 application sample seedling tray sowing area images into sub-area images through a sliding window of size 244×281, and use the optimal model to detect the sub-area images. According to the rice sprout detection coordinate information given by the model, if the given rice sprout center coordinates fall into the strip-forming qualified area, it means that the rice sprout belongs to the strip-forming qualified area; according to the above requirements, all sub-area images are traversed, and the total number of rice sprouts that meet the requirements is counted, and then the number of rice sprouts in the strip-forming qualified area in each frame of the seedling tray sowing area image is obtained, and the seedling tray sowing strip passing rate is calculated according to the number of rice sprouts in the strip-forming qualified area and the total number of rice sprouts in the seedling tray sowing area image.

[0085] In some embodiments, the sowing test uses hybrid rice Taifengyou 208, and uses a 2ZSB-500 rice seedling tray precision sowing and seedling raising production line developed by a certain university to conduct the sowing test. The sowing test includes three sowing methods: broadcasting, row sowing and furrow row sowing, three sowing amounts of 50g, 60g and 70g, and a total of 9 sowing types. A total of 2680 images of seedling tray sowing areas containing rice sprout seeds were collected, including 2590 training samples and 90 application samples, and the image resolution size was 2268×4032.

[0086] In some embodiments, the image preprocessing algorithm adjusts and segments the training samples and the application samples, and the image preprocessing algorithms used include edge detection algorithm, vertical projection algorithm and sliding window algorithm. Among them, the edge detection algorithm is composed of Hough and Cannoy algorithms, which are used for edge detection of the rice seedling tray frame; the vertical projection method binarizes the rice seedling tray sowing area image containing rice sprouts to obtain a binary image, locates the detection area according to the distribution law of the gray value of the binary image, and adjusts the resolution of the detection area image to 4500×2200 to obtain the detection area image; in order for the model to adapt to sub-area images of different resolution sizes and improve the generalization ability of the model, in the sliding window algorithm, windows of different sizes are designed to traverse the training sample images, and the window sizes are 123×113, 184×161 and 244×281 respectively, and a total of (720+336+144)*3=3600 training sample sub-area images are obtained through traversal.

[0087] In some embodiments, the LabelImg standard software is used to label the rice sprouts in the training sample sub-region image, the label is named 'seed', and a corresponding txt label file is generated; the training sample data set is expanded by a data enhancement method, and the data enhancement method mainly includes counterclockwise rotation, clockwise rotation, noise addition, horizontal flipping, vertical flipping, deformation scaling, and random scaling of the width and height of the sub-region image within a reasonable range. After expansion, the data set is randomly divided into 7:2:1, that is, 7294 training sets, 2085 validation sets, and 1042 test sets.

[0088] In some embodiments, see Figures 3 to 5 , Figure 3 Schematic diagram of the improved YOLOv8n model structure in the embodiment; Figure 4 Schematic diagram of PConv_C2f structure in this embodiment; Figure 5 Schematic diagram of the PC_Bottleneck structure in this embodiment;

[0089] The improved YOLOv8n model includes an input, a backbone network, a neck network, and a head network, specifically including:

[0090] 1) Input: Use Mosaic data enhancement technology to stitch together different regions of multiple sub-region images; use adaptive anchor frame calculation method to dynamically adjust the anchor frame according to the shape and size of the target; optimize image quality by adjusting grayscale filling;

[0091] 2) Backbone network: The backbone network is mainly used to extract image feature information and pass feature information of different scales to the Neck network, including 5 Conv modules, 4 PConv_C2f structures and 1 SPPF structure. Among them, the Conv module of the C2f structure of the original YOLOv8n model is replaced by a PConv module, named PConv_C2f structure; the PConv_C2f structure uses the PConv module to replace the Conv module. The floating-point operation volume FLOPs of the PConv module is h×w×k2×cp2, where h and w are the width and height of the feature map, k is the size of the convolution kernel, and cp is the number of channels for convolution. Because the number of cp channels of PConv is only 1 / 4 of that of Conv, the floating-point operation volume of the PConv module is 1 / 4 of that of the Conv module. Replacing the C2f structure with the PConv_C2f structure can reduce a lot of redundant calculations in the network.

[0092] 3) Neck network: The neck network is mainly used for feature fusion of different depths and scales to enhance the expressiveness of features. It includes 3 Concat operations, 2 Upsample upsampling operations, 4 PConv_C2f structures, 2 Conv modules and 2 ECA attention mechanism modules, where ECA is a channel attention mechanism, which is added before the upsampling operation as the input of the upsampling operation. The ECA channel attention mechanism calculates the weight values ​​of different channels by one-dimensional convolution, multiplies the weight value by the input feature map, and assigns different weights to the input feature map channels, so that the network has the ability to focus on key channel information. Its formula is as follows:

[0093] ω=σ(C1Dk(y)),

[0094] Among them, C1D represents one-dimensional convolution, k represents the size of the convolution kernel, σ represents the Sigmoid activation function, and ω represents the weight value.

[0095] 4) Head network: The head network adopts a decoupled head structure to separate the classification task and the detection task. The loss function includes the regression loss function and the classification loss function. The classification loss is calculated using BCE Loss, and the regression loss is calculated using DFLoss and CIoU Loss.

[0096] The CIoU calculation formula is as follows:

[0097]

[0098] Among them, (x, y) represents the center coordinates, (x gt ,y gt ) represents the center coordinate of the real box, W g , H gThey represent the width and height of the minimum bounding rectangle of the real box and the predicted box respectively, α represents the weight function, which is used to balance the parameters, and v is the aspect ratio, which is used to measure the consistency of the height ratio.

[0099] In some embodiments, the model training environment is a Windows 10 operating system, and training is performed under the deep learning PyTorch framework. YOLOv8n.pt is selected as the pre-trained weight, and the training parameter epoch is set to 200, and the batch size is set to 12. The constructed rice sprout dataset is input into the improved YOLOv8n model. After training for 200 epochs, the loss function tends to converge, and the accuracy of the model in detecting rice sprouts reaches the highest, and the training weight of the optimal model is saved.

[0100] Step S30, using the improved YOLOv8n model that has been trained to a convergent state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information;

[0101] After the improved YOLOv8n model is constructed, the improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image is determined according to the coordinate information;

[0102] Further, the improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes:

[0103] Step S301, dividing the bottom soil of the seedling tray corresponding to the seeding area of ​​the seedling tray into 18 rows, wherein the center line of each row is the center line of the seed furrow;

[0104] Step S302: In the sowing area of ​​each row, taking the center line of the seed furrow as a reference, select two-thirds of the area on both sides of the center line of the seed furrow as qualified strip areas;

[0105] Step S303: if two-thirds of the volume of a certain rice sprout seed falls within the qualified strip forming area, the rice sprout seed is deemed to fall within the qualified strip forming area, and according to the defined qualified strip forming area, the number of rice sprout seeds falling within the qualified strip forming area is counted to determine the number of rice sprout seeds corresponding to the qualified strip forming area;

[0106] Step S304: Count the total number of all rice sprouts in the seeding tray sowing area to determine the total number of rice sprouts in the seeding tray sowing area.

[0107] Furthermore, the improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes:

[0108] Step S3001, input the pre-processed seedling tray sowing area image into the improved YOLOv8n model that has been trained to a convergence state, and extract a multi-level feature map through multiple convolutions and PConv_C2f structures of the backbone network;

[0109] Step S3002: Concatenate feature maps of different levels through a Concat operation to merge high-level semantic information with low-level detail information, and apply an ECA channel attention mechanism to the concatenated feature maps to enhance the model's response to important features and suppress noise and irrelevant features;

[0110] Step S3003, the processed feature map is input into the decoupling head structure, and the model classifies and locates rice sprouts, and outputs the category and bounding box coordinates of each detected rice sprout;

[0111] Step S3004, extracting the coordinate information of the rice sprout from the model output, wherein the coordinate information represents the specific position of the rice sprout in the seeding area of ​​the seedling tray;

[0112] Step S3005: counting the number of rice sprouts in the qualified strip-forming area according to the coordinate information of the rice sprouts and the preset qualified strip-forming area.

[0113] From the above steps, we can see that the improved YOLOv8n model can effectively detect the number of rice sprouts in qualified areas and realize efficient agricultural production monitoring. It not only improves the accuracy of target detection, but also enhances the model's adaptability to complex scenarios through the introduction of ECA attention mechanism and PConv module, providing reliable technical support for intelligent management in the agricultural field.

[0114] Step S40, calculating and determining the ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seeding tray sowing area, and taking the ratio as the seeding tray sowing strip-forming qualified rate to complete the hybrid rice sowing strip-forming evaluation.

[0115] The improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area. After determining the number of rice sprouts corresponding to the qualified strip-forming area in the seedling tray sowing area image according to the coordinate information, the ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seedling tray sowing area is calculated and determined. The ratio is used as the seedling tray sowing strip-forming qualified rate to complete the evaluation of hybrid rice sowing strips.

[0116] Further, the step of calculating and determining the ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seeding tray sowing area, and taking the ratio as the qualified rate of seeding tray sowing strips comprises:

[0117] It is detected whether the qualified rate of sowing strips of the seedling tray exceeds a preset qualified rate threshold. If it exceeds, the seedling tray corresponding to the sowing area of ​​the seedling tray is used as a qualified sowing seedling tray to complete the evaluation of the sowing strips of hybrid rice.

[0118] Compared with the prior art, the present application aims at the problems that the evaluation of the strip formation of mechanized hybrid rice seedling raising and sowing in the prior art mainly adopts the manual visual inspection method and has strong subjectivity. The present application includes but is not limited to the following beneficial effects:

[0119] First, the image preprocessing algorithm used in this application rotates and positions the collected image of the seedling tray sowing area containing rice sprout seeds through edge detection and vertical projection algorithms, thereby solving the problem of the seedling tray border being non-parallel to the image edge line and the difficulty in locating the detection area.

[0120] Secondly, the present application uses a sliding window algorithm to segment the training sample image using a fixed-size window, obtains sub-region images of the detection area and annotates them, thereby solving the problem of data set production;

[0121] Third, the improved YOLOv8n model has higher accuracy in detecting rice sprouts, especially when dealing with partial occlusion or complex backgrounds. The application of the PConv module can effectively improve the recognition rate of rice sprouts; the ECA channel attention mechanism can improve the model's sensitivity to important features, thereby improving the positioning accuracy of rice sprouts. This is particularly important for evaluating the striping of sowing, because the evaluation of striping depends on the accurate location and classification of the sprouts; replacing the Conv module with the PConv module improves the robustness of the model, can effectively cope with environmental changes and sample diversity, and reduce detection errors caused by inconsistent data; by accurately determining the coordinates of the rice sprouts, the improved model can better identify the qualified striping area, thereby more accurately calculating the number of rice sprouts that meet the standards. This is crucial for sowing quality control.

[0122] Furthermore, by replacing the Conv module in the YOLOv8n model with the PConv module and introducing the ECA channel attention mechanism in the neck network, the detection accuracy and robustness of rice sprouts in the seeding area of ​​the seedling tray can be significantly improved. These improvements help to more accurately evaluate the striping of rice seeding and ensure the quality of seeding, thereby providing more reliable technical support for agricultural production.

[0123] See also Figure 7 , a hybrid rice sowing strip assessment device provided to meet one of the purposes of the present application, includes an image acquisition module 1100, a model construction module 1200, a bud seed quantity determination module 1300 and a strip assessment module 1400. Among them, the image acquisition module 1100 is configured to respond to a hybrid rice sowing strip assessment instruction to obtain an image of a seedling tray sowing area containing rice bud seeds; the model construction module 1200 is configured to replace the Conv module in the Bottleneck structure with a PConv module to determine the PConv_C2f structure in the C2f structure in the backbone network of the original YOLOv8n model, and add an ECA channel attention mechanism before the upsampling operation of the neck network to construct an improved YOLOv8n model; the bud seed quantity determination module 1300 is configured to obtain an image of a seedling tray sowing area containing rice bud seeds; the model construction module 1200 is configured to replace the Conv module in the Bottleneck structure with a PConv module to determine the PConv_C2f structure, and add an ECA channel attention mechanism before the upsampling operation of the neck network to construct an improved YOLOv8n model; the bud seed quantity determination module 1300 is configured to obtain an image of a seedling tray sowing area containing rice bud seeds in a C2f structure in the backbone network of the original YOLOv8n model, and replace the Conv module in the Bottleneck structure with a PConv module to determine the PConv_C2f structure; the ECA channel attention mechanism is added before the upsampling operation of the neck network to construct an improved YOLOv8n model; the bud seed quantity determination module 1300 is configured to obtain an image of a seedling tray sowing area containing rice bud seeds; the model construction module 1200 is configured to obtain an image of a seedling tray sowing area containing rice bud seeds in a C2f structure in the backbone network of the original YOLOv8n model, and replace the Conv module in the Bottleneck structure Module 1300 is configured to use the improved YOLOv8n model that has been trained to a convergence state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and determine the number of rice sprouts corresponding to the qualified strip-forming area in the seedling tray sowing area image according to the coordinate information; the strip-forming evaluation module 1400 is configured to calculate and determine the ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seedling tray sowing area, and use the ratio as the seedling tray sowing strip-forming qualified rate to complete the evaluation of hybrid rice sowing strip-forming.

[0124] Based on any embodiment of this application, please refer to Figure 8 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 8As 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 hybrid rice sowing strip assessment method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the hybrid rice sowing strip assessment method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 8 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.

[0125] In this embodiment, the processor is used to execute Figure 7 The memory stores the program codes 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 codes and data required to execute all modules / submodules in the hybrid rice sowing strip evaluation device of the present application, and the server can call the program codes and data of the server to execute the functions of all submodules.

[0126] 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 hybrid rice sowing strip evaluation method described in any embodiment of the present application.

[0127] 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 hybrid rice sowing strip evaluation method described in any embodiment of the present application.

[0128] 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).

[0129] 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.

[0130] In summary, by replacing the Conv module in the YOLOv8n model with the PConv module and introducing the ECA channel attention mechanism in the neck network, the detection accuracy and robustness of rice sprouts in the seeding area of ​​the seedling tray can be significantly improved. These improvements help to more accurately evaluate the striping of rice sowing and ensure the quality of sowing, thereby providing more reliable technical support for agricultural production.

Claims

1. A method for evaluating the striping of hybrid rice, characterized in that: include: In response to the hybrid rice sowing strip evaluation instruction, an image of a seedling tray sowing area containing rice sprouts is obtained; In the C2f structure in the backbone network of the original YOLOv8n model, which contains multiple Bottleneck structures, the Conv module in the Bottleneck structure is replaced with a PConv module to determine the PConv_C2f structure, and the ECA channel attention mechanism is added before the upsampling operation of the neck network to build an improved YOLOv8n model; Using the improved YOLOv8n model that has been trained to a convergent state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information; The ratio between the number of rice sprouts corresponding to the qualified strip-forming area and the total number of rice sprouts in the seeding tray sowing area is calculated and determined, and the ratio is used as the qualified rate of seeding tray sowing strips to complete the evaluation of hybrid rice sowing strips.

2. The hybrid rice sowing strip evaluation method according to claim 1, characterized in that: The backbone network in the improved YOLOv8n model includes 5 Conv modules, 4 PConv_C2f structures and 1 SPPF structure; The neck network in the improved YOLOv8n model includes 3 Concat operations, 2 Upsample upsampling operations, 4 PConv_C2f structures, 2 Conv modules and 2 ECA attention mechanism modules; The head network in the improved YOLOv8n model adopts a decoupled head structure.

3. The hybrid rice sowing strip evaluation method according to claim 2, characterized in that: The ECA channel attention mechanism calculates the weight values ​​of different channels by means of one-dimensional convolution, multiplies the weight value and the input feature map, and assigns different weights to the input feature map channels, so that the network can focus on key channel information.

4. The hybrid rice sowing strip evaluation method according to claim 2, characterized in that: The improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes: The pre-processed seedling tray sowing area image is input into the improved YOLOv8n model that has been trained to convergence state, and multi-level feature maps are extracted through multiple convolutions and PConv_C2f structures of the backbone network; Through the Concat operation, feature maps of different levels are spliced ​​to merge high-level semantic information with low-level detail information. The ECA channel attention mechanism is applied to the spliced ​​feature maps to enhance the model's response to important features and suppress noise and irrelevant features. The processed feature map is input into the decoupling head structure, and the model classifies and locates rice sprouts, outputting the category and bounding box coordinates of each detected rice sprout; Extracting the coordinate information of the rice sprout from the model output, wherein the coordinate information represents the specific position of the rice sprout in the seeding area of ​​the rice tray; According to the coordinate information of the rice sprouts and the preset qualified strip forming area, the number of the rice sprouts in the qualified strip forming area is counted.

5. The hybrid rice sowing strip evaluation method according to claim 1, characterized in that: The improved YOLOv8n model that has been trained to a convergent state is used to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice sprouts in the seedling tray sowing area, and the step of determining the number of rice sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information includes: Divide the bottom soil of the seedling tray corresponding to the seeding area of ​​the seedling tray into 18 rows, wherein the center line of each row is the center line of the seed furrow; In the sowing area of ​​each row, taking the center line of the seed furrow as the reference, select the area covering two-thirds on both sides of the center line of the seed furrow as the qualified strip area; If two-thirds of the volume of a certain rice sprout seed falls within the qualified strip forming area, the rice sprout seed is deemed to fall within the qualified strip forming area, and the number of rice sprout seeds falling within the qualified strip forming area is counted according to the defined qualified strip forming area to determine the number of rice sprout seeds corresponding to the qualified strip forming area; The total number of all rice sprouts in the seedling tray sowing area is counted to determine the total number of rice sprouts in the seedling tray sowing area.

6. The hybrid rice sowing strip evaluation method according to claim 1, characterized in that: The steps to train the improved YOLOv8n model include: Collecting images of seedling tray sowing areas containing rice sprout seeds in a sowing experiment, and adjusting and segmenting the images of the seedling tray sowing areas using an image preprocessing algorithm to determine training sample sub-area images, wherein the image preprocessing algorithm includes an edge detection algorithm, a vertical projection algorithm, and a sliding window algorithm; The training sample sub-region images are annotated to construct a seedling tray sowing region image dataset containing rice sprout seeds, and the dataset is further expanded by data enhancement, and the dataset is randomly divided into a training set, a validation set, and a test set in proportion; The training set is input into a preset improved YOLOv8n model for training to determine an improved YOLOv8n model that has been trained to a convergence state.

7. The hybrid rice sowing strip evaluation method according to any one of claims 1 to 6, characterized in that: The step of calculating and determining the ratio between the number of rice sprout seeds corresponding to the qualified strip-forming area and the total number of rice sprout seeds in the seeding tray sowing area, and taking the ratio as the qualified rate of strip-forming by seeding tray sowing, comprises: It is detected whether the qualified rate of sowing strips of the seedling tray exceeds a preset qualified rate threshold. If it exceeds, the seedling tray corresponding to the sowing area of ​​the seedling tray is used as a qualified sowing seedling tray to complete the evaluation of the sowing strips of hybrid rice.

8. A hybrid rice sowing strip evaluation device, characterized in that: include: An image acquisition module is configured to respond to a hybrid rice sowing strip evaluation instruction and acquire an image of a seedling tray sowing area containing rice sprouts; The model building module is set to the C2f structure in the backbone network of the original YOLOv8n model, which contains multiple Bottleneck structures, and the Conv module in the Bottleneck structure is replaced with the PConv module to determine the PConv_C2f structure, and the ECA channel attention mechanism is added before the upsampling operation of the neck network to build an improved YOLOv8n model; A seed sprout quantity determination module is configured to use an improved YOLOv8n model that has been trained to a convergence state to perform target detection on the seedling tray sowing area image to determine the coordinate information and category of the rice seed sprouts in the seedling tray sowing area, and determine the number of rice seed sprouts corresponding to the qualified strips in the seedling tray sowing area image according to the coordinate information; The strip formation evaluation module is configured to calculate and determine the ratio between the number of rice sprouts corresponding to the strip formation qualified area and the total number of rice sprouts in the seeding tray sowing area, and use the ratio as the seeding tray sowing strip formation qualified rate to complete the hybrid rice sowing strip formation evaluation.

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

  • Dense target detection model training method based on attention mechanism

    CN115272828A

  • Improved Yolov5-crowps northeast crop disease identification method

    CN117437541A

  • Rice disease and pest detection method and system based on improved YOLOv8

    CN117710820A

  • Wheat ear detection method, device and equipment based on improved YOLOv5 and storage medium

    CN117975259A