CN109444141B - Grain kernel detection and counting method and device based on deep learning - Google Patents

Grain kernel detection and counting method and device based on deep learning Download PDF

Info

Publication number
CN109444141B
CN109444141B CN201811583256.4A CN201811583256A CN109444141B CN 109444141 B CN109444141 B CN 109444141B CN 201811583256 A CN201811583256 A CN 201811583256A CN 109444141 B CN109444141 B CN 109444141B
Authority
CN
China
Prior art keywords
grain
grain seed
conveying mechanism
box body
definition camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811583256.4A
Other languages
Chinese (zh)
Other versions
CN109444141A (en
Inventor
武勇
朱逞春
周金旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Gaozhe Information Technology Co ltd
Original Assignee
Anhui Gaozhe Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Gaozhe Information Technology Co ltd filed Critical Anhui Gaozhe Information Technology Co ltd
Priority to CN201811583256.4A priority Critical patent/CN109444141B/en
Publication of CN109444141A publication Critical patent/CN109444141A/en
Application granted granted Critical
Publication of CN109444141B publication Critical patent/CN109444141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/85Investigating moving fluids or granular solids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M7/00Counting of objects carried by a conveyor

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for detecting and counting grain seeds based on deep learning in the technical field of grain seed counting, which comprises a box body, a high-definition camera, a bright field illuminating lamp, a grain seed loading plate, a conveying mechanism, a dark field illuminating lamp, a grain seed feeding port, a man-machine interaction touch display screen and an electromechanical control device, wherein the grain seed feeding port is positioned above the box body, the surface of the conveying mechanism is fixedly provided with the grain seed loading plate, the electromechanical control device is electrically connected with the conveying mechanism, the conveying mechanism is fixed between the front and the back of the inner wall of the box body, the high-definition camera is positioned at the top of the inner cavity of the box body, the high-definition camera is in signal connection with the man-machine interaction touch display screen, dense and adhesive grain seed targets can be well detected through the design of a deep convolution learning network model and parameter solution, the recall rate and the accuracy, the operation process is simple and the operation is convenient.

Description

Grain kernel detection and counting method and device based on deep learning
Technical Field
The invention relates to the technical field of grain seed counting, in particular to a grain seed detecting and counting method and device based on deep learning.
Background
The most used method for detecting and counting grain grains at present is an image processing technology based on machine vision. The most used technology in machine vision is image segmentation, and methods for image segmentation include the greater-body threshold method, the edge method, the watershed method and the distance transformation method. These methods all have some defects or problems, which cannot be overcome, and the target detection of the grain seeds is different from other target detection, and they have some specific attributes and states, for example, the grain particles are small, the number of the grains in one picture is large and dense, and a plurality of adhesion states occur.
At present, some researches have mentioned that special image acquisition devices are adopted, such as a grain seed image acquisition system mentioned in patent CN105430350A, each grain seed is sucked into a small hole by a grain suction device and then distributed on a related loading surface. This method has some problems: for example, the wheat in the grain has different varieties, different regions and different wheat varieties, the grains have different sizes, even if the same batch of wheat seeds have imperfect grains such as broken grains or scab grains, the normal grains are full, the volume and the weight are relatively large, and the grains can be larger if the germinated grains are germinated. The grain seeds with different volumes and surface areas can not be sucked on the same standard hole type disc, once the device is adopted, small grains can be sucked into the suction fan, and even the suction fan can be blocked, so that the short circuit of the suction fan is caused.
The grain seed detecting and counting technology is the basis of grain seed identification, and each grain seed can be divided, so that the single grain seed can be identified. The invention designs a method and a device for detecting and counting grain seeds based on deep learning to solve the problems.
Disclosure of Invention
The invention aims to provide a method and a device for detecting and counting grain seeds based on deep learning, and the method and the device are used for solving the problem that the prior art provided by the background technology cannot meet the requirements of detection and counting of different grain seeds.
In order to achieve the purpose, the invention provides the following technical scheme: a grain kernel detection and counting method based on deep learning comprises the following steps:
s1, designing a deep convolution learning network model;
and S2, solving the model parameters of the deep convolution learning network.
Preferably, in the step S1, the deep convolutional learning network model is constructed to solve the detection of dense small targets, and a dense small target feature extraction module, a dense feature extraction evolution module, and a target detection module must be designed.
Preferably, the dense feature extraction evolution module connects the convolution layers in a dense connection mode, the dense connection mainly means that each layer is connected with all the previous layers, a deletion and copy addition strategy is designed for interlayer connection, certain connection validity verification is performed at certain training iteration times in the training process, a few layers with small contribution are deleted randomly, and the connections with large contribution are copied to the deletion connection.
Preferably, the object detection module is configured to generate object candidate boxes and provide probability values of each object box, and the core of the object detection module is an internal dimension reduction and dimension increase process, and a convolution kernel of 1 × 1 is used to reduce the feature map dimension, mainly for the purpose of increasing speed; the characteristic diagram is enlarged by a bilinear interpolation method, and the main purpose is to acquire more accurate edge and context information.
The grain seed detecting and counting device based on deep learning comprises a box body, a high-definition camera, a bright field illuminating lamp, a grain seed carrying plate, a conveying mechanism, a dark field illuminating lamp, a grain seed feeding port, a man-machine interaction touch display screen and an electromechanical control device, wherein the man-machine interaction touch display screen and the electromechanical control device are fixed on the surface of the box body, the grain seed feeding port is located above the box body, the grain seed carrying plate is fixed on the surface of the conveying mechanism, the conveying mechanism is located below the grain seed feeding port, the electromechanical control device is electrically connected with the conveying mechanism, the dark field illuminating lamp is located below the conveying mechanism, the conveying mechanism is fixed between the front portion and the rear portion of the inner wall of the box body, the high-definition camera is located at the top of the inner cavity of the box body, the bright field illuminating lamp is located below the high-definition camera, the high, Transport mechanism and dark field light are located same vertical line, high definition camera and the mutual touch display screen signal connection of human-computer, transport mechanism is the belt transport mechanism that the parallel and level set up around two sets of, and grain seed grain carries thing board flexonics between two sets of conveyer belts.
Compared with the prior art, the invention has the beneficial effects that: according to the method, the dense and adhered grain seed targets can be well detected through the design of the deep convolution learning network model and the parameter solution, and through tests, the grain seed detection has high recall rate and accuracy, simple operation process and convenience in operation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block flow diagram of the present invention;
FIG. 2 is a diagram of the deep learning overall network architecture of the present invention;
FIG. 3 is a flow chart of the dense feature extraction evolution of the present invention;
FIG. 4 is a network block diagram of a detection module according to the present invention;
FIG. 5 is a diagram of a content aware architecture according to the present invention;
FIG. 6 is a schematic view of the structure of the present invention.
In the drawings, the components represented by the respective reference numerals are listed below:
the system comprises a 1-dense small target feature extraction module, a 2-dense feature extraction evolution module, a 3-target detection module, a 100-box body, a 200-high-definition camera, a 300-bright field illuminating lamp, a 400-grain seed carrying plate, a 500-conveying mechanism, a 600-dark field illuminating lamp, a 700-grain seed feeding port, an 800-man-machine interaction touch display screen and a 900-electromechanical control device.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-6, the present invention provides a technical solution: a grain kernel detection and counting method based on deep learning comprises the following steps:
s1, designing a deep convolution learning network model;
and S2, solving the model parameters of the deep convolution learning network.
In the step S1, the deep convolution learning network model is constructed to solve the detection of dense small targets, and a dense small target feature extraction module 1, a dense feature extraction evolution module 2 and a target detection module 3 must be designed, and a colored three-channel image is input into the dense small target feature extraction module 1.
The intensive feature extraction evolution module 2 connects the convolution layers in an intensive connection mode, wherein the intensive connection mainly means that each layer is connected with all the previous layers, a deletion and duplication adding strategy is designed in the interlayer connection mode, in the training process, certain connection validity verification is carried out at certain training iteration times, a plurality of layers with small contribution are deleted randomly, connections with large contribution are duplicated to a deletion connection, and the effect is similar to the evolution effect in a genetic algorithm.
The target detection module 3 is used for generating target candidate boxes and giving a probability value of each target box, the core of the target detection module is an internal dimension reduction and dimension increase process, a convolution kernel of 1x1 is adopted to reduce the dimension of the characteristic diagram, and the main purpose is to accelerate speed; a bilinear interpolation method is adopted to enlarge a feature map, and the main purpose is to acquire more accurate edge and context information, in an intensive feature extraction evolution module 2, each layer is designed to be connected with adjacent layers and all previous layers, a mechanism is designed to delete and increase connections, and after multiple training and iteration, when the error change of iteration times is small or increased, the mechanism is started. When the mechanism is started, 20% of the total connection is randomly selected each time, when a certain connection is deleted, the test verification precision is reduced greatly, the connection is marked as 1, and the precision reduction value is recorded, which indicates that the connection is important and cannot be deleted; if the precision is reduced little or not, the connection is marked as 0, and the connection is possible or not; if the precision does not decrease and inversely increase, the connection is indicated to be deleted, the connection is marked as-1, and the precision increase value is recorded. After one round of connection deletion, the connections needing to be deleted are replaced by the connections which greatly affect the overall accuracy reduction. An evolved feature extraction network may thus be obtained.
32, 34, 35 in the target detection module 3 mainly refer to convolution in deep learning, and may be convolution of 3x3 or 1x1, where direct connection of two convolutions of 3x3 is equivalent to the effect of convolution of 5x5, and connection in 33 mainly increases the number of feature maps, and there is also an arithmetic operation that is related at the same position on the same feature map without increasing the number of feature maps, and in this scheme, the increase of the number of feature maps is used. 36. 37 is a target frame and a fraction of the grain seeds obtained by the target detection module 3, and 31 is a module mainly used for increasing context information and solving the problem of dense adhesion targets. The dimensionality reduction in 312 and 314 is to reduce the number of features by convolution of 1x1, which can reduce the computation.
After the device is installed and the deep learning model is designed, the training of the model is started, and when the accuracy of the model is very high or the loss of the whole network is very small, the fact that the network is well trained is shown. And detecting the grain seeds of the collected images through the trained model.
The test verifies that the data of grain kernel detection is as follows:
Figure BDA0001918452940000051
Figure BDA0001918452940000061
in the figure, the number of grains is 9033, the actual detection number is 9068, wherein the correct grains are 9024, 9 grains are missed to be detected, and 44 grains are mistakenly detected;
the recall rate is defined as
Figure BDA0001918452940000071
Wherein TP is the correct detection number, FN is the number of leaked seeds, and FP is the number of false-detection seeds.
According to the definition of the recall rate, the actually measured recall rate is 99.9 percent, and the accuracy is 99.51 percent;
the definition of correct detection is that the overlapping degree IOU between the grain detection frame bbox and the actual marking frame gtbox is more than 50 percent;
the IOU is defined as
Figure BDA0001918452940000072
A grain seed detecting and counting device based on deep learning comprises a box body 100, a high-definition camera 200, a bright field illuminating lamp 300, a grain seed carrying plate 400, a conveying mechanism 500, a dark field illuminating lamp 600, a grain seed feeding port 700, a man-machine interaction touch display screen 800 and an electromechanical control device 900, wherein the man-machine interaction touch display screen 800 and the electromechanical control device 900 are fixed on the surface of the box body 100, the grain seed feeding port 700 is located above the box body 100, the grain seed carrying plate 400 is fixed on the surface of the conveying mechanism 500, the conveying mechanism 500 is located below the grain seed feeding port 700, the electromechanical control device 900 is electrically connected with the conveying mechanism 500, the dark field illuminating lamp 600 is located below the conveying mechanism 500, the conveying mechanism 500 is fixed between the front and the back of the inner wall of the box body 100, the high-definition camera 200 is located at the top of the inner cavity of the box body 100, the bright field illuminating lamp 300, The bright field illuminating lamp 300, the grain seed carrying plate 400, the conveying mechanism 500 and the dark field illuminating lamp 600 are positioned on the same vertical line, the high definition camera 200 is in signal connection with the man-machine interaction touch display screen 800, the conveying mechanism 500 is two groups of belt conveying mechanisms which are horizontally arranged in a front-back flush manner, the grain seed carrying plate 400 is flexibly connected between the two groups of conveying belts,
grain seed grain gets into the device through grain seed grain pan feeding mouth 700 to carry grain seed grain thing board 400 through transport mechanism 500 and convey to dark field light 600 on, be located under bright field light 300 and high definition camera 200, after high definition camera 200 gathered the grain seed grain image, send the image to electromechanical control device 900 through the connecting wire, contain belt transport mechanism control logic in electromechanical control device 900, image acquisition and storage control, the degree of depth learning algorithm, mutual UI and software logic, show the testing result finally on man-machine interaction touch display screen 800, also can carry out grain variety selection and sensitivity selection control on the man-machine interaction touch display screen 800.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (2)

1. A grain kernel detection and counting method based on deep learning is characterized in that: the method comprises the following steps:
s1, designing a deep convolution learning network model;
s2, solving the model parameters of the deep convolution learning network;
in the step S1, the deep convolution learning network model is constructed to solve the detection of dense small targets, and a dense small target feature extraction module (1), a dense feature extraction evolution module (2) and a target detection module (3) must be designed;
the target detection module (3) is used for generating target candidate boxes and giving a probability value of each target box, and the core of the target detection module is the processes of dimension reduction, upsampling and feature connection inside a context structure, and specifically comprises the following steps: a convolution kernel of 1x1 is adopted to reduce the dimension of the feature map, and the main purpose is to accelerate the speed; a characteristic diagram is enlarged by adopting a bilinear interpolation method, and the main purpose is to obtain more accurate edge and context information; then connecting with the original characteristic diagram after dimensionality reduction and convolution, and mainly aiming at carrying out characteristic fusion to obtain richer characteristic information;
the dense feature extraction evolution module (2) connects the convolution layers in a dense connection mode, wherein the dense connection mainly means that each layer is connected with all the previous layers, a deletion and copy adding strategy is designed for interlayer connection, certain connection validity verification is carried out at certain training iteration times in the training process, a few layers with small contribution are deleted randomly, and the connections with large contribution are copied to the deletion connection.
2. A grain kernel detecting and counting device based on deep learning is suitable for the grain kernel detecting and counting method based on deep learning of claim 1, and is characterized in that: the device comprises a box body (100), a high-definition camera (200), a bright field illuminating lamp (300), a grain seed carrying plate (400), a conveying mechanism (500), a dark field illuminating lamp (600), a grain seed feeding port (700), a man-machine interaction touch display screen (800) and an electromechanical control device (900), wherein the man-machine interaction touch display screen (800) and the electromechanical control device (900) are fixed on the surface of the box body (100), the grain seed feeding port (700) is positioned above the box body (100), the grain seed carrying plate (400) is fixed on the surface of the conveying mechanism (500), the conveying mechanism (500) is positioned below the grain seed feeding port (700), the electromechanical control device (900) is electrically connected with the conveying mechanism (500), the dark field illuminating lamp (600) is positioned below the conveying mechanism (500), and the conveying mechanism (500) is fixed between the front and the back of the inner wall of the box body (100), high definition camera (200) are located box (100) inner chamber top, bright field light (300) are located high definition camera (200) below, high definition camera (200), bright field light (300), grain seed grain carry thing board (400), transport mechanism (500) and dark field light (600) are located same vertical on-line, high definition camera (200) and human-computer interaction touch display screen (800) signal connection, transport mechanism (500) are the belt transport mechanism of two sets of front and back parallel and level settings, and grain seed grain carries thing board (400) flexonics between two sets of conveyer belts.
CN201811583256.4A 2018-12-24 2018-12-24 Grain kernel detection and counting method and device based on deep learning Active CN109444141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811583256.4A CN109444141B (en) 2018-12-24 2018-12-24 Grain kernel detection and counting method and device based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811583256.4A CN109444141B (en) 2018-12-24 2018-12-24 Grain kernel detection and counting method and device based on deep learning

Publications (2)

Publication Number Publication Date
CN109444141A CN109444141A (en) 2019-03-08
CN109444141B true CN109444141B (en) 2021-07-02

Family

ID=65537836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811583256.4A Active CN109444141B (en) 2018-12-24 2018-12-24 Grain kernel detection and counting method and device based on deep learning

Country Status (1)

Country Link
CN (1) CN109444141B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111982788B (en) * 2020-07-27 2022-07-22 江苏大学 High-speed seed counting sensor and detection method
CN113791008B (en) * 2021-08-25 2024-03-15 安徽高哲信息技术有限公司 Grain imperfect grain detection equipment and detection method
CN114030907B (en) * 2022-01-10 2022-04-26 安徽高哲信息技术有限公司 Feeding system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279976A (en) * 2011-09-22 2011-12-14 河南工业大学 Method for constructing and identifying BP (Back Propagation) neural network for identifying different coarse rice seeds
CN107122798A (en) * 2017-04-17 2017-09-01 深圳市淘米科技有限公司 Chin-up count detection method and device based on depth convolutional network
WO2018104897A1 (en) * 2016-12-08 2018-06-14 Sigtuple Technologies Private Limited A method and system for determining quality of semen sample
CN108615046A (en) * 2018-03-16 2018-10-02 北京邮电大学 A kind of stored-grain pests detection recognition methods and device
CN108776807A (en) * 2018-05-18 2018-11-09 复旦大学 It is a kind of based on can the double branch neural networks of skip floor image thickness grain-size classification method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279976A (en) * 2011-09-22 2011-12-14 河南工业大学 Method for constructing and identifying BP (Back Propagation) neural network for identifying different coarse rice seeds
WO2018104897A1 (en) * 2016-12-08 2018-06-14 Sigtuple Technologies Private Limited A method and system for determining quality of semen sample
CN107122798A (en) * 2017-04-17 2017-09-01 深圳市淘米科技有限公司 Chin-up count detection method and device based on depth convolutional network
CN108615046A (en) * 2018-03-16 2018-10-02 北京邮电大学 A kind of stored-grain pests detection recognition methods and device
CN108776807A (en) * 2018-05-18 2018-11-09 复旦大学 It is a kind of based on can the double branch neural networks of skip floor image thickness grain-size classification method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Densely Connected Convolutional Networks;Gao Huang等;《Computer Society》;20171231;第2261页摘要,第2262页左栏,第2263页 *
基于Faster R-CNN改进的数粒机系统;胡安翔 等;《包装工程》;20180531;第39卷(第9期);第141页摘要,第142页2.1节,第143页2.3节 *
胡安翔 等.基于Faster R-CNN改进的数粒机系统.《包装工程》.2018,第39卷(第9期), *

Also Published As

Publication number Publication date
CN109444141A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109444141B (en) Grain kernel detection and counting method and device based on deep learning
CN110060237B (en) Fault detection method, device, equipment and system
US20210366200A1 (en) Generating an Augmented Reality Image Using a Blending Factor
CN108596166B (en) Container number identification method based on convolutional neural network classification
CN108154508A (en) Method, apparatus, storage medium and the terminal device of product defects detection positioning
CN108230318B (en) Ladle defects detection classification method, device, equipment and computer-readable medium
CN106503724A (en) Grader generating means, defective/zero defect determining device and method
US20170236269A1 (en) Inspection Apparatus, Inspection Method, And Program
CN110726724A (en) Defect detection method, system and device
CN109946303A (en) Check device and method
CN108257121A (en) The newer method, apparatus of product defects detection model, storage medium and terminal device
CN109671078A (en) A kind of product surface image abnormity detection method and device
CN110008947B (en) Granary grain quantity monitoring method and device based on convolutional neural network
CN111325717B (en) Mobile phone defect position identification method and equipment
CN110428357A (en) The detection method of watermark, device, electronic equipment and storage medium in image
CN116258707A (en) PCB surface defect detection method based on improved YOLOv5 algorithm
CN110378313A (en) Cell mass recognition methods, device and electronic equipment
CN114862832A (en) Method, device and equipment for optimizing defect detection model and storage medium
US20230230364A1 (en) Image processing device, control method and storage medium
CN111767908B (en) Character detection method, device, detection equipment and storage medium
TW202242390A (en) Defect inspection device, defect inspection method, and manufacturing method
CN109636801A (en) Automatic method, equipment and the medium for obtaining HER2 fluorescence in situ hybridization result
CN109614994A (en) A kind of tile typology recognition methods and device
CN110287767A (en) Can attack protection biopsy method, device, computer equipment and storage medium
Wu et al. Automatic kernel counting on maize ear using RGB images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant