CN110210355B - Paddy field weed species identification method and system and target position detection method and system - Google Patents

Paddy field weed species identification method and system and target position detection method and system Download PDF

Info

Publication number
CN110210355B
CN110210355B CN201910437562.5A CN201910437562A CN110210355B CN 110210355 B CN110210355 B CN 110210355B CN 201910437562 A CN201910437562 A CN 201910437562A CN 110210355 B CN110210355 B CN 110210355B
Authority
CN
China
Prior art keywords
weed
transfer learning
species identification
target position
weed species
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
CN201910437562.5A
Other languages
Chinese (zh)
Other versions
CN110210355A (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.)
South China Agricultural University
Original Assignee
South China Agricultural University
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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN201910437562.5A priority Critical patent/CN110210355B/en
Publication of CN110210355A publication Critical patent/CN110210355A/en
Application granted granted Critical
Publication of CN110210355B publication Critical patent/CN110210355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes

Abstract

The invention discloses a method and a system for identifying the types of weeds in a rice field and a method and a system for detecting a target position, wherein the method for identifying the types of weeds in the rice field comprises the following steps: identifying an image sample set according to weed species to obtain a transfer learning training set; constructing a weed species recognition model based on transfer learning according to the transfer learning training set; carrying out species identification on the weed image to be identified by using a weed species identification model based on transfer learning, and outputting the weed species of the weed image to be identified; the detection method for the target position of the weeds in the paddy field comprises the following steps: detecting an image sample set according to the weed target position to obtain a transfer learning training set; constructing a weed target position detection model based on transfer learning according to the transfer learning training set; and carrying out weed target position detection on the weed image to be detected by using a weed target position detection model based on transfer learning, and outputting the weed target position of the weed image to be detected. The invention has important significance for the accurate prevention and control of weeds in rice fields.

Description

