CN109766742B - Corn seed crack identification method, device, system, equipment and storage medium - Google Patents

Corn seed crack identification method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN109766742B
CN109766742B CN201811381079.1A CN201811381079A CN109766742B CN 109766742 B CN109766742 B CN 109766742B CN 201811381079 A CN201811381079 A CN 201811381079A CN 109766742 B CN109766742 B CN 109766742B
Authority
CN
China
Prior art keywords
corn seed
neural network
network model
corn
data set
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
CN201811381079.1A
Other languages
Chinese (zh)
Other versions
CN109766742A (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 Agricultural University AHAU
Original Assignee
Anhui Agricultural University AHAU
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 Agricultural University AHAU filed Critical Anhui Agricultural University AHAU
Priority to CN201811381079.1A priority Critical patent/CN109766742B/en
Publication of CN109766742A publication Critical patent/CN109766742A/en
Application granted granted Critical
Publication of CN109766742B publication Critical patent/CN109766742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of agricultural product online detection, in particular to a corn seed crack identification method, a device, a system, equipment and a storage medium. The method comprises the following steps: acquiring a corn seed image to be identified; identifying the corn seed image through a first neural network model to identify whether the corn seeds in the corn seed image have cracks or not, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set; and outputting the identification result of whether the corn seeds in the corn seed image to be identified have cracks. According to the corn seed crack identification method, the corn seed crack identification device, the corn seed crack identification system, the corn seed crack identification equipment and the storage medium, the neural network model is established to identify the corn seed image, the traditional backward means of manually identifying whether the corn seeds have cracks is eliminated, the automation degree of the whole identification process is high, the identification efficiency is high, and the working time and the labor cost are effectively saved.

Description

Corn seed crack identification method, device, system, equipment and storage medium
Technical Field
The invention relates to the technical field of agricultural product online detection, in particular to a method, a device, a system, equipment and a storage medium for identifying corn seed cracks.
Background
Corn seeds are propagules capable of growing into adult corn plants and are formed by pollination and fertilization of ovules. Usually, the seeds are planted in corn, and the quality of the seeds is related to the planting result of the corn.
At present, after corn seeds are processed into seeds, whether the corn seeds are qualified or not is usually required to be detected, mainly because the corn inevitably generates cracks in the production and processing process, and the cracks can generate adverse effects on the quality of the corn, for example, the corn seeds can influence the starch yield after the cracks are generated, meanwhile, the cracked grains have strong hygroscopicity when being stored, are easy to generate heat and be attacked by pests and mould, and can influence the vitality and the germination rate of the seeds. In the crack detection of the corn seeds, manual detection is mostly adopted, and in the national standard 'technical conditions of grain dryers', the inspection method for the crack rate of the corn seeds is formulated as follows: taking 100 complete corn grains from each sample, firstly placing each corn embryo part on a glass plate of a waist-popping detection box facing a light source, turning on the light source, observing the surface of the corn, detecting cracked grains, then turning over all the residual corns on the glass plate, enabling the embryo part to be back to the light source, observing again, detecting the cracked grains, counting the re-detected cracked grains together, and taking the percentage of the number of the cracked grains as the crack rate of the sample.
Therefore, in the prior art, the crack detection of the corn seeds is mainly carried out manually, and the detection method has long time consumption, low automation level and low detection efficiency.
Disclosure of Invention
Based on the method, the device, the system, the equipment and the storage medium for identifying the corn seed cracks are provided, so that the problems of low labor cost and low efficiency caused by the lagging existing corn seed crack identification technology are solved.
In one embodiment, the invention provides a corn seed crack identification method, which comprises the following steps:
acquiring a corn seed image to be identified;
identifying the corn seed image through a first neural network model to identify whether corn seeds in the corn seed image have cracks, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set;
and outputting the identification result of whether the corn seeds in the corn seed image to be identified have cracks.
In one embodiment, the invention provides a corn seed crack identification device, comprising:
the acquisition unit is used for acquiring a corn seed image to be identified;
the identification unit is used for identifying the corn seed image through a first neural network model so as to identify whether corn seeds in the corn seed image have cracks or not, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set; and
and the output unit is used for outputting the recognition result of whether the corn seeds in the corn seed image to be recognized have cracks or not.
In one embodiment, the present invention also provides a corn seed crack identification system comprising:
the identification management platform is used for identifying the corn seed image through a first neural network model so as to identify whether the corn seeds in the corn seed image have cracks or not;
and the acquisition terminal is used for acquiring the corn seed image and sending the corn seed image to the identification management platform for identification.
In one embodiment, the present invention further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the corn seed crack identification method according to the above embodiment.
In one embodiment, the present invention further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, causes the processor to execute the steps of the method for identifying corn seed cracks of the above embodiment.
According to the corn seed crack identification method, the corn seed crack identification device, the corn seed crack identification system, the corn seed crack identification equipment and the storage medium, the neural network model is established to identify the corn seed image, the traditional backward means of manually identifying whether the corn seeds have cracks is eliminated, the automation degree of the whole identification process is high, the identification efficiency is high, and the working time and the labor cost are effectively saved.
Drawings
FIG. 1 is a diagram of an environment in which a method for identifying cracks in corn seeds is applied according to an embodiment;
FIG. 2 is a flow chart of a method of corn seed crack identification provided in one embodiment;
FIG. 3 is a flow diagram for obtaining a first neural network model provided in one embodiment;
FIG. 4 is a schematic representation of a corn seed image provided in one embodiment;
FIG. 5 is a schematic diagram of a convolutional neural network model provided in one embodiment;
FIG. 6 is a block diagram of a corn seed crack identification apparatus provided in one embodiment;
FIG. 7 is a block diagram of a corn seed crack identification system provided in one embodiment;
FIG. 8 is a block diagram showing an internal configuration of a computer device according to one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the corn seed crack identification method, the corn seed crack identification device, the corn seed crack identification system, the corn seed crack identification equipment and the storage medium, the neural network model is established to identify the corn seed image, the traditional backward means of manually identifying whether the corn seeds have cracks is eliminated, the automation degree of the whole identification process is high, the identification efficiency is high, and the working time and the labor cost are effectively saved.
Fig. 1 is a diagram illustrating an implementation environment of a method for identifying corn seed cracks according to an embodiment of the present invention, and only the parts related to the embodiment of the present invention are shown for convenience of illustration. In the application environment, the identification management platform 110, the collection terminal 120 and the corn seeds 130 are included.
The identification management platform 110 may be an independent physical server or terminal, may also be a server cluster composed of a plurality of physical servers, may be a cloud server providing basic cloud computing services such as a cloud server, a cloud database, a cloud storage, and a CDN (Content Delivery Network), and may include a module for inputting and outputting data and displaying a result.
The collecting terminal 120 may be a device with a camera function, and may be a mobile phone, a camera, or a camera device including both, and the brightness and definition of the collected image are to be clear for naked eyes to recognize, and the collected image can be uploaded to the recognition management platform 110 for processing.
In the embodiment of the invention, the corn seeds 130 are photographed through the acquisition terminal 120 to obtain the corn seed image, the corn seed image is uploaded to the recognition management platform 110 to enable the neural network model to analyze and recognize the corn seed image so as to recognize whether the corn seeds in the corn seed image have cracks or not, and the recognition result of whether the corn seeds in the corn seed image have cracks or not is output.
Example one
Fig. 2 shows a flowchart of a method for identifying corn seed cracks according to an embodiment of the present invention, and this embodiment is mainly illustrated by applying the method to the identification management platform 110 in fig. 1, and specifically may include the following steps:
step S201, obtaining a corn seed image to be identified;
step S202, identifying the corn seed image through a first neural network model to identify whether the corn seeds in the corn seed image have cracks, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set;
and step S203, outputting an identification result of whether the corn seeds in the corn seed image to be identified have cracks.
In the embodiment of the invention, the neural network is an arithmetic mathematical model which simulates the behavior characteristics of the animal neural network and performs distributed parallel information processing, and the method is widely applied in the field of image recognition, and the principle of the method is not explained.
As shown in fig. 3, which is a flowchart of acquiring a first neural network model in the embodiment of the present invention, before step S202, that is, before the corn seed image is identified by the first neural network model, the method further includes:
step S301, acquiring a corn seed image data set marked with cracks or not, wherein the corn seed image data set is divided into a training data set and a testing data set according to a preset rule;
step S301, training a second neural network model by using the corn seed images in the training data set;
step S301, identifying the corn seed images in the test data set by using a second neural network model trained by the training data set, and calculating the identification accuracy;
and if the accuracy reaches a preset range, using the second neural network model as the first neural network model.
In the embodiment of the invention, the training data set and the testing data set are both sets containing corn seed images, the corn seed image data set is established by collecting the corn seed images in advance and carrying out classification marking according to whether the seeds have cracks, the corn seed image data set is uploaded to the identification management platform 110, and the platform receives the images and then randomly groups the images to form the training data set and the testing data set.
Fig. 4 is an exemplary diagram of a corn seed image provided by the present invention. In the embodiment of the invention, the corn seeds are divided into a front side (with embryo) facing upwards and a back side (without embryo) facing upwards according to different placing directions, and the corresponding corn seed images are divided into a corn seed image with crack facing upwards (figure 4 a), a corn seed image with crack facing upwards (figure 4 b), a corn seed image with crack facing upwards (figure 4 c) and a corn seed image with crack facing upwards (figure 4 d).
In an embodiment of the present invention, in order to be trained adequately, the corn seed image dataset contains 150 corn seed images each of corn seed right side up and cracked, corn seed right side up and crack free, corn seed back side up and cracked, and corn seed back side up and crack free (the numbers are merely examples, including the numbers mentioned above and below are for illustration and not intended to be limiting). The invention identifies the corn seed image through the neural network model, and whether the image on the front side or the back side of the corn seed has cracks can be identified at one time, thereby reducing the repeated amount of identification work, reducing the operation difficulty and improving the identification efficiency.
In other embodiments of the present invention, a large number of images may be selected for training, or multiple times of training may be performed, for example, after a test data set is identified by using a neural network model obtained after training the training data set, the correctly identified images are used as a training data set for further training again, so as to enhance the identification accuracy of the neural network model.
In the embodiment of the invention, after a training data set and a test data set are randomly formed, the training data set comprises 420 corn seed images, the test data set comprises 180 corn seed images, and whether cracks exist in the corn seed images or not is manually marked, wherein the cracks include positions and general shapes of the cracks on the images when the cracks exist; the characteristics convenient for neural network model identification are marked in the corn seed image, so that the positions of corn cracks in the corn seed image can be easily found in the learning process of the neural network model.
In an embodiment of the present invention, the second neural network model is a convolutional neural network model, the convolutional neural network model includes a plurality of network layers, an output of each layer is an input of a next layer, and the convolutional neural network model includes:
training a second neural network model using the corn seed images in the training data set, comprising:
receiving a corn kernel image by a data input layer;
performing convolution, pooling and normalization operations on the corn seed image through at least one intermediate convolution layer to obtain local features;
performing comprehensive processing on the local features extracted from the intermediate convolution layer through at least one full-connection layer;
and performing linear regression on the output of the full connection layer through the classification output layer, and calculating each classification score so as to judge whether the corn seeds in the corn seed image have cracks or not according to the scores.
Specifically, as shown in fig. 5, a schematic structural diagram of a convolutional neural network model provided in an embodiment of the present invention is shown, where the number of network layers is 6, where:
the first layer is a data input layer, which is a 64 × 64 × 3 size, RGB three-channel image of 64 × 64 pixels. In other embodiments of the present invention, the size of the data input layer can be selected according to practical situations, for example, the size of the data input layer can also be 224 × 224 × 3, i.e. 224 × 224 pixels of RGB three-channel image.
The second layer and the third layer are convolution layers, wherein the operation of the second layer of convolution layer comprises a convolution operation, a pooling operation and a normalization operation which are carried out on the image, the size of a convolution kernel is 3 multiplied by 3, the convolution moving step length is 2, the number of the convolution kernels is 64, the pooling mode is maximum pooling, the size of the pooled convolution kernel is 3 multiplied by 3, the moving step length is 2, and a ReLU function is used for carrying out normalization on the neuron activation function; the operation of the third layer of convolutional layer comprises a convolution operation, a pooling operation and a normalization operation, the size of a convolution kernel is 3 x 3, the convolution moving step is 1, the edge filling is 1, the number of the convolution kernels is 16, the pooling mode is maximum pooling, the size of the pooled convolution kernel is 3 x 3, the moving step is 2, and the ReLU function is used for normalization of the neuron activation function.
The fourth layer and the fifth layer are all connected layers, and each connected layer comprises 128 output units for integrating the local characteristics extracted from the convolution layers.
And the sixth layer is a classification output layer and is used for performing linear regression on the output of the full connection layer, calculating the score of each class and judging whether cracks exist or not according to the scores.
In the embodiment of the present invention, the classification condition of the sixth layer, i.e. the classification output layer, is evaluated by a loss function, where the loss function can be expressed as:
Figure BDA0001871903440000071
wherein, y i For true values, y _ predicted i The smaller the loss value is, the closer the representative predicted value is to the true value, and the higher the classification precision of the classification output layer is.
In the embodiment of the present invention, in training the second neural network model by using the corn seed images in the training data set, the method further includes:
learning the parameters of the established convolutional neural network model by continuously reducing the function value of the loss function by adopting a random gradient descent algorithm, wherein the random gradient descent method is to use the sample to learn the parameters and update in each iteration, and the learning parameters and update of each generation can be represented as:
Figure BDA0001871903440000081
W t+1 =W t +V t+1
where t is the number of iterations, W t As a parameter at time t, V t For the increment of time t, α is the learning rate, μ is the previous update W t The weight of (a) is determined,
Figure BDA0001871903440000082
is the partial differential of the loss function.
In the embodiment of the invention, the image in the training data set is trained on the second neural network model, the trained second neural network model is used for identifying the image in the test data set, the identification accuracy is calculated, and the obtained result is shown in the following table 1.
Table 1:
number of tests A II III Fourthly Five of them
Actually having cracks 96 (Zhang) 92 (Zhang) 85 (Zhang) 86 (Zhang) 95 (Zhang)
Correct number of cracks tested 86 (Zhang) 81 (Zhang) 75 (Zhang) 84 (Zhang) 88 (Zhang)
Practically free of cracks 84 (Zhang) 88 (Zhang) 95 (Zhang) 94 (Zhang) 85 (Zhang)
Testing correct number of non-cracking 79 (Zhang) 83 (Zhang) 89 (Zhang) 84 (Zhang) 78 (Zhang)
Accuracy rate 91.67% 91.11% 91.11% 93.33% 92.22%
In the embodiment of the invention, as shown in table 1, when the trained second neural network model is tested, 96 actual cracked corn seed images are obtained in the test data set when the corn seed images in the test data set are identified for the first time, and 86 corn seed images are correctly identified when the second neural network model is identified; the number of the corn seed images without cracks in the test data set is 84, 79 of the corn seed images are correctly identified when the second neural network model is identified, and the accuracy is 91.67%. Meanwhile, in order to avoid the contingency when the second neural network model is identified, the embodiment of the invention additionally performs 4 times of tests, and also respectively adopts 180 randomly screened corn seed images for identification, and finally obtained accuracy results are respectively as follows: 91.11%, 93.33% and 92.22%, it can be seen that in the embodiment of the present invention, the correct rate of the second neural network model for identifying the maize seed cracks reaches more than 90%, the identification accuracy is high, and the application reliability is strong.
Further, if the accuracy in the above embodiment reaches a preset value, the neural network model may be directly deployed on the recognition management platform to start using; if the accuracy rate does not reach the preset value, images in the training data set which are identified correctly need to be identified continuously, and a neural network model with stronger adaptability is obtained. The preset value can be freely set according to actual conditions, and one embodiment of the invention sets the preset value to be 90%. Therefore, the second neural network model established in the embodiment of the application can meet the requirements after being trained, and can be used as the first neural network model for identifying the corn seed image.
In the embodiment of the invention, the corn seed image is analyzed through the neural network model to identify whether the corn seed has cracks, the traditional backward means of manually identifying whether the corn seed has cracks is eliminated, the automation degree of the whole identification process is high, the identification efficiency is high, and the working time and the labor cost are effectively saved.
Example two
Fig. 6 is a block diagram illustrating a corn seed crack detection device suitable for use in an embodiment of the present invention, and for convenience of illustration, only the part related to the embodiment of the present invention is shown, where the corn seed crack detection device includes:
the acquisition unit 601 is used for acquiring a corn seed image to be identified;
the identification unit 602 is configured to identify the corn seed image through a first neural network model to identify whether corn seeds in the corn seed image have cracks, where the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set; and
the output unit 603 is configured to output a recognition result indicating whether there is a crack in the corn seed image to be recognized.
In the embodiment of the present invention, the corn crack recognition apparatus further includes a neural network model establishing unit 604, which performs training and testing on a neural network model before the recognition unit 602 recognizes the corn seed image through the first neural network model, and the specific steps include:
acquiring a corn seed image data set marked whether cracks exist or not; dividing the corn seed image data set into a training data set and a testing data set according to a preset rule;
training a second neural network model using the corn seed images in the training data set;
identifying the corn seed images in the test data set by using a second neural network model trained by the training data set, and calculating the identification accuracy;
and if the accuracy reaches a preset range, using the second neural network model as the first neural network model.
In the embodiment of the invention, the training data set and the test data set are both sets containing corn seed images, the corn seed image data set is established by collecting the corn seed images in advance and carrying out classification marking according to whether the corn seeds have cracks, the corn seed image data set is uploaded to the recognition management platform 110, and the platform receives the images and then randomly groups the images to form the training data set and the test data set.
In an embodiment of the invention, the corn seed image dataset comprises corn seed image with corn seed right side up and cracked, corn seed right side up and crack free, corn seed back side up and cracked, and corn seed back side up and crack free. The invention identifies the corn seed image through the neural network model, and whether the image on the front side or the back side of the corn seed has cracks can be identified at one time, thereby reducing the repeated amount of identification work and improving the identification efficiency.
When the corn seed images in the corn seed image data set are classified and marked, if cracks exist, the positions and the general shapes of the cracks on the images need to be marked, namely, the characteristics which are convenient for neural network identification are marked in the corn seed images, so that the positions of the corn cracks in the corn seed images can be easily found by a neural network model in the learning process.
In an embodiment of the present invention, the second neural network model is a convolutional neural network model, the convolutional neural network model includes a plurality of network layers, an output of each layer is an input of a next layer, and the convolutional neural network model includes:
training a second neural network model using the corn kernel images in the training data set, comprising:
receiving a corn kernel image by a data input layer;
performing convolution, pooling and normalization operations on the corn seed image through at least one intermediate convolution layer to obtain local features;
performing comprehensive processing on the local features extracted from the intermediate convolution layer through at least one full-connection layer;
and performing linear regression on the output of the full connection layer through the classification output layer, and calculating each classification score so as to judge whether the corn seeds in the corn seed image have cracks or not according to the score.
Specifically, in the convolutional neural network model provided in the embodiment of the present invention, the number of network layers is 6, where:
the first layer is a data input layer, the size of the data input layer is 64 multiplied by 3, namely, an RGB three-channel image of 64 multiplied by 64 pixels;
the second layer and the third layer are convolutional layers, wherein the operation of the convolutional layer of the second layer comprises one convolution operation, one pooling operation and one normalization operation on the image, the size of a convolution kernel is 3 multiplied by 3, the convolution moving step length is 2, the number of the convolution kernels is 64, the pooling mode is maximum pooling, the size of the pooled convolution kernel is 3 multiplied by 3, the moving step length is 2, and a ReLU function is used for carrying out normalization on a neuron activation function; the operation of the third layer of convolution layer comprises a convolution operation, a pooling operation and a normalization operation, wherein the size of a convolution kernel is 3 multiplied by 3, the convolution moving step length is 1, the edge filling is 1, the number of the convolution kernels is 16, the pooling mode is maximum pooling, the size of the pooled convolution kernel is 3 multiplied by 3, the moving step length is 2, and a ReLU function is used for carrying out normalization on a neuron activation function;
the fourth layer and the fifth layer are all fully connected layers and comprise 128 output units for integrating the local characteristics extracted by the convolution layers;
and the sixth layer is a classification output layer and is used for performing linear regression on the output of the full connection layer, calculating the score of each class and judging whether cracks exist or not according to the scores.
In the embodiment of the present invention, the classification condition of the sixth layer, i.e. the classification output layer, is evaluated by a loss function, where the loss function can be expressed as:
Figure BDA0001871903440000121
wherein, y i For true values, y _ predicted i The smaller the loss value is, the closer the representative predicted value is to the true value, and the higher the classification precision of the classification output layer is.
In the embodiment of the present invention, in training the second neural network model by using the corn seed images in the training data set, the method further includes:
learning the parameters of the established convolutional neural network model by continuously reducing the function value of the loss function by adopting a random gradient descent algorithm, wherein the random gradient descent method is to use the sample to learn parameters and update in each iteration, and the learning parameters and the update of each generation can be expressed as:
Figure BDA0001871903440000122
W t+1 =W t +V t+1
where t is the number of iterations, W t As a parameter at time t, V t For the increment at time t, α is the learning rate, μ is the previous update W t The weight of (a) is determined,
Figure BDA0001871903440000123
is a partial differential of the loss function.
In the embodiment of the invention, the convolutional neural network is utilized to recognize and learn the images in the training data set, and a relatively perfect neural network model is gradually formed through a large amount of image recognition. After obtaining the neural network model, identifying the test data set by using the neural network model, and recording the identification accuracy, wherein if the accuracy reaches a preset value, the neural network model can be directly deployed on an identification management platform to start use; if the accuracy rate does not reach the preset value, the images in the training data set which are identified correctly need to be identified continuously, a neural network model with stronger adaptability is obtained, the preset value can be freely set according to the actual situation, and the method is not limited further.
In the embodiment of the invention, the corn seed image is analyzed through the neural network model to identify whether the corn seeds have cracks, the traditional backward means of manually identifying whether the corn seeds have cracks is eliminated, the automation degree of the whole identification process is high, the identification efficiency is high, and the working time and the labor cost are effectively saved.
EXAMPLE III
In an embodiment of the present invention, as shown in fig. 7, a corn seed crack recognition system is provided, which includes:
the identification management platform 701 is used for identifying the corn seed image through the first neural network model so as to identify whether the corn seeds in the corn seed image have cracks or not;
and the acquisition terminal 702 is used for acquiring the corn seed image and sending the corn seed image to the identification management platform 701 for identification.
In the embodiment of the present invention, when the collecting terminal 702 collects the corn kernel image, the corn kernel may be placed on a light-transmitting plate, the light source is placed under the light-transmitting plate, the camera shoots above the corn kernel to obtain the corn kernel picture, the corn kernel is randomly placed, and the front side (the side with the embryo) faces upward or the back side faces upward.
In other embodiments of the invention, other shooting methods can be adopted as long as the cracks of the corn seeds in the corn seed image are ensured to be clear and visible to naked eyes.
Example four
As shown in fig. 8, which is a block diagram of a computer device according to an embodiment of the present invention, the computer device according to an embodiment of the present invention includes a memory 801, a processor 802, a communication module 803, and a user interface 804.
The memory 801 has stored therein an operating system 805 for handling various basic system services and programs for performing hardware-related tasks; application software 806 is also stored for implementing the steps of the corn seed crack identification method in the embodiment of the invention.
In embodiments of the present invention, the memory 801 may be a high-speed random access memory such as DRAM, SRAM, DDR, RAM, or other random access solid state memory device, or a non-volatile memory such as one or more hard disk storage devices, optical disk storage devices, memory devices, or the like.
In an embodiment of the present invention, the processor 802 may receive and transmit data through the communication module 803 to implement network communication or local communication.
The user interface 804 may include one or more input devices 807 such as a keyboard, mouse, touch screen display, and the user interface 804 may also include one or more output devices 808 such as a display, microphone, and the like.
EXAMPLE five
In addition, the embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the steps of the corn seed crack identification method.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (7)

1. The corn seed crack identification method is characterized by comprising the following steps:
acquiring a corn seed image to be identified;
identifying the corn seed image through a first neural network model to identify whether corn seeds in the corn seed image have cracks, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set;
outputting an identification result of whether the corn seeds in the corn seed image to be identified have cracks;
before the identifying the corn seed image through the first neural network model, the method further comprises:
acquiring a corn seed image data set marked with cracks or not, wherein the corn seed image data set is divided into a training data set and a testing data set according to a preset rule;
training the second neural network model using the corn kernel images in the training data set;
identifying the corn seed images in the test data set by using the second neural network model after the training data set is trained, and calculating the identification accuracy;
if the accuracy reaches a preset range, using the second neural network model as the first neural network model;
the second neural network model is a convolutional neural network model, the convolutional neural network model includes a plurality of network layers, an output of each layer is an input of the next layer:
the training of the second neural network model using the corn seed images in the training data set comprises:
receiving a corn kernel image by a data input layer;
performing convolution, pooling and normalization operations on the corn seed image through at least one intermediate convolution layer to obtain local features;
comprehensively processing the local features extracted by the intermediate convolution layer through at least one full-connection layer;
performing linear regression on the output of the full connection layer through a classification output layer, and calculating each classification score so as to judge whether the corn seeds in the corn seed image have cracks or not according to the score;
evaluating the classification condition of the classification output layer through a loss function, wherein the loss function can be expressed as:
Figure DEST_PATH_IMAGE001
wherein, y i Y _ predicted as true value i The smaller the loss value is, the closer the representative predicted value is to the true value, and the higher the classification precision of the classification output layer is.
2. The method for identifying corn seed cracks as claimed in claim 1, wherein the training of the second neural network model using the corn seed images in the training data set further comprises:
learning the parameters of the established convolutional neural network model by continuously reducing the function value of the loss function by adopting a random gradient descent algorithm, wherein the random gradient descent method is to use a sample to learn parameters and update in each iteration, and the learning parameters and the update of each generation can be expressed as:
V i+1 =μV t -α▽loss(W i );
W t+1 =W t +V t+1
where t is the number of iterations, W t Is a parameter at time t, V t For the increment at time t, α is the learning rate, μ is the previous update W t Weight of ∑ loss (W) i ) Is the partial differential of the loss function.
3. The method for identifying the cracks of the corn seeds as claimed in claim 1, wherein the image of the corn seeds is an image of the front surface or the back surface of the corn seeds.
4. A corn seed crack identification device, comprising:
the acquisition unit is used for acquiring a corn seed image to be identified;
the identification unit is used for identifying the corn seed image through a first neural network model so as to identify whether corn seeds in the corn seed image have cracks or not, wherein the first neural network model is obtained by training parameters in a second neural network model through a preset corn seed image data set; and
the output unit is used for outputting an identification result of whether the corn seeds in the corn seed image to be identified have cracks or not;
before the corn seed image is identified through the first neural network model, the method further comprises the following steps:
acquiring a corn seed image data set marked with cracks or not, wherein the corn seed image data set is divided into a training data set and a testing data set according to a preset rule;
training the second neural network model using the corn seed images in the training data set;
identifying the corn seed images in the test data set by using the second neural network model after the training data set is trained, and calculating the identification accuracy;
if the accuracy reaches a preset range, using the second neural network model as the first neural network model;
the second neural network model is a convolutional neural network model, the convolutional neural network model includes a plurality of network layers, an output of each layer is an input of the next layer:
the training of the second neural network model using the corn seed images in the training data set comprises:
receiving a corn kernel image by a data input layer;
performing convolution, pooling and normalization operations on the corn seed image through at least one intermediate convolution layer to obtain local features;
comprehensively processing the local features extracted by the intermediate convolution layer through at least one full-connection layer;
performing linear regression on the output of the full connection layer through a classification output layer, and calculating each classification score to judge whether the corn seeds in the corn seed image have cracks or not according to the score;
evaluating the classification condition of the classification output layer through a loss function, wherein the loss function can be expressed as:
Figure 494488DEST_PATH_IMAGE001
wherein, y i For true values, y _ predicted i The smaller the loss value is, the closer the representative predicted value is to the true value, and the higher the classification precision of the classification output layer is.
5. A corn seed cracking identification system, the corn seed cracking identification system comprising:
the identification management platform is used for identifying the corn seed image through a first neural network model so as to identify whether the corn seeds in the corn seed image have cracks or not;
the acquisition terminal is used for acquiring the corn seed image and sending the corn seed image to the identification management platform for identification;
before the corn seed image is identified through the first neural network model, the method further comprises the following steps:
acquiring a corn seed image data set marked with cracks or not, wherein the corn seed image data set is divided into a training data set and a testing data set according to a preset rule;
training a second neural network model using the corn kernel images in the training data set;
identifying the corn seed images in the test data set by using the second neural network model after the training data set is trained, and calculating the identification accuracy;
if the accuracy reaches a preset range, using the second neural network model as the first neural network model;
the second neural network model is a convolutional neural network model, the convolutional neural network model includes a plurality of network layers, an output of each layer is an input of the next layer:
the training of the second neural network model using the corn seed images in the training data set comprises:
receiving a corn kernel image by a data input layer;
performing convolution, pooling and normalization operations on the corn seed image through at least one intermediate convolution layer to obtain local features;
comprehensively processing the local features extracted from the intermediate convolution layer through at least one full-connection layer;
performing linear regression on the output of the full connection layer through a classification output layer, and calculating each classification score to judge whether the corn seeds in the corn seed image have cracks or not according to the score;
evaluating the classification condition of the classification output layer through a loss function, wherein the loss function can be expressed as:
Figure 677208DEST_PATH_IMAGE001
wherein, y i For true values, y _ predicted i The smaller the loss value is, the closer the representative predicted value is to the true value, and the higher the classification precision of the classification output layer is.
6. A computer device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of a method of corn seed crack identification as claimed in any one of claims 1 to 3.
7. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, causes the processor to carry out the steps of a method of corn seed crack identification as claimed in any one of claims 1 to 3.
CN201811381079.1A 2018-11-20 2018-11-20 Corn seed crack identification method, device, system, equipment and storage medium Active CN109766742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811381079.1A CN109766742B (en) 2018-11-20 2018-11-20 Corn seed crack identification method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811381079.1A CN109766742B (en) 2018-11-20 2018-11-20 Corn seed crack identification method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109766742A CN109766742A (en) 2019-05-17
CN109766742B true CN109766742B (en) 2022-12-06

