Rice damage detection device and detection method

By designing a rice damage detection device and using optical characteristics and deep learning models to automatically detect rice, the problem of low detection efficiency of internal damage rate of rice in the existing technology has been solved, and accurate damage rate analysis of a large number of rice has been achieved.

CN114839197BActive Publication Date: 2024-08-27HUNAN AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210350465.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-02
Publication Date
2024-08-27
Estimated Expiration
2042-04-02

AI Technical Summary

Technical Problem

Existing technology is difficult to accurately detect the internal damage rate of a large number of rice. Traditional methods are inefficient and difficult to achieve continuous non-destructive testing.

Method used

A rice damage detection device is designed, including a feeding module, a sorting module, a light source module, a visual sensor module and a main control unit. The main control unit obtains image information by lining up single grains axially and using optical characteristics. The main control unit is based on depth. The learning model performs internal damage detection to achieve automated detection.

Benefits of technology

It achieves accurate detection of internal damage of a large number of rice grains, improves detection efficiency, and can automatically obtain the internal damage rate of rice grains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114839197B
    Figure CN114839197B
Patent Text Reader

Abstract

The present application relates to the technical field of rice internal damage detection, and in particular to a rice damage detection device and method, wherein the device adopts a feeding module to drive the rice to move toward a sorting module; the sorting module performs axial queuing of the rice grains, and a light hole is provided on the sorting module; a light source module emits light to the light hole; a visual sensor module obtains an image of the rice grains passing through the sorting module under the light; and a main control unit is used to detect the internal damage of the rice grains according to the image information. In this way, through the coordinated work of each module, the internal damage of the rice grains can be automatically detected, and the internal damage rate of a large number of rice grains can be accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of rice internal damage detection, and in particular to a rice damage detection device and a detection method. Background Art

[0002] Rice is one of the most important food crops in my country. In recent years, the mechanized harvesting and drying technology of rice has developed rapidly, greatly improving production efficiency. When mechanized harvesting and drying of rice is adopted, grain damage will inevitably occur. Grain damage includes external damage and internal damage. External damage mainly manifests as broken shells and broken grains, which are easier to identify and sort; internal damage mainly manifests as stress cracks inside the grains, which affects the storage of grains and the quality grade of rice after processing, especially when the grains are used as seeds, it will affect their germination rate. However, the husk of rice with internal damage is intact and difficult to directly identify. The traditional detection method is to peel the rice husk and observe it with the help of magnifying glasses, microscopes and other instruments, which is time-consuming, laborious and inefficient. With the development of science and technology, non-destructive detection of internal damage of grains has attracted the attention of scholars at home and abroad. For example, relevant literature reports that computer vision technology, Micro-CT scanning method, acoustic emission method, etc. are used to obtain internal images of grains, and then the image processing realizes the three-dimensional reconstruction of its structure and the characterization of internal damage, which provides ideas for the non-destructive detection of internal damage of rice. However, these processing methods still mainly focus on the characterization of the internal damage type of a single grain, and it is difficult to achieve continuous non-destructive detection of a large number of rice grains and obtain an accurate internal damage rate. Summary of the invention

[0003] The present application provides a rice damage detection device and a detection method to solve the problem in the prior art that it is difficult to accurately obtain the internal damage rate of a large number of rice grains when detecting rice.

[0004] In order to achieve the above objectives, the present application is implemented through the following technical solutions:

[0005] In a first aspect, the present application provides a rice damage detection device, comprising: a feeding module, a sorting module, a light source module, a visual sensor module and a main control unit, wherein the sorting module is connected to the feeding module, the light source module is arranged relatively below the sorting module, the visual sensor is arranged relatively above the sorting module, and the visual sensor and the light source module are located on the same vertical axis, and the main control unit is connected to the visual sensor;

[0006] The feeding module is used to drive the rice to move towards the sorting module;

[0007] The sorting module is used to axially arrange the rice grains individually, and a light hole is provided on the sorting module;

[0008] The light source module is used to emit light to the light hole;

[0009] The visual sensor module is used to obtain the image of the rice passing through the sorting module under the light;

[0010] The main control unit is used to detect the internal damage of the rice according to the image information.

[0011] Optionally, the feeding module includes a base, a first spring sheet group, a second spring sheet group, an electromagnetic exciter, a feed trough, an armature and a hopper, one end of the first spring sheet group is connected to the feed trough, the other end of the first spring sheet group is connected to the base, the second spring sheet group is arranged opposite to the first spring sheet group, one end of the second spring sheet group is connected to the feed trough, the other end of the second spring sheet group is connected to the base, the armature is arranged on the first spring sheet group, the electromagnetic exciter is arranged on the base, and the electromagnetic exciter is arranged opposite to the armature, the hopper is arranged on the trough and is located at one end of the trough, and the other end of the trough is connected to the sorting module.

[0012] Optionally, the sorting module includes N channels and collecting troughs arranged in parallel, N is a positive integer, the N channels are all V-shaped channels, each channel includes a first side surface and a second side surface, and an end of the first side surface close to the feeding module is provided with a first drop opening, and an end of the second side surface close to the feeding module is provided with a second drop opening, and the first drop opening and the second drop opening are both arranged in a direction away from the bottom edge of the V-shape to form a reserved channel, the width of the first drop opening is smaller than the width of the first side surface, and the width of the second drop opening is smaller than the width of the second side surface, wherein the width of the reserved channel is larger than the size of a single-grain rice and smaller than the size of a double-grain rice;

[0013] The collecting trough is arranged below the first and second dropping openings to collect the rice grains dropped from the first and second dropping openings;

[0014] Furthermore, a first light-through hole is disposed at one end of each channel away from the feeding module, and the first light-through hole is disposed opposite to the light source module.

[0015] Optionally, the light source module includes a light guide bar and a cold light source assembly, the cold light source assembly includes a light shield and a cold light source arranged inside the light shield, the light shield is provided with a second light through hole, one end of the light guide bar is connected to the first light through hole, and the other end of the light guide bar is connected to the second light through hole.

[0016] Optionally, it further includes a cover plate, a bottom plate and a support frame, one end of the support frame is connected to the cover plate, and the other end of the support frame is connected to the bottom plate to form a closed cavity to accommodate the sorting module and the light source module.

[0017] Optionally, the main control unit includes a rice detection subunit and a classification and counting subunit, the rice detection subunit is used to identify the image, obtain a target frame corresponding to the rice, and is also used to determine a target frame coordinate and a target frame type of the target frame, the target frame coordinate is used to indicate the position of the rice in the image, and the target frame type is used to indicate the type of rice in the image, and the rice type includes rice with internal damage or rice without internal damage;

[0018] The classification counting subunit is used to perform classification processing based on the target frame coordinates and the target frame type to obtain the internal damage status of the rice, wherein the internal damage status of the rice includes the number of internally damaged rice, the number of internally undamaged rice and the damage rate.

[0019] In a second aspect, the present application further provides a rice damage detection method, which is applied to the rice damage detection device described in the first aspect, and the method comprises:

[0020] The feeding module drives the rice toward the sorting module;

[0021] The sorting module arranges the rice grains in axial order, and the sorting module is provided with light holes;

[0022] The light source module emits light toward the light hole;

[0023] The visual sensor module obtains the image of the rice passing through the sorting module under the light;

[0024] The main control unit detects the internal damage of the rice according to the image information.

[0025] Optionally, the main control unit includes a rice detection subunit and a classification and counting subunit, and the main control unit detects internal damage of the rice according to the image information, including:

[0026] The rice detection subunit identifies the image, obtains a target frame corresponding to the rice, and determines a target frame coordinate and a target frame type of the target frame, wherein the target frame coordinate is used to indicate a position of the rice in the image, and the target frame type is used to indicate a type of rice in the image, wherein the type of rice includes rice with internal damage or rice without internal damage;

[0027] The classification counting subunit performs classification processing based on the target frame coordinates and the target frame type to obtain the internal damage status of the rice, wherein the internal damage status of the rice includes the number of internally damaged rice, the number of internally undamaged rice and the damage rate.

[0028] Beneficial effects:

[0029] The rice damage detection device provided in the present application adopts a feeding module to drive the rice to move toward the sorting module; the sorting module axially arranges the rice grains, and a light hole is provided on the sorting module; the light source module emits light to the light hole; the visual sensor module obtains the image of the rice passing through the sorting module under the light; and the main control unit is used to detect the internal damage of the rice based on the image information. In this way, through the coordinated work of each module, the internal damage of the rice can be automatically detected, and the internal damage rate of a large number of rice grains can be accurately obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a front view of a rice damage detection device according to a preferred embodiment of the present application;