Paddy field weed species identification method and system and target position detection method and system
Technical Field
The invention relates to a method for identifying weed species in a rice field and a method for detecting a target position, in particular to a method and a system for identifying weed species in a rice field, a method and a system for detecting a target position of weed in a rice field, computer equipment and a storage medium, and belongs to the technical field of image processing and deep learning.
Background
At present, the rice field weeds are mainly prevented and controlled by chemical agents, and a large-area uniform spraying mode is mainly adopted at present, so that the mode easily causes the excessive application of the herbicide. Therefore, in the control and control of weeds in paddy fields, reasonable herbicides are selected according to the types and the positions of the weeds to carry out targeted spraying, so that the application amount of the herbicides is reduced.
Because the existing deep learning method is widely used, a deep convolutional neural network is adopted to newly build and train a paddy field weed species identification model and a weed target position detection model, a large number of image samples are needed, and in specific agricultural application, the time and labor are consumed for field acquisition and construction of a large sample image data set.
Disclosure of Invention
In view of the above, the invention provides a method and a system for identifying the types of weeds in rice fields, a method and a system for detecting the target positions of weeds in rice fields, computer equipment and a storage medium, which are based on pre-training of a convolutional neural network and combined with transfer learning to perform type identification and target detection on weeds in rice fields, and have important significance for accurate prevention and control of weeds in rice fields.
The first object of the present invention is to provide a method for identifying the kind of weeds in rice fields.
The second purpose of the invention is to provide a method for detecting the target position of the weeds in the rice field.
The third object of the present invention is to provide a rice field weed species identification system.
The fourth purpose of the invention is to provide a rice field weed target position detection system.
A fifth object of the present invention is to provide a computer apparatus.
It is a sixth object of the present invention to provide a storage medium.
The first purpose of the invention can be achieved by adopting the following technical scheme:
a method of identifying species of weeds in a rice field, the method comprising:
acquiring images of rice seedlings and weeds in a seedling stage;
marking weed categories on the weed images, and constructing a weed category identification image sample set;
identifying an image sample set according to weed species to obtain a transfer learning training set;
constructing a weed species recognition model based on transfer learning according to the transfer learning training set;
and carrying out species identification on the weed image to be identified by using the weed species identification model based on transfer learning, and outputting the weed species of the weed image to be identified.
Further, the identifying of the image sample set according to the weed species obtains a transfer learning training set, and specifically includes:
carrying out scale transformation on image samples in the weed species identification image sample set to a specified input scale of a pre-training weed species identification model;
randomly extracting a certain proportion of image samples from the weed species identification image sample set after the scale transformation to serve as a transfer learning training set.
Further, the constructing of the weed species identification model based on the transfer learning according to the transfer learning training set specifically includes:
initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters;
inputting the transfer learning training set into a weed species recognition model, and training the weed species recognition model according to set training parameters to obtain the weed species recognition model based on transfer learning.
The second purpose of the invention can be achieved by adopting the following technical scheme:
a method for detecting a target location of a weed in a rice field, the method comprising:
acquiring images of rice seedlings and weeds in a seedling stage;
carrying out graphic frame marking on the weed image, and constructing a weed target position detection image sample set;
detecting an image sample set according to the weed target position to obtain a transfer learning training set;
constructing a weed target position detection model based on transfer learning according to the transfer learning training set;
and carrying out weed target position detection on the weed image to be detected by using a weed target position detection model based on transfer learning, and outputting the weed target position of the weed image to be detected.
Further, the detecting an image sample set according to the weed target position to obtain a transfer learning training set specifically includes:
carrying out scale transformation on image samples in the weed target position detection image sample set to a specified input scale size of a pre-training weed target position detection model;
randomly extracting a certain proportion of image samples from the weed target position detection image sample set after scale transformation to serve as a transfer learning training set.
Further, the constructing a weed target position detection model based on transfer learning according to the transfer learning training set specifically includes:
initializing parameters of the weed target position detection model in a mode of pre-training the weed target position detection model for parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed target position detection model, and setting training parameters;
inputting the transfer learning training set into a weed target position detection model, and training the weed target position detection model according to set training parameters to obtain a weed species identification model based on transfer learning.
The third purpose of the invention can be achieved by adopting the following technical scheme:
a rice field weed species identification system, the system comprising:
the first acquisition module is used for acquiring images of rice seedlings and weeds in a seedling stage;
the first construction module is used for marking weed categories on the weed images and constructing a weed category identification image sample set;
the second acquisition module is used for identifying the image sample set according to the weed species and acquiring a transfer learning training set;
the second construction module is used for constructing a weed species identification model based on the transfer learning according to the transfer learning training set;
and the identification module is used for identifying the species of the weed image to be identified by using the weed species identification model based on the transfer learning and outputting the weed species of the weed image to be identified.
The fourth purpose of the invention can be achieved by adopting the following technical scheme:
a rice field weed target location detection system, the system comprising:
the first acquisition module is used for acquiring images of rice seedlings and weeds in a seedling stage;
the first construction module is used for carrying out graphic frame marking on the weed image and constructing a weed target position detection image sample set;
the second acquisition module is used for detecting an image sample set according to the weed target position and acquiring a transfer learning training set;
the second construction module is used for constructing a weed target position detection model based on the transfer learning according to the transfer learning training set;
and the detection module is used for detecting the weed target position of the weed image to be detected by using the weed target position detection model based on the transfer learning and outputting the weed target position of the weed image to be detected.
The fifth purpose of the invention can be achieved by adopting the following technical scheme:
a computer device comprising a processor and a memory for storing a program executable by the processor, wherein the processor implements the above-mentioned paddy field weed species identification method or the above-mentioned paddy field weed target location detection method when the program stored in the memory is executed.
The sixth purpose of the invention can be achieved by adopting the following technical scheme:
a storage medium storing a program which, when executed by a processor, implements the above-described paddy field weed species identification method or implements the above-described paddy field weed target location detection method.
Compared with the prior art, the invention has the following beneficial effects:
aiming at the rice seedlings and the weed images in the seedling stage, the parameters of the pre-trained weed species identification model can be migrated into a weed species identification task, or the network parameters of the pre-trained weed target detection model can be migrated into a weed target position detection task, because the parameters of the pre-trained convolutional neural network are fully trained on a weed species identification image sample set or a weed target position detection image sample set, the model (the weed species identification model or the weed target detection model) has good robustness and generalization capability, and meanwhile, the migration learning method can discover the characteristics and the structure of the field invariance between two mutually related and different areas, so that supervised information (such as labeled data and the like) can be directly migrated and reused in the field, and the species identification and the target detection can be carried out on the weeds in the rice field by combining the migration learning on the basis of the pre-trained convolutional neural network, has important significance for the accurate prevention and control of weeds in rice fields.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flowchart of a paddy field weed species identification method of example 1 of the present invention.
Fig. 2a is a schematic image of alternanthera philoxeroides in a weed species identification image sample set according to embodiment 1 of the present invention.
Fig. 2b is a schematic image diagram of a set of ludwigia prostrata in the weed species identification image sample of example 1 of the present invention.
Fig. 2c is a schematic view of an image of snakehead gut collected from a weed species identification image sample according to example 1 of the present invention.
Fig. 2d is a schematic image of the field arrowhead in the weed species identification image sample set in example 1 of the present invention.
Fig. 2e is a schematic image of barnyard grass in the sample set of weed species identification images of example 1 of the present invention.
Fig. 2f is a schematic image of a thousand-gold seed in a weed species identification image sample set according to embodiment 1 of the present invention.
Fig. 3 is a diagram showing the structure of AlexNet network in the weed species recognition model of example 1 of the present invention.
Fig. 4 is a diagram showing the inclusion structure of the google lenet network in the weed species recognition model of example 1 of the present invention.
FIG. 5 is a schematic diagram of the VGG-16 network structure in the weed species identification model of example 1 of the present invention.
Fig. 6 is a schematic view of training of the weed species recognition model in embodiment 1 of the present invention.
Fig. 7 is a flowchart of a paddy field weed target location detection method of embodiment 2 of the present invention.
Fig. 8a is a schematic diagram of an image sample a in a weed target location detection image sample set according to embodiment 2 of the present invention.
Fig. 8B is a schematic diagram of an image sample B in the weed target location detection image sample set according to embodiment 2 of the present invention.
FIG. 9 is a schematic diagram of the weed target detection model of example 2 of the present invention.
Fig. 10a is a schematic diagram of the weed target detection result of the image sample a in the test set according to example 2 of the present invention.
Fig. 10B is a schematic diagram of the weed target detection result of the image sample B in the test set according to example 2 of the present invention.
Fig. 11 is a block diagram showing the structure of a paddy field weed species identification system according to example 3 of the present invention.
Fig. 12 is a block diagram showing the structure of a system for detecting a target location of weeds in a paddy field according to embodiment 4 of the present invention.
Fig. 13 is a block diagram of a computer device according to embodiment 5 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.
Example 1:
as shown in fig. 1, the present example provides a method for identifying weed species in a rice field, comprising the steps of:
s101, obtaining images of rice seedlings and weeds in the seedling stage.
The image of the rice seedling and the seedling-stage weed obtained in this embodiment is an RGB image of the rice seedling and the seedling-stage weed, and can be obtained by acquiring, for example, shooting the RGB image of the rice seedling and the seedling-stage weed by a camera under natural conditions, or searching and obtaining from a database, for example, storing the RGB image of the rice seedling and the seedling-stage weed in a memory in the database in advance, and searching the RGB image of the rice seedling and the seedling-stage weed from the database.
S102, marking weed categories on the weed images, and constructing a weed species identification image sample set.
Specifically, the weed categories can be manually labeled, specifically: the user inputs an annotation command, and then responds to the annotation command, corresponding weed categories are labeled on each weed image, a weed species identification image sample set is constructed, six weed images of the weed species identification image sample set are shown in fig. 2 a-2 f, and are respectively alligator alternanthera, eclipta prostrata, polygonum hydropiper, edible tulip, barnyard grass and moleplant seed images, although the images required to be obtained are color images, for the convenience of patent application, black and white images are shown in fig. 2 a-2 f.
S103, identifying an image sample set according to the weed species, and obtaining a transfer learning training set.
Further, the step S103 includes:
and S1031, carrying out scale transformation on the image samples in the weed species identification image sample set to the specified input scale size of the pre-trained weed species identification model.
The weed species identification model is constructed based on a Convolutional Neural Network (CNN), and comprises an AlexNet Network, a GoogleNet Network and a VGG16 Network, wherein the AlexNet Network is shown in fig. 3, the Incep structure of the GoogleNet Network is shown in fig. 4, and the VGG16 Network is shown in fig. 5.
Image samples in the weed species identification image sample set are scaled to prescribed input scales 227 × 227, 224 × 224, and 224 × 224 of the AlexNet network, VGG16 network, and google lenet network in the pre-trained weed species identification model.
S1032, randomly extracting image samples with a certain proportion from the weed species identification image sample set after scale transformation to serve as a transfer learning training set.
In the present embodiment, 70% of the image samples (large samples, 650 total images) are randomly extracted from the scaled weed species identification image sample set as the migration learning training set, and the remaining 30% of the image samples (small samples, 278 total images) are used as the test set.
And S104, constructing a weed species recognition model based on transfer learning according to the transfer learning training set.
Further, the step S104 includes:
s1041, initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration.
S1042, freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters.
The training parameters include a momentum parameter, a learning rate, MiniBatchSize, the number of iterations, a regularization parameter, and the like, and specifically, the momentum parameter is set to 0.9, the learning rate is set to 0.001, the MiniBatchSize is set to 64, the number of iterations is set to Epoch 10, and regularization is performed using L2, and the regularization parameter λ is set to 0.0005.
S1043, inputting the migration learning training set into a weed species recognition model, and training the weed species recognition model according to set training parameters to obtain the weed species recognition model based on the migration learning.
The schematic diagram of the training of the weed species identification model is shown in fig. 6, and since the size of the transfer learning training set is 650, one iteration can be completed by 10 batches, that is, the total number of iterations is 100.
And S105, carrying out species identification on the weed image to be identified by using the weed species identification model based on the transfer learning, and outputting the weed species of the weed image to be identified.
In the embodiment, the image samples of the test set are used as weed images to be identified, 278 image samples of the test set are respectively 73 snakehead intestines, 27 ludwigia prostrata, 50 alternanthera philoxeroides, 50 stephania japonica, 29 staph ruditapes and 49 barnyard grasses, the image samples are input into a weed species identification model based on migration learning for testing, and the test results are shown in the following table 1, it can be seen that the identification rate of the VGG16 network is the highest, and the VGG16 network can be selected for later paddy field weed species identification.
TABLE 1 identification results of six types of weeds in rice field
Figure BDA0002070993070000071
Example 2:
as shown in fig. 7, the present embodiment provides a method for detecting a target position of weeds in a rice field, comprising the steps of:
s701, obtaining images of rice seedlings and weeds in the seedling stage.
Step 701 is the same as step S101 of embodiment 1, and is not repeated herein.
And S702, carrying out graphic frame marking on the weed image, and constructing a weed target position detection image sample set.
Specifically, the weed target position may be marked by a graphic frame, specifically: the user inputs a graphic frame marking command, and then in response to the marking command, performs graphic frame marking of the weed target position on each weed image to construct a weed target position detection image sample set, wherein the graphic frame preferably adopts a rectangular frame, and fig. 8a and 8B are schematic diagrams of an image sample a and an image sample B in the weed target position detection image sample set.
And S703, detecting the image sample set according to the weed target position to obtain a transfer learning training set.
Further, the step S703 includes:
s7031, carrying out scale transformation on the image samples in the weed target position detection image sample set to the specified input scale size of the pre-training weed target position detection model.
The weed target position detection model adopts a Faster R-CNN model, and as shown in FIG. 9, image samples in the weed target position detection image sample set are subjected to scale transformation to a prescribed input scale of 300 × 300 of the pre-training weed target position detection model Faster R-CNN.
S7032, detecting an image sample set from the weed target position after scale transformation, and randomly extracting a certain proportion of image samples as a transfer learning training set.
And S704, constructing a weed target position detection model based on transfer learning according to the transfer learning training set.
Further, the step S704 includes:
s7041, initializing parameters of the weed target position detection model in a mode of pre-training the weed target position detection model to perform parameter migration.
S7042, freezing parameters of a partial convolution layer and a pooling layer of the weed target position detection model, and setting training parameters.
The training parameters include a learning rate, MiniBatchSize, the number of iterations, and the like, and specifically, the learning rate is set to 0.001, MiniBatchSize is set to 1, and the number of iterations is set to Epoch 5.
S7043, inputting the transfer learning training set into a weed target position detection model, and training the weed target position detection model according to set training parameters to obtain a weed species identification model based on transfer learning.
In order to train the recommended area network in the weed target detection model, the anchor frame needs to be judged whether the recommended area is a target or a background, the overlapping ratio of the area A of the recommended area to the area B of the expected area is I, if I is larger than 0.7, the target is set, and I is smaller than 0.3, the background is set. The overlap ratio I is shown as formula (1);
Figure BDA0002070993070000081
the weed target detection precision is actually the ratio of true posivities (tp) in the identified picture, and the overlap ratio I is shown as the formula (2);
Figure BDA0002070993070000082
wherein n represents the sum of True posives and False posives, and is the total number of recognized weeds (including the number of correct recognition and the number of wrong recognition) of the weed target detection model.
Due to the seasonal field sample collection, short weed image collection window period and other factors, the collected samples are limited, so that under the conditions of three different training samples of 100, 200 and 300, the weed target position detection model is trained through two different main networks of AlexNet and VGG 16.
S705, carrying out weed target position detection on the weed image to be detected by using the weed target position detection model based on the transfer learning, and outputting the weed target position of the weed image to be detected.
In the embodiment, the image samples of the test set are used as the weed images to be detected, the image samples are input into the weed target position detection model based on the transfer learning obtained by AlexNet main network training for testing, and the image samples are input into the weed target position detection model based on the transfer learning obtained by VGG16 main network training for testing, the test results are shown in Table 2, when the training samples are 200, parameters of the weed target detection model based on the VGG16 main network can be adjusted to be optimal and can reach 82.47%, and the weed target position detection results of the image samples A and B in the test set are respectively shown in FIGS. 10 a-10B.
TABLE 2 weed target site detection results
Figure BDA0002070993070000091
Those skilled in the art will appreciate that all or part of the steps in the method of embodiments 1-2 may be implemented by a program to instruct related hardware, and the corresponding program may be stored in a computer readable storage medium.
It should be noted that although the method operations of embodiments 1-2 above are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the depicted steps may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Example 3:
as shown in fig. 11, the present embodiment provides a rice field weed species identification system, which includes a first obtaining module 1101, a first constructing module 1102, a second obtaining module 1103, a second constructing module 1104 and an identifying module 1105, and the specific functions of each module are as follows:
the first acquisition module 1101 is used for acquiring images of rice seedlings and weeds in a seedling stage;
the first construction module 1102 is configured to label weed categories on the weed images, and construct a weed category identification image sample set.
The second obtaining module 1103 is configured to obtain a transfer learning training set according to the weed species identification image sample set.
The second constructing module 1104 is configured to construct a weed species identification model based on transfer learning according to the transfer learning training set.
The identification module 1105 is configured to perform species identification on the weed image to be identified by using the weed species identification model based on the transfer learning, and output the weed species of the weed image to be identified.
Example 4:
as shown in fig. 12, the present embodiment provides a system for detecting a target position of weeds in a rice field, which includes a first obtaining module 1201, a first constructing module 1202, a second obtaining module 1203, a second constructing module 1204 and a detecting module 1205, and the specific functions of the modules are as follows:
the first acquisition module 1201 is used for acquiring images of rice seedlings and weeds in a seedling stage.
The first constructing module 1202 is configured to perform graphic frame labeling on a weed image to construct a weed target position detection image sample set.
The second obtaining module 1203 is configured to obtain a transfer learning training set according to the image sample set detected at the weed target position.
The second constructing module 1204 is configured to construct a weed target position detection model based on transfer learning according to the transfer learning training set.
The detection module 1205 is configured to perform weed target position detection on the weed image to be detected by using the weed target position detection model based on the transfer learning, and output a weed target position of the weed image to be detected.
It should be noted that the systems provided in embodiments 3 to 4 are only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure may be divided into different functional modules to complete all or part of the functions described above.
It is to be understood that the terms "first", "second", etc. used in the systems of embodiments 3-4 above may be used to describe various modules, but the modules are not limited by these terms. These terms are only used to distinguish one module from another. For example, a first acquisition module may be referred to as a second acquisition module, and similarly, a second acquisition module may be referred to as a first acquisition module, both the first and second acquisition modules being acquisition modules, but not the same acquisition module, without departing from the scope of the present invention.
Example 5:
the present embodiment provides a computer device, which may be a computer, a server, a mobile terminal, etc., and taking a computer as an example, as shown in fig. 13, the computer device includes a processor 1302, a memory, an input device 1303, a display 1304, and a network interface 1305, which are connected through a system bus 1301. Wherein, the processor 1302 is used for providing calculation and control capability, the memory includes a nonvolatile storage medium 1306 and an internal memory 1307, the nonvolatile storage medium 1306 stores an operating system, a computer program and a database, the internal memory 1307 provides an environment for the operating system and the computer program in the nonvolatile storage medium to run, and the computer program is executed by the processor 1302, so as to implement the method for identifying the kind of weeds in the rice field according to the above embodiment 1, as follows:
acquiring images of rice seedlings and weeds in a seedling stage;
marking weed categories on the weed images, and constructing a weed category identification image sample set;
identifying an image sample set according to weed species to obtain a transfer learning training set;
constructing a weed species recognition model based on transfer learning according to the transfer learning training set;
and carrying out species identification on the weed image to be identified by using the weed species identification model based on transfer learning, and outputting the weed species of the weed image to be identified.
Example 6:
this embodiment provides a computer device, which may be a computer having the same structure as that of embodiment 5, and when being executed by a processor, the computer program realizes the method for detecting the target position of the weeds in the paddy field of embodiment 2, as follows:
acquiring images of rice seedlings and weeds in a seedling stage;
carrying out graphic frame marking on the weed image, and constructing a weed target position detection image sample set;
detecting an image sample set according to the weed target position to obtain a transfer learning training set;
and constructing a weed target position detection model based on transfer learning according to the transfer learning training set.
And carrying out weed target position detection on the weed image to be detected by using a weed target position detection model based on transfer learning, and outputting the weed target position of the weed image to be detected.
Example 7:
the present embodiment provides a storage medium storing one or more programs which, when executed by a processor, implement the paddy field weed species identification method of the above embodiment 1 as follows:
acquiring images of rice seedlings and weeds in a seedling stage;
marking weed categories on the weed images, and constructing a weed category identification image sample set;
identifying an image sample set according to weed species to obtain a transfer learning training set;
constructing a weed species recognition model based on transfer learning according to the transfer learning training set;
and carrying out species identification on the weed image to be identified by using the weed species identification model based on transfer learning, and outputting the weed species of the weed image to be identified.
Example 8:
the present embodiment provides a storage medium storing one or more programs which, when executed by a processor, implement the paddy field weed target location detection method of the above-described embodiment 2, as follows:
acquiring images of rice seedlings and weeds in a seedling stage;
carrying out graphic frame marking on the weed image, and constructing a weed target position detection image sample set;
detecting an image sample set according to the weed target position to obtain a transfer learning training set;
and constructing a weed target position detection model based on transfer learning according to the transfer learning training set.
And carrying out weed target position detection on the weed image to be detected by using a weed target position detection model based on transfer learning, and outputting the weed target position of the weed image to be detected.
The storage medium in embodiments 7 to 8 may be a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), a usb disk, a removable hard disk, or the like.
In summary, the parameters of the pre-trained weed species recognition model can be migrated to the weed species recognition task or the parameters of the pre-trained weed target detection model can be migrated to the weed target position detection task for the rice seedling and the seedling stage weed image, because the network parameters of the pre-trained convolutional neural network are fully trained on the weed species recognition image sample set or the weed target position detection image sample set, the model (the weed species recognition model or the weed target detection model) has good robustness and generalization capability, and meanwhile, the migration learning method can explore the characteristics and the structure of the relevant and different areas with unchanged fields, so that the supervised information (such as labeled data and the like) can be directly migrated and multiplexed in the fields, and on the basis of the pre-trained convolutional neural network, the method is combined with transfer learning to carry out species identification and target detection on the weeds in the rice field, and has important significance for accurate prevention and control of the weeds in the rice field.
The above description is only for the preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution and the inventive concept of the present invention within the scope of the present invention.