Family

ID=66449643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811381079.1A Active CN109766742B (en) 2018-11-20 2018-11-20 Corn seed crack identification method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109766742B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110246133B (en) * 2019-06-24 2021-05-07 中国农业科学院农业信息研究所 Corn kernel classification method, device, medium and equipment
CN113791078B (en) * 2021-09-02 2023-06-13 中国农业机械化科学研究院 Batch detection method and device for internal cracks of corn seeds
CN114052070B (en) * 2021-10-26 2024-03-19 江苏大学 Germ rice enzyme deactivation device and enzyme deactivation and detection method
CN114066967B (en) * 2022-01-11 2022-04-22 安徽高哲信息技术有限公司 Training method and device of volume estimation model and volume estimation method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874921B (en) * 2015-12-11 2020-12-04 清华大学 Image classification method and device
CN106373150A (en) * 2016-08-15 2017-02-01 中国农业大学 Identification method of corns for seed on the basis of high resolution remote sensing data texture analysis
CN107037001A (en) * 2017-06-15 2017-08-11 中国科学院半导体研究所 A kind of corn monoploid seed discrimination method based on near-infrared spectrum technique
CN108230307B (en) * 2017-12-29 2022-01-14 浙江大学 Corn broken grain detection method based on contour centroid distance and neural network