[0031] Figure 2 It is a left view of a rice damage detection device according to a preferred embodiment of the present application;

[0032] Figure 3 This is an axial view of a rice damage detection device according to a preferred embodiment of the present application;

[0033] Figure 4 This is a schematic diagram of the reflection of rice grains under light irradiation in a preferred embodiment of the present invention;

[0034] Figure 5 A schematic diagram of a feeding module according to a preferred embodiment of the present application;

[0035] Figure 6 A schematic diagram of a sorting module according to a preferred embodiment of the present application;

[0036] Figure 7 A schematic diagram of a light source module according to a preferred embodiment of the present application;

[0037] Figure 8 A schematic diagram of the connection between the sorting module and the light source module according to a preferred embodiment of the present invention;

[0038] Fig. 9 A schematic diagram of the movement direction and coordinate values ​​of rice in a preferred embodiment of the present invention;

[0039] Fig.10 One of the flow charts of a rice damage detection method based on deep learning according to a preferred embodiment of the present invention;

[0040] Fig.11 This is the second flowchart of a rice damage detection method based on deep learning in a preferred embodiment of the present invention.

[0041] Reference numerals:

[0042] 1. Feeding module; 1-1. Base; 1-2. Second spring piece group; 1-3. Hopper; 1-4. Feeding trough; 1-5. First spring piece group; 1-6. Armature; 1-7. Electromagnetic exciter; 2. Cover plate; 3. Visual sensor mounting bracket; 4. Visual sensor module; 5. Light source module; 3-1. Sorting module; 3-2. Light guide bar; 3-3. Cold light source assembly; 3-1-1. Channel; 3-1-2. First light hole; 3-1-3. Collecting trough; 3-1-4. First drop port; 3-3-1. Cold light source; 3-3-2. Light shield; 3-3-3. Second light hole; 6. Bottom plate; 7. Support frame; 8. Main control unit; 201. Light source; 202. Cutting plate; 203. Rice; 204. Crack. DETAILED DESCRIPTION

[0043] The technical solution of the present application is described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0044] Unless otherwise defined, the technical terms or scientific terms used in this application should be understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one" or "one" do not indicate quantity restrictions, but indicate the existence of at least one. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship also changes accordingly.

[0045] See also Figure 1-Figure 3The present application provides a rice damage detection device, comprising: a feeding module 1, a sorting module 3-1, a light source module 5, a visual sensor module 4 and a main control unit 8, wherein the sorting module 3-1 is connected to the feeding module 1, the light source module 5 is arranged relatively below the sorting module 3-1, the visual sensor is arranged relatively above the sorting module 3-1, and the visual sensor and the light source module 5 are located on the same vertical axis, and the main control unit 8 is connected to the visual sensor;

[0046] The feeding module 1 is used to drive the rice to move towards the sorting module 3-1;

[0047] The sorting module 3-1 is used to perform axial arrangement of individual rice grains, and a light hole is provided on the sorting module 3-1;

[0048] The light source module 5 is used to emit light to the light hole;

[0049] The visual sensor module 4 is used to obtain the image of the rice passing through the sorting module 3-1 under the light;

[0050] The main control unit 8 is used to detect the internal damage of the rice according to the image information.

[0051] It should be noted that if Figure 4 As shown, assuming that the rice 203 is an ellipsoidal entity, consisting of an outer husk and inner rice, the rice 203 is placed on a cutting board 202, and using the optical properties of the rice 203, a light source 201 is arranged at the bottom of one end of the rice 203, a part of the light is reflected, and the other part of the light passes through the husk to enter the inside of the rice 203, and the light is transmitted and refracted inside the rice 203. The internal situation of the rice 203 can be observed from above the rice 203. The overall brightness of the intact and undamaged rice 203 is uniform and transparent, while the rice 203 with internal cracks 204 and other damages can be observed at the damaged area with a darker brightness than the undamaged area. This is because the light penetrating into the rice 203 will be accompanied by a stronger reflection when passing through the damaged surface such as the cracks 204, and the light intensity on the other side of the damaged area will be significantly weakened, and there is a clear contrast in brightness on both sides of the damaged area.

[0052] In this embodiment, the visual sensor module 4 can be installed at a position directly opposite to the rice through the visual sensor mounting frame 3. The visual sensor module 4 can use a 1080p, 30f / s, high-definition camera with ten times optical zoom, and be arranged directly above the first light hole 3-1-2 on the sorting module 3-1. It can collect image information of the rice in the three V-shaped channels 3-1-1 after being irradiated with cold light in turn in real time, and transmit it to the main control unit 8 for detection. During each detection process, the rice collected in the collecting trough 3-1-3 of the sorting module 3-1 should be added to the hopper 1-3 of the feeding module 1 again until all the rice passes through the light hole of the V-shaped channel 3-1-1 of the sorting module 3-1 to complete the image acquisition.

[0053] The above-mentioned rice damage detection device, through the coordinated work of each module, sorts the rice to be detected and passes it through the detection area illuminated by the light source in turn, and uses the optical properties of the rice to achieve non-destructive display of the characteristics of the internally damaged rice. The visual sensing device in the detection area obtains the rice image online and transmits it to the main control unit 8. The trained deep learning target detection and counting model provided in the main control unit 8 is used to perform target detection and classification counting on the internally damaged rice and the undamaged rice, and the damage rate is calculated. The internal damage of the rice can be automatically detected, and the internal damage rate of a large number of rice can be accurately obtained.

[0054] Optionally, see Figure 5 The feeding module 1 includes a base 1-1, a first spring sheet group 1-5, a second spring sheet group 1-2, an electromagnetic exciter 1-7, a feeding trough 1-4, an armature 1-6 and a hopper 1-3, one end of the first spring sheet group 1-5 is connected to the feeding trough 1-4, the other end of the first spring sheet group 1-5 is connected to the base 1-1, the second spring sheet group 1-2 is arranged opposite to the first spring sheet group 1-5, one end of the second spring sheet group 1-2 is connected to the feeding trough 1-4, the other end of the second spring sheet group 1-2 is connected to the base 1-1, the armature 1-6 is arranged on the first spring sheet group 1-5, the electromagnetic exciter 1-7 is arranged on the base 1-1, and the electromagnetic exciter 1-7 is arranged opposite to the armature 1-6, the hopper 1-3 is arranged on the trough, and is located at one end of the trough, and the other end of the trough is connected to the sorting module 3-1.

[0055] In this embodiment, the electromagnetic exciter 1-7 generates a periodic pulse electromagnetic force through a unidirectional pulse current after half-wave rectification, and cooperates with the first spring group 1-5 and the second spring group 1-2 to drive the feeding trough 1-4 to vibrate reciprocatingly, so that the rice moves forward in a directional manner along the feeding trough 1-4. In this way, the automatic feeding process can be realized without manual operation, reducing labor costs.

[0056] Optionally, see Figure 6, the sorting module 3-1 includes N channels 3-1-1 and a collecting trough 3-1-3 arranged in parallel, N is a positive integer, the N channels 3-1-1 are all V-shaped channels 3-1-1, each channel 3-1-1 includes a first side surface and a second side surface, and the end of the first side surface close to the feeding module 1 is provided with a first drop opening 3-1-4, and the end of the second side surface close to the feeding module 1 is provided with a second drop opening, and the first drop opening 3-1-4 and the second drop opening are both arranged in a direction away from the bottom edge of the V-shape to form a reserved channel 3-1-1, the width of the first drop opening 3-1-4 is smaller than the width of the first side surface, and the width of the second drop opening is smaller than the width of the second side surface, wherein the width of the reserved channel 3-1-1 is larger than the size of a single-grain rice and smaller than the size of a double-grain rice;

[0057] The collecting trough 3-1-3 is arranged below the first drop opening 3-1-4 and the second drop opening to collect the rice dropped from the first drop opening 3-1-4 and the second drop opening;

[0058] Furthermore, a first light-through hole 3 - 1 - 2 is provided at one end of each channel 3 - 1 - 1 away from the feeding module 1 , and the first light-through hole 3 - 1 - 2 is arranged opposite to the light source module 5 .

[0059] Optionally, see Figure 7 The light source module 5 includes a light guide bar 3-2 and a cold light source assembly 3-3. The cold light source assembly 3-3 includes a light shield 3-3-2 and a cold light source 3-3-1 disposed inside the light shield 3-3-2. The light shield 3-3-2 is provided with a second light hole 3-3-3. Figure 8 As shown, one end of the light guide bar 3-2 is connected to the first light through hole 3-1-2, and the other end of the light guide bar 3-2 is connected to the second light through hole 3-3-3, wherein: Figure 8 AA cross-sectional view of Figure 7 Consistent.

[0060] In this embodiment, the sorting module 3-1 is installed at the front end of the feeding trough 1-4 of the feeding module 1. Specifically, the sorting module 3-1 is configured with three V-shaped channels 3-1-1. Two drop openings are opened on both sides of the front end of the V-shaped channel 3-1-1. The two drop openings are arranged in a direction away from the bottom edge of the V shape to form a reserved channel 3-1-1, which can ensure that only single grains of rice in each channel 3-1-1 can be axially queued and pass through the reserved channel 3-1-1 in turn, and the excess rice falls from the drop opening into the collecting trough 3-1-3 below. A first light hole 3-1-2 is provided; the light source module 5 is mainly composed of a cold light source 3-3-1 and an opaque light shield 3-3-2, and a second light hole 3-3-3 is also provided on the top of the light shield 3-3-2. The first light hole 3-1-2 on the V-shaped channel 3-1-1 of the sorting module 3-1 and the second light hole 3-3-3 on the light shield 3-3-2 on the light source module 5 are connected through a light guide bar 3-2. The light generated by the cold light source 3-3-1 is irradiated upward from the light hole under the V-shaped channel 3-1-1 of the sorting module 3-1 along the light guide bar 3-2.

[0061] Optionally, the rice damage detection device further comprises a cover plate 2, a bottom plate 6 and a support frame 7, one end of the support frame 7 is connected to the cover plate 2, and the other end of the support frame 7 is connected to the bottom plate 6 to form a closed cavity to accommodate the sorting module 3-1 and the light source module 5. In this way, by forming a closed cavity, it can be ensured that the light emitted by the light source is not affected by external light when it shines on the rice.

[0062] Optionally, the main control unit 8 includes a rice detection subunit and a classification counting subunit, the rice detection subunit is used to identify the image, obtain the target frame corresponding to the rice, and is also used to determine the target frame coordinates and the target frame type of the target frame, the target frame coordinates are used to indicate the position of the rice in the image, and the target frame type is used to indicate the type of rice in the image, and the rice type includes internally damaged rice or internally undamaged rice;

[0063] The classification counting subunit is used to perform classification processing based on the target frame coordinates and the target frame type to obtain the internal damage status of the rice, wherein the internal damage status of the rice includes the number of internally damaged rice, the number of internally undamaged rice and the damage rate.

[0064] In the present embodiment, the rice detection submodel can be a YOLOv4 model, which mainly includes three parts: BackBone, Neck, and Head. BackBone uses a cross-stage local network CSPDarknet53, which performs 5 residual network structure trainings after convolution processing on the input image; the Neck part includes a spatial pyramid pooling layer SPP and a path aggregation network PANe; the last feature layer obtained by CSPDarknet53 is imported into SPP for pooling and stacking processing after 3 convolution operations, and the processing result is imported into PANet and CSPDarknet53 after 3 convolution operations to obtain feature layer 1 and feature layer 2 for multiple upsampling and downsampling, complete feature fusion, and finally predict using the extracted features in the Head part to obtain the recognition result of the image. In the present embodiment, the recognition result of the image refers to the rice type in the recognition image, and the rice type refers to the rice in the image as internally damaged rice or internally undamaged rice. In this way, the rice type in the image can be quickly determined based on the rice detection submodel.

[0065] Furthermore, based on the rice detection sub-model, the classification and counting sub-model is combined to realize target recognition and detection of two types of rice (damaged rice inside and undamaged rice inside) and classification and counting at the same time.

[0066] Next, the principle of the main control unit 8 detecting the internal damage of the rice grains based on the image information is described in detail.

[0067] In one example, a rice detection sub-model is provided in a rice detection sub-unit, and a classification counting sub-model is provided in a classification counting sub-unit. Firstly, the type of rice in the image is determined based on the rice detection sub-model, and the rice type includes rice with internal damage or rice without internal damage. The rice area in the image is locked, a target frame corresponding to the rice area is generated, and the target frame coordinates and the target frame type of the target frame are determined. The target frame coordinates are used to indicate the position of the rice in the image, and the target frame type is used to indicate the type of rice in the image. The classification counting sub-model is used to determine the detection result according to the coordinates and types of the target frames of the same rice in two adjacent frames of images.

[0068] Among them, the target frame can be a rectangular frame, and the target frame is determined according to the size of the rice and its position in the image. In other words, the target frame is used to select the rice in the image, and the target frame coordinates and target frame type of the rice in two adjacent frames of images can be used to reflect the position change of the rice.

[0069] In this way, the classification counting sub-model is used to determine the detection result according to the target frame coordinates and target frame type of the same rice in two adjacent frames of images, which can quickly determine whether the changes in the rice are normal, thereby avoiding the situation where errors in a certain frame of image affect the detection result.

[0070] Specifically, a classification counting submodel can be used to determine the detection result according to the coordinates and type of the target frame of the same rice in two adjacent frames of images. The specific steps include: if the relationship between the target frame of the rice in the current frame and the target frame in the previous frame meets the first preset condition, it is recorded as the number of damaged rice inside plus 1; if the relationship between the target frame of the rice in the current frame and the target frame in the previous frame meets the second preset condition, it is recorded as the number of undamaged rice inside plus 1; if the relationship between the target frame of the rice in the current frame and the target frame in the previous frame meets the third preset condition, the count of the number of rice remains unchanged.

[0071] In this way, by setting the first preset condition, the second preset condition and the third preset condition, the counting of different types of rice can be achieved quickly.

[0072] See also Fig. 9 , the direction of rice movement is opposite to the direction in which the coordinate value increases, that is, the value of the target frame coordinate decreases frame by frame. YOLOv4 starts to identify and detect when the left end of a certain rice grain enters the light source until the right end of the rice grain leaves the light source. During this period, several frames of rice images will be continuously acquired, and the rice type will be identified and the target detection frame type will be marked. Because the rice grain moves from right to left, the target detection coordinates in the same rice grain image acquired will decrease frame by frame. Therefore, the target detection frame coordinates in the previous and next two frames are compared. When the target detection frame coordinates in a certain frame image are greater than those in the previous frame, it means that the rice in the image appears on the right side of the rice in the previous frame image. It can be determined that a new rice grain begins to pass through the detection area. At this time, according to the target detection frame type, the count of the corresponding type of rice is increased by 1.

[0073] The first preset condition includes:

[0074] When the rice is damaged inside, the value of the target frame coordinates of the rice in the current frame is greater than the value of the target frame coordinates of the rice in the previous frame; or, when the rice is damaged inside, the value of the target frame coordinates of the rice in the current frame is less than or equal to the value of the target frame coordinates of the rice in the previous frame, and the target frame type of the rice in the current frame is different from the target frame type of the rice in the previous frame.

[0075] The second precondition includes:

[0076] When the rice is an internally intact rice, the value of the target frame coordinate of the rice in the current frame is greater than the value of the target frame coordinate of the rice in the previous frame.

[0077] The third precondition includes:

[0078] When the rice is damaged inside, the value of the target frame coordinates of the rice in the current frame is less than or equal to the value of the target frame coordinates of the rice in the previous frame, and the target frame type of the rice in the current frame is the same as the target frame type of the rice in the previous frame; or, when the rice is undamaged inside, the value of the target frame coordinates of the rice in the current frame is less than or equal to the value of the target frame coordinates of the rice in the previous frame.

[0079] Specifically, the classification counting sub-model can also be used to determine the detection result according to the coordinates and types of the target boxes of the same rice in two adjacent frames of images. The specific steps include:

[0080] In the case where the rice is damaged inside, if the value of the target frame coordinates of the rice in the current frame is less than or equal to the value of the target frame coordinates of the rice in the previous frame, and the target frame type of the rice in the current frame is different from the target frame type of the rice in the previous frame, then the number of damaged rice inside is increased by 1, and the number of undamaged rice inside is decreased by 1.

[0081] It should be noted that there are a few rice grains with internal damage that do not show damage characteristics in the first few frames of images. During the movement of the rice grains, their target frame type will change from the internal non-damaged type to the internal damaged type. According to the above counting principle, the counts of both types of rice grains may be increased by 1. To avoid this problem, for the target frame with internal damage type whose coordinates are smaller than the previous frame, the comparison with the target frame type of the previous frame is added. If the target frame types of the previous and next frames are different, it means that the above situation has occurred, and the count of the rice grain with internal damage is increased by 1, and the count of the rice grain with internal non-damaged is reduced by 1 (the first frame image of the rice grain is mistakenly increased by 1).

[0082] In one example, the detection process and counting can be monitored through a visualization window. After the detection is completed, the number of damaged rice grains and the number of undamaged rice grains, the total number of the two types of rice, and the proportion of damaged rice grains are output. In addition, during the detection and counting process, the pictures corresponding to each grain of rice can be classified and saved in real time on the computer to facilitate subsequent review of the detection results.

[0083] For other possible implementations, see Figure 10-11, taking a complete workflow as an example, the working principle of the rice damage detection device provided by the present application is explained. When working, the rice to be detected is added from the hopper 1-3 on the feeding module 1, and the electromagnetic exciter 1-7 on the feeding module 1 generates a periodic pulse electromagnetic force through the unidirectional pulse current after half-wave rectification, which acts on the armature 1-6 on the first spring group 1-5, driving the first spring group 1-5 to vibrate back and forth, and the first spring group 1-5 then drives the feeding trough 1-4 to vibrate back and forth, so that the rice moves forward along the feeding trough 1-4 in a directional manner; after the rice moves to the sorting module 3-1, only a single grain of rice is axially lined up and passed in sequence in each V-shaped channel 3-1-1, and the excess rice falls from the drop port into the collecting trough 3-1-3 below; the visual sensor module collects the image information of the rice after being irradiated with cold light in the three V-shaped channels 3-1-1 in real time, and transmits it to the main control unit 8 for detection. During each detection process, the rice collected in the collecting trough 3-1-3 is added to the hopper 1-3 of the feeding module 1 again until all the rice passes through the first light hole of the channel 3-1-1 of the sorting module 3-1, completing the real-time acquisition of all images.

[0084] After the visual sensing module transmits the detection area paddy image information to the main control unit 8 in real time, the detection software system performs target detection and classification counting on it, and the detection software system of the present application is composed of target detection and classification counting two parts, and the target detection part adopts the deep learning target detection model YOLO V4, and the video transmitted by the collection is carried out real-time target detection, and the paddy type (inside with damage, inside without damage) is identified, and the target frame is marked, and each target frame coordinate information is obtained, and the sample is first collected before the formal use of the present application, and a training set is made, and the target detection model is trained and optimized until the detection accuracy that meets the requirements is obtained. For realizing the dynamic classification counting of the detection target, the present application adds the classification counting algorithm in the trained YOLOV4 target detection algorithm, and realizes that two types of paddy (inside with damage paddy, inside without damage paddy) are carried out target identification detection and classification counting simultaneously.

[0085] The present application also provides a rice damage detection method, which is applied to the above-mentioned rice damage detection device, and the method comprises:

[0086] The feeding module 1 drives the rice to move towards the sorting module 3-1;

[0087] The sorting module 3-1 performs axial arrangement of individual rice grains, and the sorting module 3-1 is provided with light holes;

[0088] The light source module 5 emits light toward the light hole;

[0089] The visual sensor module 4 obtains the image of the rice grains passing through the sorting module 3-1 under the light;

[0090] The main control unit 8 detects the internal damage of the rice according to the image information.

[0091] The rice damage detection method can implement the various embodiments of the above-mentioned rice damage detection device and can achieve the same beneficial effects, which will not be described in detail here.

[0092] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method steps described above are implemented. The computer-readable storage medium can implement various embodiments of the above method and achieve the same beneficial effects, which will not be described in detail here.

[0093] The preferred specific embodiments of the present application are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present application without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art based on the concept of the present application through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A rice damage detection device, It is characterized in that include: A feeding module, a sorting module, a light source module, a visual sensor module and a main control unit, wherein the sorting module is connected to the feeding module, the light source module is arranged relatively below the sorting module, the visual sensor is arranged relatively above the sorting module, and the visual sensor and the light source module are located on the same vertical axis, and the main control unit is connected to the visual sensor; The feeding module is used to drive the rice to move towards the sorting module; The sorting module is used to axially arrange the rice grains individually, and a first light-transmitting hole is provided on the sorting module; The light source module is used to emit light to the light hole; The visual sensor module is used to obtain the image of the rice passing through the sorting module under the light; The main control unit is used to detect the internal damage of rice according to the image information.