Claims (6)

1. A method for paddy field weed species identification and target location detection, the method comprising:
acquiring images of rice seedlings and weeds in a seedling stage;
marking a corresponding weed category on each weed image, constructing a weed species identification image sample set, marking a graphic frame of a weed target position on each weed image, and constructing a weed target position detection image sample set; wherein the weed category comprises Alternanthera philoxeroides, eclipta prostrata, ludwigia prostrata, edible tulip, barnyard grass and moleplant seed;
identifying an image sample set according to weed species to obtain a first transfer learning training set, and detecting the image sample set according to weed target positions to obtain a second transfer learning training set;
constructing a weed species recognition model based on transfer learning according to the first transfer learning training set, and constructing a weed target position detection model based on transfer learning according to the second transfer learning training set;
carrying out species identification on the weed image to be identified by using a weed species identification model based on transfer learning, carrying out weed target position detection on the weed image to be detected by using a weed target position detection model based on transfer learning, and outputting the weed species and the weed target position of the weed image to be identified;
according to the first transfer learning training set, a weed species identification model based on transfer learning is constructed, and the method specifically comprises the following steps:
initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters, wherein the training parameters comprise a momentum parameter, a learning rate, MiniBatchSize, an iteration number and a regularization parameter, the momentum parameter is set to be 0.9, the learning rate is set to be 0.001, the MiniBatchSize is set to be 64, the iteration number is set to be Epoch 10, and L2 regularization is used, and the regularization parameter lambda is set to be 0.0005;
inputting the first transfer learning training set into a weed species identification model, and training the weed species identification model according to set training parameters to obtain a weed species identification model based on transfer learning;
constructing a weed target position detection model based on transfer learning according to the second transfer learning training set, and specifically comprising the following steps of:
initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters, wherein the training parameters comprise a learning rate, MiniBatchSize and iteration times, the learning rate is set to be 0.001, the MiniBatchSize is set to be 1, and the iteration times are set to be Epoch-5;
inputting the second transfer learning training set into a weed species identification model, and training the weed species identification model according to set training parameters to obtain a weed species identification model based on transfer learning; in order to train a recommended area network in a weed target detection model, an anchor frame is required to judge whether a recommended area is a target or a background, the overlapping ratio of the area A of the recommended area to the area B of an expected area is I, if I is larger than 0.7, the target is set, and if I is smaller than 0.3, the background is set, and the overlapping ratio I is shown as the following formula;
Figure FDA0003191364940000021
the weed target detection precision is the ratio of true spots in the identified picture, and is shown as the following formula:
Figure FDA0003191364940000022
wherein n represents the sum of True posives and False posives, and is the total number of recognized weeds of the weed target detection model, including the number of correct recognition and the number of wrong recognition.
2. The method for identifying the species of the paddy field weeds and detecting the target position in the paddy field according to claim 1, wherein the step of acquiring the first transfer learning training set according to the weed species identification image sample set specifically comprises:
carrying out scale transformation on image samples in the weed species identification image sample set to a specified input scale of a pre-training weed species identification model;
randomly extracting a certain proportion of image samples from the weed species identification image sample set after the scale transformation to serve as a transfer learning training set.
3. The method for identifying the species of weeds and detecting the target positions in the paddy field according to claim 1, wherein the step of obtaining the second transfer learning training set according to the image sample set for detecting the target positions of the weeds comprises the steps of:
carrying out scale transformation on image samples in the weed target position detection image sample set to a specified input scale size of a pre-training weed target position detection model;
randomly extracting a certain proportion of image samples from the weed target position detection image sample set after scale transformation to serve as a transfer learning training set.
4. A rice field weed species identification and target location detection system, the system comprising:
the first acquisition module is used for acquiring images of rice seedlings and weeds in a seedling stage;
the first construction module is used for marking a corresponding weed category on each weed image, constructing a weed category identification image sample set, marking a graphic frame of a weed target position on each weed image, and constructing a weed target position detection image sample set; wherein the weed category comprises Alternanthera philoxeroides, eclipta prostrata, ludwigia prostrata, edible tulip, barnyard grass and moleplant seed;
the second acquisition module is used for identifying the image sample set according to the weed species, acquiring a first transfer learning training set, and detecting the image sample set according to the weed target position, and acquiring a second transfer learning training set;
the second construction module is used for constructing a weed species recognition model based on the transfer learning according to the first transfer learning training set and constructing a weed target position detection model based on the transfer learning according to the second transfer learning training set;
the identification and detection module is used for identifying the species of the weed image to be identified by using the weed species identification model based on the transfer learning, detecting the weed target position of the weed image to be detected by using the weed target position detection model based on the transfer learning, and outputting the weed species and the weed target position of the weed image to be identified;
according to the first transfer learning training set, a weed species identification model based on transfer learning is constructed, and the method specifically comprises the following steps:
initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters, wherein the training parameters comprise a momentum parameter, a learning rate, MiniBatchSize, an iteration number and a regularization parameter, the momentum parameter is set to be 0.9, the learning rate is set to be 0.001, the MiniBatchSize is set to be 64, the iteration number is set to be Epoch 10, and L2 regularization is used, and the regularization parameter lambda is set to be 0.0005;
inputting the first transfer learning training set into a weed species identification model, and training the weed species identification model according to set training parameters to obtain a weed species identification model based on transfer learning;
constructing a weed target position detection model based on transfer learning according to the second transfer learning training set, and specifically comprising the following steps of:
initializing parameters of the weed species identification model in a mode of pre-training the weed species identification model to perform parameter migration;
freezing parameters of a partial convolution layer and a pooling layer of the weed species identification model, and setting training parameters, wherein the training parameters comprise a learning rate, MiniBatchSize and iteration times, the learning rate is set to be 0.001, the MiniBatchSize is set to be 1, and the iteration times are set to be Epoch-5;
inputting the second transfer learning training set into a weed species identification model, and training the weed species identification model according to set training parameters to obtain a weed species identification model based on transfer learning; in order to train a recommended area network in a weed target detection model, an anchor frame is required to judge whether a recommended area is a target or a background, the overlapping ratio of the area A of the recommended area to the area B of an expected area is I, if I is larger than 0.7, the target is set, and if I is smaller than 0.3, the background is set, and the overlapping ratio I is shown as the following formula;
Figure FDA0003191364940000041
the weed target detection precision is the ratio of true spots in the identified picture, and is shown as the following formula:
Figure FDA0003191364940000042
wherein n represents the sum of True posives and False posives, and is the total number of recognized weeds of the weed target detection model, including the number of correct recognition and the number of wrong recognition.
5. A computer apparatus comprising a processor and a memory for storing a program executable by the processor, wherein the processor, when executing the program stored in the memory, implements the paddy field weed species identification and target location detection method according to any one of claims 1 to 3.
6. A storage medium storing a program, wherein the program, when executed by a processor, implements the paddy field weed species identification and target location detection method according to any one of claims 1 to 3.
CN201910437562.5A 2019-05-24 2019-05-24 Paddy field weed species identification method and system and target position detection method and system Active CN110210355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910437562.5A CN110210355B (en) 2019-05-24 2019-05-24 Paddy field weed species identification method and system and target position detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910437562.5A CN110210355B (en) 2019-05-24 2019-05-24 Paddy field weed species identification method and system and target position detection method and system

Publications (2)

Publication Number Publication Date
CN110210355A CN110210355A (en) 2019-09-06
CN110210355B true CN110210355B (en) 2021-11-26

Family

ID=67788510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910437562.5A Active CN110210355B (en) 2019-05-24 2019-05-24 Paddy field weed species identification method and system and target position detection method and system

Country Status (1)

Country Link
CN (1) CN110210355B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826556A (en) * 2019-10-15 2020-02-21 遂昌濠畅电子科技有限公司 Broad-spectrum crop weed identification and positioning method for improving deep learning
CN111325240A (en) * 2020-01-23 2020-06-23 杭州睿琪软件有限公司 Weed-related computer-executable method and computer system
CN111461006B (en) * 2020-03-31 2023-07-25 哈尔滨航耀光韬科技有限公司 Optical remote sensing image tower position detection method based on deep migration learning
CN111340141A (en) * 2020-04-20 2020-06-26 天津职业技术师范大学(中国职业培训指导教师进修中心) Crop seedling and weed detection method and system based on deep learning
CN111598157B (en) * 2020-05-14 2023-09-15 北京工业大学 VGG16 network level optimization-based identity card image classification method
CN113743382B (en) * 2021-11-04 2022-01-25 苏州万店掌软件技术有限公司 Shelf display detection method, device and system
CN115170973B (en) * 2022-09-05 2022-12-20 广州艾米生态人工智能农业有限公司 Intelligent paddy field weed identification method, device, equipment and medium
CN115761460B (en) * 2023-01-10 2023-08-01 北京市农林科学院智能装备技术研究中心 Greenhouse risk identification method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463937A (en) * 2017-06-20 2017-12-12 大连交通大学 A kind of tomato pest and disease damage automatic testing method based on transfer learning
CN108805160A (en) * 2018-04-17 2018-11-13 平安科技(深圳)有限公司 Transfer learning method, apparatus, computer equipment and storage medium
CN109241817A (en) * 2018-07-02 2019-01-18 广东工业大学 A kind of crops image-recognizing method of unmanned plane shooting
CN109522797A (en) * 2018-10-16 2019-03-26 华南农业大学 Rice seedling and Weeds at seedling recognition methods and system based on convolutional neural networks

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960219B (en) * 2017-03-10 2021-04-16 百度在线网络技术(北京)有限公司 Picture identification method and device, computer equipment and computer readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463937A (en) * 2017-06-20 2017-12-12 大连交通大学 A kind of tomato pest and disease damage automatic testing method based on transfer learning
CN108805160A (en) * 2018-04-17 2018-11-13 平安科技(深圳)有限公司 Transfer learning method, apparatus, computer equipment and storage medium
CN109241817A (en) * 2018-07-02 2019-01-18 广东工业大学 A kind of crops image-recognizing method of unmanned plane shooting
CN109522797A (en) * 2018-10-16 2019-03-26 华南农业大学 Rice seedling and Weeds at seedling recognition methods and system based on convolutional neural networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于卷积神经网络的玉米根茎精确识别与定位研究》;杨洋等;《农业机械学报》;20181031;第49卷(第10期);第47页左栏第3段,第49页右栏第2段至第50页左栏最后一段及图3和图5 *

Also Published As

Publication number Publication date
CN110210355A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
CN110210355B (en) Paddy field weed species identification method and system and target position detection method and system
Ahmad et al. A survey on using deep learning techniques for plant disease diagnosis and recommendations for development of appropriate tools
Liu et al. YOLOv5-Tassel: Detecting tassels in RGB UAV imagery with improved YOLOv5 based on transfer learning
CN107392091B (en) Agricultural artificial intelligence crop detection method, mobile terminal and computer readable medium
Edelhoff et al. Path segmentation for beginners: an overview of current methods for detecting changes in animal movement patterns
Meek et al. The pitfalls of wildlife camera trapping as a survey tool in Australia
Dyrmann et al. Pixel-wise classification of weeds and crop in images by using a fully convolutional neural network.
Rahman et al. Smartphone-based hierarchical crowdsourcing for weed identification
Khan et al. A novel semi-supervised framework for UAV based crop/weed classification
CN109522797A (en) Rice seedling and Weeds at seedling recognition methods and system based on convolutional neural networks
CN108140118A (en) For identifying the method and information system of at least one plant plant being planted on arable land
CN108229413A (en) Pest and disease damage kind identification method and device
CN109117854A (en) Key point matching process, device, electronic equipment and storage medium
CN112861666A (en) Chicken flock counting method based on deep learning and application
Estreguil et al. A proposal for an integrated modelling framework to characterise habitat pattern
Prashanthi et al. Plant disease detection using Convolutional neural networks
CN109633106A (en) A kind of online Fast Determination of Pesticide Residue method, system and storage medium
Singh et al. Performance evaluation of plant leaf disease detection using deep learning models
Meena et al. Crop yield improvement with weeds, pest and disease detection
Hemalatha et al. Sugarcane leaf disease detection through deep learning
Schulz et al. Conservation tools: the next generation of engineering–biology collaborations
Karakaya et al. Discovery of agricultural diseases by deep learning and object detection.
CN115035512B (en) Crop nutrition state diagnosis method and system based on multi-mode deep learning
CN110991235B (en) State monitoring method and device, electronic equipment and storage medium
Nakajima et al. Biomass estimation of World rice (Oryza sativa L.) core collection based on the convolutional neural network and digital images of canopy

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