Also Published As

Publication number Publication date
CN109766742A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN109766742B (en) Corn seed crack identification method, device, system, equipment and storage medium
Falk et al. Computer vision and machine learning enabled soybean root phenotyping pipeline
CN110197205B (en) Image identification method of multi-feature-source residual error network
Anami et al. Identification and classification of normal and affected agriculture/horticulture produce based on combined color and texture feature extraction
CN110967339B (en) Method and device for analyzing corn ear characters and corn character analysis equipment
CN110717881A (en) Wafer defect identification method and device, storage medium and terminal equipment
Benoit et al. Simulation of image acquisition in machine vision dedicated to seedling elongation to validate image processing root segmentation algorithms
CN110929944A (en) Wheat scab disease severity prediction method based on hyperspectral image and spectral feature fusion technology
CN110363218B (en) Noninvasive embryo assessment method and device
Mahajan et al. Machine vision based alternative testing approach for physical purity, viability and vigour testing of soybean seeds (Glycine max)
CN112749723A (en) Sample labeling method and device, computer equipment and storage medium
Brunes et al. Seedling length in wheat determined by image processing using mathematical tools
Hamidinekoo et al. DeepPod: a convolutional neural network based quantification of fruit number in Arabidopsis
CN113218537A (en) Training method, device, equipment and storage medium of temperature anomaly detection model
CN111914902A (en) Traditional Chinese medicine identification and surface defect detection method based on deep neural network
Yessenova et al. Application of informative textural Law's masks methods for processing space images.
Chen et al. CropQuant-Air: an AI-powered system to enable phenotypic analysis of yield-and performance-related traits using wheat canopy imagery collected by low-cost drones
Menezes et al. Pseudo-label semi-supervised learning for soybean monitoring
Patel et al. Deep Learning-Based Plant Organ Segmentation and Phenotyping of Sorghum Plants Using LiDAR Point Cloud
CN106778536B (en) Real-time hyperspectral microimage cell classification method based on FPGA
Du et al. A method for detecting the quality of cotton seeds based on an improved ResNet50 model
CN106841054B (en) Seed variety recognition methods and device
CN113705587A (en) Image quality scoring method, device, storage medium and electronic equipment
Poorni et al. Detection of rice leaf diseases using convolutional neural network
Chaugule et al. A new method using feature extraction for identifying paddy rice species for quality seed selection

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