2. The rice damage detection device according to claim 1, It is characterized in that The feeding module includes a base, a first spring sheet group, a second spring sheet group, an electromagnetic exciter, a feed trough, an armature and a hopper. One end of the first spring sheet group is connected to the feed trough, and the other end of the first spring sheet group is connected to the base. The second spring sheet group is arranged opposite to the first spring sheet group. One end of the second spring sheet group is connected to the feed trough, and the other end of the second spring sheet group is connected to the base. The armature is arranged on the first spring sheet group. The electromagnetic exciter is arranged on the base and the electromagnetic exciter is arranged opposite to the armature. The hopper is arranged on the trough and is located at one end of the trough. The other end of the trough is connected to the sorting module.

3. The rice damage detection device according to claim 1, It is characterized in that The sorting module includes N channels and collecting troughs arranged in parallel, N is a positive integer, the N channels are all V-shaped channels, each channel includes a first side surface and a second side surface, and an end of the first side surface close to the feeding module is provided with a first drop opening, and an end of the second side surface close to the feeding module is provided with a second drop opening, and the first drop opening and the second drop opening are both arranged in a direction away from the bottom edge of the V-shape to form a reserved channel, the width of the first drop opening is smaller than the width of the first side surface, and the width of the second drop opening is smaller than the width of the second side surface, wherein the width of the reserved channel is larger than the size of a single-grain rice and smaller than the size of a double-grain rice; The collecting trough is arranged below the first and second dropping openings to collect the rice grains dropped from the first and second dropping openings; Furthermore, one end of each channel away from the feeding module is provided with the first light-through hole, and the first light-through hole is arranged opposite to the light source module.

4. The rice damage detection device according to claim 3, It is characterized in that The light source module includes a light guide bar and a cold light source assembly, the cold light source assembly includes a light shield and a cold light source arranged inside the light shield, the light shield is provided with a second light through hole, one end of the light guide bar is connected to the first light through hole, and the other end of the light guide bar is connected to the second light through hole.

5. The rice damage detection device according to claim 1, It is characterized in that It also includes a cover plate, a bottom plate and a support frame, one end of the support frame is connected to the cover plate, and the other end of the support frame is connected to the bottom plate to form a closed cavity to accommodate the sorting module and the light source module.

6. The rice damage detection device according to claim 1, It is characterized in that The main control unit includes a rice detection subunit and a classification and counting subunit, wherein the rice detection subunit is used to identify the image, obtain a target frame corresponding to the rice, and further used to determine a target frame coordinate and a target frame type of the target frame, wherein the target frame coordinate is used to indicate the position of the rice in the image, and the target frame type is used to indicate the type of rice in the image, wherein the rice type includes rice with internal damage or rice without internal damage; The classification counting subunit is used to perform classification processing based on the target frame coordinates and the target frame type to obtain the internal damage status of the rice, wherein the internal damage status of the rice includes the number of internally damaged rice, the number of internally undamaged rice and the damage rate.

7. A rice damage detection method, applied to the rice damage detection device according to any one of claims 1 to 6. It is characterized in that The method comprises: The feeding module drives the rice toward the sorting module; The sorting module arranges the rice grains in axial order, and the sorting module is provided with light holes; The light source module emits light toward the light hole; The visual sensor module obtains the image of the rice grains passing through the sorting module under the light; The main control unit detects the internal damage of the rice based on the image information.

8. The rice damage detection method according to claim 7, It is characterized in that The main control unit includes a rice detection subunit and a classification and counting subunit. The main control unit detects the internal damage of the rice according to the image information, including: The rice detection subunit identifies the image, obtains a target frame corresponding to the rice, and determines a target frame coordinate and a target frame type of the target frame, wherein the target frame coordinate is used to indicate a position of the rice in the image, and the target frame type is used to indicate a type of rice in the image, wherein the type of rice includes rice with internal damage or rice without internal damage; The classification counting subunit performs classification processing based on the target frame coordinates and the target frame type to obtain the internal damage status of the rice, wherein the internal damage status of the rice includes the number of internally damaged rice, the number of internally undamaged rice and the damage rate.