[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112668488A - Method and system for automatically identifying seeds and electronic equipment - Google Patents

Method and system for automatically identifying seeds and electronic equipment Download PDF

Info

Publication number
CN112668488A
CN112668488A CN202011608846.5A CN202011608846A CN112668488A CN 112668488 A CN112668488 A CN 112668488A CN 202011608846 A CN202011608846 A CN 202011608846A CN 112668488 A CN112668488 A CN 112668488A
Authority
CN
China
Prior art keywords
seed
preset
image
seeds
detected
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.)
Pending
Application number
CN202011608846.5A
Other languages
Chinese (zh)
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.)
Hubei Engineering University
Original Assignee
Hubei Engineering 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 Hubei Engineering University filed Critical Hubei Engineering University
Priority to CN202011608846.5A priority Critical patent/CN112668488A/en
Publication of CN112668488A publication Critical patent/CN112668488A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to a method, a system and electronic equipment for automatically identifying seeds, which are used for acquiring an image to be detected containing seeds; inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer. The detection classifier aiming at the N types of preset seeds is utilized to automatically identify the image to be detected containing the seeds, and strict requirements on the background, illumination and the like of the image to be detected are avoided, so that the method is convenient to popularize.

Description

Method and system for automatically identifying seeds and electronic equipment
Technical Field
The invention relates to the field of deep learning computer vision, in particular to a method and a system for automatically identifying seeds and electronic equipment.
Background
In the agricultural field, it is often desirable to classify different types of seeds so that sorting or other applications can be further guided. The existing classification technology mainly adopts an image analysis method, namely, the seeds of different varieties are classified by comprehensively analyzing the characteristics of the seeds such as color, shape and the like. In addition, in breeding work, thousand seed weight parameters of seeds are generally required to be obtained, and at present, a special thousand seed weighing instrument is also provided, wherein a seed region is firstly determined according to a target color, and single seeds are divided for counting by analyzing information such as length, width, aspect ratio, area, equivalent diameter, perimeter and the like of the seeds.
The above methods, whether classification or counting, are very sensitive to background noise. When acquiring an image to be detected, a specific color or illumination condition is usually required, for example, an existing thousand kernel weight meter needs to place seeds on a customized backlight source plate.
The existing automatic seed identification and classification technology has high requirements on conditions such as background, illumination and the like, so that the existing automatic seed identification and classification technology has great limitation on popularization and promotion.
Disclosure of Invention
In order to overcome the problem that the conventional automatic seed identification technology has high requirements on conditions such as background, illumination and the like, so that popularization is limited, the invention provides a method, a system and electronic equipment for automatically identifying seeds.
In a first aspect, in order to solve the above technical problem, the present invention provides an automatic seed identification method, including the steps of:
acquiring an image to be detected containing seeds;
inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer. The detection result comprises a result image and the number of seeds contained in the result image and conforming to each preset seed type.
The automatic seed identification method provided by the invention has the beneficial effects that: all seeds in an image to be detected are detected by utilizing the detection classifier aiming at the N types of preset seeds, so that the seeds which accord with the types of the preset seeds in the image to be detected can be conveniently and quickly identified, and meanwhile, the detection classifier aiming at the N types of the preset seeds has no strict requirements on the background, illumination and the like of the image to be detected, thereby being convenient for popularization.
On the basis of the above technical solution, the automatic seed identification method of the present invention may be further improved as follows.
Further, the automatic seed identification method further comprises the following steps:
collecting seed images under different backgrounds to obtain a plurality of first seed images containing seeds;
adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
and training detection classifiers aiming at N preset seed types according to the plurality of second seed images containing the seed type labels and the TensorFlow training model, wherein N is not more than K, and K is a positive integer.
The beneficial effect of adopting the further scheme is that: by acquiring seed images under different backgrounds, a detection classifier trained subsequently can have higher universality and can detect images under various background conditions; by adding the seed type labels by using LabelImg image labeling software, a plurality of second seed images aiming at K preset target seed types can be obtained, so that detection classifiers aiming at N preset seed types can be conveniently detected in subsequent training; through a plurality of second seed images containing seed type labels and a TensorFlow training model, a corresponding detection classifier can be trained according to the artificial requirement, so that the detection classifier is more pertinent and customizable.
Further, labeling the detected seeds by using the detection classifier for the N preset seed types includes:
acquiring high-level characteristics of the image to be detected, and independently segmenting each seed in the image to be detected according to the high-level characteristics to obtain M single-seed images, wherein M is a positive integer;
matching each single seed image in the M single seed images with each preset seed type in the N preset seed types by using the detection classifier aiming at the N preset seed types to obtain M multiplied by N first matching degrees;
when only one first matching degree in the first matching degrees corresponding to any single seed image is judged to be larger than the preset matching degree of the preset seed type, marking the single seed image as the matched preset seed type;
when at least two first matching degrees in the first matching degrees corresponding to any single seed image are judged to be larger than the preset matching degree of a preset seed type, detecting the single seed image by using a preset strategy;
and judging all the single seed images until finishing judging all the single seed images.
The preset strategy comprises the steps of detecting the single seed image by utilizing the existing classification technology such as an image analysis method and the like;
or obtaining at least two contradictory preset seed types according to the at least two first matching degrees of the single seed image, which are greater than the preset matching degree of the preset seed types, and training a detection classifier aiming at the at least two contradictory preset seed types,
the single seed image is respectively matched with each contradictory preset seed type in the at least two contradictory preset seed types by utilizing the detection classifier aiming at the at least two contradictory preset seed types to obtain at least two second matching degrees,
when only one second matching degree in the second matching degrees corresponding to the single seed image is judged to be larger than the preset matching degree of the contradictory preset seed types, marking the single seed image as the matched contradictory preset seed types; when at least two second matching degrees in the second matching degrees corresponding to the single seed image are judged to be larger than the preset matching degree of the contradictory preset seed type, the single seed image can be detected by using the preset strategy again; and judging all the single seed images until finishing judging all the single seed images.
The beneficial effect of adopting the further scheme is that: the high-level characteristics of the image to be detected are the combination of the characteristics of the color, the texture and the like of the image to be detected, so that the outline of each seed in the image to be detected can be identified through the high-level characteristics, and M single-seed images are obtained; each single seed image in the M single seed images is respectively matched with each preset seed type in the N preset seed types by aiming at the detection classifiers of the N preset seed types, so that whether each single seed image accords with one of the N preset seed types can be identified, and the subsequent labeling of the image to be detected is facilitated; in addition, the single seed image is detected again through a preset strategy, and the accuracy of automatic seed identification can be effectively improved.
Further, the acquiring an image to be detected containing seeds comprises:
when the video containing the seeds is collected, the video containing the seeds is segmented to obtain a plurality of single-frame images containing the seeds, and the images to be detected are selected from the single-frame images containing the seeds according to user requirements.
The beneficial effect of adopting the further scheme is that: by segmenting the collected videos containing the seeds, the scheme has higher universality and can identify the videos or images containing the seeds; in addition, the image to be detected can be selected from the images containing the seeds of the multiple single frames according to the user requirements, so that the automatic seed identification of the scheme is more targeted, and meanwhile, the method is convenient for the user, and the user experience is optimized.
Further, the acquiring an image to be detected containing seeds comprises:
and acquiring the image to be detected in an off-line acquisition mode and an on-line acquisition mode.
The beneficial effect of adopting the further scheme is that: the method and the device can select an off-line acquisition mode or an on-line acquisition mode to acquire the image to be detected according to the user requirements, so that the scheme has higher universality, and meanwhile, the method and the device are convenient for users, and the user experience is optimized.
Further, still include:
and when the detection classifier aiming at the N preset seed types does not detect the seeds in the N preset seed types in the image to be detected, directly outputting the image to be detected.
The beneficial effect of adopting the further scheme is that: the detection efficiency of the detection classifier aiming at the N types of preset seeds can be improved, and meanwhile, the detection result can be timely fed back to a user, so that convenience and rapidness are achieved.
In a second aspect, the invention provides an automatic seed identification system, which comprises an acquisition module and a detection module,
the acquisition module is used for acquiring a seed image to be detected;
the detection module is used for inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer.
The automatic seed identification system provided by the invention has the beneficial effects that: all seeds in an image to be detected are detected by utilizing the detection classifier aiming at the N types of preset seeds, so that the seeds which accord with the types of the preset seeds in the image to be detected can be conveniently and quickly identified, and meanwhile, the detection classifier aiming at the N types of the preset seeds has no strict requirements on the background, illumination and the like of the image to be detected, thereby being convenient for popularization.
On the basis of the above technical solution, the automatic seed identification system of the present invention may be further improved as follows.
Further, the device also comprises a result display module,
and the result display module is used for displaying the detection result.
The result display module can feed back the detection result to the user through various modes such as images, data and the like, and provides convenience for displaying the detection result.
Further, the device also comprises a model training module,
the model training module is used for acquiring seed images under different backgrounds to obtain a plurality of first seed images containing seeds;
adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
and training detection classifiers aiming at N preset seed types according to the plurality of second seed images containing the seed type labels and the TensorFlow training model, wherein N is not more than K, and K is a positive integer.
The beneficial effect of adopting the further scheme is that: by acquiring seed images under different backgrounds, a detection classifier trained subsequently can have higher universality and can detect images under various background conditions; by adding the seed type labels by using LabelImg image labeling software, a plurality of second seed images aiming at K preset target seed types can be obtained, so that detection classifiers aiming at N preset seed types can be conveniently detected in subsequent training; through a plurality of second seed images containing seed type labels and a TensorFlow training model, a corresponding detection classifier can be trained according to the artificial requirement, so that the detection classifier is more pertinent and customizable.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the automatic seed identification methods when executing the program.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention is further described below with reference to the accompanying drawings and embodiments.
FIG. 1 is a flow chart illustrating a method for automatically identifying seeds according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an automatic seed identification detection result according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an automatic seed identification system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following examples are further illustrative and supplementary to the present invention and do not limit the present invention in any way.
The automatic seed identification method according to the embodiment of the invention is described below with reference to the accompanying drawings.
As shown in fig. 1, an automatic seed identification method according to an embodiment of the present invention includes the following steps:
s2, acquiring an image to be detected containing seeds;
s3, inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer.
The detection result may include a result image and statistical data, as shown in fig. 2, where the result image is an image to be detected in which all seeds conforming to the preset seed type are marked, and the statistical data is the number of seeds of each preset seed type contained in the result image.
All seeds in an image to be detected are detected by utilizing the detection classifier aiming at the N types of preset seeds, so that the seeds which accord with the types of the preset seeds in the image to be detected can be conveniently and quickly identified, and meanwhile, the detection classifier aiming at the N types of the preset seeds has no strict requirements on the background, illumination and the like of the image to be detected, thereby being convenient for popularization.
Specifically, the acquiring an image to be detected containing seeds includes:
when the video containing the seeds is collected, the video containing the seeds is segmented to obtain a plurality of single-frame images containing the seeds, and the images to be detected are selected from the single-frame images containing the seeds according to user requirements.
By segmenting the collected videos containing the seeds, the scheme has higher universality and can identify the videos or images containing the seeds; in addition, the image to be detected can be selected from the images containing the seeds of the multiple single frames according to the user requirements, so that the automatic seed identification of the scheme is more targeted, and meanwhile, the method is convenient for the user, and the user experience is optimized.
Specifically, the acquiring an image to be detected containing seeds includes:
and acquiring the image to be detected in an off-line acquisition mode and an on-line acquisition mode.
The method and the device can select an off-line acquisition mode or an on-line acquisition mode to acquire the image to be detected according to the user requirements, so that the scheme has higher universality, and meanwhile, the method and the device are convenient for users, and the user experience is optimized.
Specifically, the method further comprises the following steps:
and when the detection classifier aiming at the N preset seed types does not detect the seeds in the N preset seed types in the image to be detected, directly outputting the image to be detected.
The detection efficiency of the detection classifier aiming at the N types of preset seeds can be improved, and meanwhile, the detection result can be timely fed back to a user, so that convenience and rapidness are achieved.
Preferably, the method further comprises the following steps:
s11, collecting seed images under different backgrounds to obtain a plurality of first seed images containing seeds;
s12, adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
s13, training detection classifiers for N preset seed types according to the plurality of second seed images containing the seed type labels and the TensorFlow training model, wherein N is not more than K, and K is a positive integer.
The method comprises the steps of acquiring a plurality of first type images, wherein the first type images can be acquired by various image acquisition devices, such as a mobile phone, a network camera or a professional camera, and the acquired first type images are composed of images with different complex conditions and environments, such as background, illumination and the like.
Specifically, K is set to 4, i.e., there are 4 preset target seed types, i.e., rape, soybean, corn and peanut, respectively, and N is set to 3, i.e., there are 3 preset seed types, i.e., rape, soybean and corn, respectively.
1) And (3) viewing each first seed image, and adding corresponding seed type labels in the first seed image by utilizing LabelImg image annotation software when the seeds in the first seed image have 4 preset target seed types of rape, soybean, corn and peanut.
For example, a seed type label of "rape" is added to rape seed in the first seed image and a seed type label of "peanut" is added to peanut seed in the first seed image.
2) And after the seed type labels of all the first type sub-images are added, obtaining a plurality of second type sub-images containing the seed type labels, and generating an xml file for each second type sub-image, wherein each xml file comprises the seed type label data of the corresponding second type sub-image.
3) And converting the xml files corresponding to all the second type sub-images into a TFRecords format to be used as input data of a TensorFlow training model.
4) Modifying parameters of the TensorFlow training model;
finding a labelmap. pbtxt file in an object _ detection module, and changing the parameter id and the parameter name in each item function in the labelmap. pbtxt file into corresponding preset seed types. For example:
Figure BDA0002872537200000121
secondly, finding a generate _ tfrecrd.py file in the object _ detection module, and modifying a parameter row _ label of the generate _ tfrecrd.py file into a corresponding preset seed type, for example:
Figure BDA0002872537200000122
Figure BDA0002872537200000131
third, change the detection category in fast _ rcnn _ acceptance _ v2_ pets.
5) Py in a transorflow training model is run, and a classifier is trained according to the marked data to generate a frezen _ inference _ graph.
By acquiring seed images under different backgrounds, a detection classifier trained subsequently can have higher universality and can detect images under various background conditions; by adding the seed type labels by using LabelImg image labeling software, a plurality of second seed images aiming at K preset target seed types can be obtained, so that detection classifiers aiming at N preset seed types can be conveniently detected in subsequent training; through a plurality of second seed images containing seed type labels and a TensorFlow training model, a corresponding detection classifier can be trained according to the artificial requirement, so that the detection classifier is more pertinent and customizable.
Preferably, in S3 of the above technical solution, labeling the detected seeds by using the detection classifier for the N preset seed types includes:
acquiring high-level characteristics of the image to be detected, and independently segmenting each seed in the image to be detected according to the high-level characteristics to obtain M single-seed images, wherein M is a positive integer;
matching each single seed image in the M single seed images with each preset seed type in the N preset seed types by using the detection classifier aiming at the N preset seed types to obtain M multiplied by N first matching degrees;
when only one first matching degree in the first matching degrees corresponding to any single seed image is judged to be larger than the preset matching degree of the preset seed type, marking the single seed image as the matched preset seed type;
when at least two first matching degrees in the first matching degrees corresponding to any single seed image are judged to be larger than the preset matching degree of a preset seed type, detecting the single seed image by using a preset strategy;
and judging all the single seed images until finishing judging all the single seed images.
The preset strategy comprises the steps of detecting the single seed image by utilizing the existing classification technology such as an image analysis method and the like;
or obtaining at least two contradictory preset seed types according to the at least two first matching degrees of the single seed image, which are greater than the preset matching degree of the preset seed types, and training a detection classifier aiming at the at least two contradictory preset seed types,
the single seed image is respectively matched with each contradictory preset seed type in the at least two contradictory preset seed types by utilizing the detection classifier aiming at the at least two contradictory preset seed types to obtain at least two second matching degrees,
when only one second matching degree in the second matching degrees corresponding to the single seed image is judged to be larger than the preset matching degree of the contradictory preset seed types, marking the single seed image as the matched contradictory preset seed types; when at least two second matching degrees in the second matching degrees corresponding to the single seed image are judged to be larger than the preset matching degree of the contradictory preset seed type, the single seed image can be detected by using the preset strategy again until the judgment of all the single seed images is completed.
The high-level features are combination of color, texture and the like of seeds, and each seed in the image to be detected can be independently segmented according to the high-level features.
As shown in fig. 2, 16 seeds are shared in the image to be detected, 16 single seed images can be obtained by segmentation according to high-level features, and each single seed image in the 16 single seed images is respectively matched with each preset seed type in the 3 preset seed types by using a detection classifier trained on the 3 preset seed types of rape, soybean and corn, so as to obtain 16 × 3 first matching degrees, as shown in table 1;
Figure BDA0002872537200000151
Figure BDA0002872537200000161
TABLE 1
1) Setting the preset matching degrees of all the preset seed types to be 50%, and judging that the first matching degree obtained by matching the 5 single seed images of the 1 st, 3 rd, 6 th, 14 th and 16 th to the preset seed type of soybean is more than 50% according to the table 1, so that the 5 single seed images are marked as soybean in the image to be detected, and simultaneously, the first matching degree of each single seed image can be marked as shown in fig. 2;
2) the preset matching degrees of all the preset seed types are set to be 30%, the first matching degrees obtained by matching the 1 st and 14 th single seed images with the two preset seed types of soybean and corn can be judged to be more than 30% according to the table 1, and the two preset seed types of soybean and corn are contradictory preset seed types at the moment;
training a detection classifier aiming at two contradictory preset seed types of 'soybean' and 'corn', respectively matching the 1 st single seed image and the 14 th single seed image with the two contradictory preset seed types of 'soybean' and 'corn', obtaining two second matching degrees for the 1 st single seed image and the 14 th single seed image, and as shown in the table 2:
second degree of match for "corn Second degree of matching of "soybeans
1 st single seed image 24% 98%
14 th single seed image 23% 99%
TABLE 2
Setting the preset matching degree of the contradictory preset seed types to be 30%, therefore, as can be seen from table 2, the second matching degree obtained by matching the 1 st single seed image and the 14 th single seed image with the preset seed type of soybean is greater than 30%, so that the 2 single seed images are marked as soybean in the image to be detected, and simultaneously, the first matching degree of each single seed image can also be marked as shown in fig. 2;
3) the preset matching degree is respectively set for each preset seed type, for example, the preset matching degree of "corn" is set to be 40%, the preset matching degree of "soybean" is set to be 90%, and the preset matching degree of "rape" is set to be 50%, it can be obtained according to table 1 that the 8 th and 12 th single seed images are "corn", the 1 st, 3 rd, 6 th, 14 th and 16 th single seed images are "soybean", and the 4 th, 5 th, 7 th and 10 th single seed images are "rape".
In the above embodiments, although the steps are numbered as S1, S2, etc., but only the specific embodiments are given in this application, a person skilled in the art may adjust the execution sequence of S1, S2, etc. according to the actual situation, and this is within the scope of the present invention, and it is understood that some embodiments may include some or all of the above embodiments.
As shown in fig. 3, an automatic seed identification system according to an embodiment of the present invention includes an acquisition module 210 and a detection module 220,
the acquisition module 210 is configured to acquire a seed image to be detected;
the detection module 220 is configured to input the image to be detected into a detection classifier for N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer.
The detection module 220 detects all the seeds in the image to be detected by using the detection classifier aiming at the N types of preset seeds, so that the seeds meeting the preset seed types in the image to be detected can be conveniently and quickly identified, and meanwhile, the detection classifier aiming at the N types of preset seeds has no strict requirements on the background, illumination and the like of the image to be detected, so that the popularization and the promotion are facilitated.
Preferably, as shown in fig. 3, a result display module 230 is further included,
the result display module 230 is configured to display the detection result.
As shown in fig. 2, the detection result may include a result image and statistical data, where the result image is an image to be detected in which all seeds meeting the preset seed type are marked, and the statistical data is the number of seeds of each preset seed type contained in the result image.
Further, a model training module 200 is included,
the model training module 200 is configured to collect seed images in different backgrounds to obtain a plurality of first seed images including seeds;
adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
and training detection classifiers aiming at N preset seed types according to the plurality of second seed images containing the seed type labels and the TensorFlow training model, wherein N is not more than K, and K is a positive integer.
The model training module 200 can enable the detection classifier trained subsequently to have higher universality by acquiring seed images under different backgrounds, and can detect images under various background conditions; by adding the seed type labels by using LabelImg image labeling software, a plurality of second seed images aiming at K preset target seed types can be obtained, so that detection classifiers aiming at N preset seed types can be conveniently detected in subsequent training; through a plurality of second seed images containing seed type labels and a TensorFlow training model, a corresponding detection classifier can be trained according to the artificial requirement, so that the detection classifier is more pertinent and customizable.
Preferably, the model training module 200 further comprises an image segmentation module 201, a matching module 202,
the image segmentation module 201 is configured to acquire high-level features of the image to be detected, and perform individual segmentation on each seed in the image to be detected according to the high-level features to obtain M single-seed images, where M is a positive integer;
the matching module 202 is configured to match each single seed image in the M single seed images with each preset seed type in the N preset seed types by using the detection classifier for the N preset seed types, so as to obtain M × N first matching degrees;
when only one first matching degree in the first matching degrees corresponding to any single seed image is judged to be larger than the preset matching degree of the preset seed type, marking the single seed image as the matched preset seed type;
when at least two first matching degrees in the first matching degrees corresponding to any single seed image are judged to be larger than the preset matching degree of a preset seed type, detecting the single seed image by using a preset strategy;
and judging all the single seed images until finishing judging all the single seed images.
The preset strategy comprises the steps of detecting the single seed image by utilizing the existing classification technology such as an image analysis method and the like;
or obtaining at least two contradictory preset seed types according to the at least two first matching degrees of the single seed image, which are greater than the preset matching degree of the preset seed types, and training a detection classifier aiming at the at least two contradictory preset seed types,
the single seed image is respectively matched with each contradictory preset seed type in the at least two contradictory preset seed types by utilizing the detection classifier aiming at the at least two contradictory preset seed types to obtain at least two second matching degrees,
when only one second matching degree in the second matching degrees corresponding to the single seed image is judged to be larger than the preset matching degree of the contradictory preset seed types, marking the single seed image as the matched contradictory preset seed types; when at least two second matching degrees in the second matching degrees corresponding to the single seed image are judged to be larger than the preset matching degree of the contradictory preset seed type, the single seed image can be detected by using the preset strategy again; and judging all the single seed images until finishing judging all the single seed images.
The high-level characteristics of the image to be detected are the combination of the characteristics of the color, the texture and the like of the image to be detected, so that the outline of each seed in the image to be detected can be identified through the high-level characteristics, and M single-seed images are obtained; each single seed image in the M single seed images is respectively matched with each preset seed type in the N preset seed types by aiming at the detection classifiers of the N preset seed types, so that whether each single seed image accords with one of the N preset seed types can be identified, and the subsequent labeling of the image to be detected is facilitated; in addition, the accuracy of automatic seed identification can be effectively improved by carrying out secondary matching on the single seed image with at least two first matching degrees which are greater than the preset matching degree of the preset seed type.
The above steps for realizing the corresponding functions of each parameter and each unit module in the automatic seed identification system of the present invention can refer to the above parameters and steps in the embodiment of the automatic seed identification method, and are not described herein again.
As shown in fig. 4, an electronic device 300 according to an embodiment of the present invention includes a memory 310, a processor 320, and a program 330 stored in the memory 310 and running on the processor 320, wherein the processor 320 executes the program 330 to implement part or all of the steps of any of the seed automatic identification methods.
The electronic device 300 may be a computer, a mobile phone, or the like, and correspondingly, the program 330 is computer software or a mobile phone APP, and the parameters and steps in the electronic device 300 of the present invention may refer to the parameters and steps in the above embodiment of the automatic seed identification method, which are not described herein again.
As will be appreciated by one skilled in the art, the present invention may be embodied as a system, method or computer program product. Accordingly, the present disclosure may be embodied in the form of: may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software, and may be referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. An automatic seed identification method is characterized by comprising the following steps:
acquiring an image to be detected containing seeds;
inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer.
2. The method for automatically identifying seeds as claimed in claim 1, further comprising:
collecting seed images under different backgrounds to obtain a plurality of first seed images containing seeds;
adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
and training the detection classifier aiming at the N preset seed types according to the plurality of second seed images containing the seed type labels and a TensorFlow training model, wherein N is not more than K, and K is a positive integer.
3. The method for automatically identifying seeds as claimed in claim 1, wherein labeling the detected seeds with the detection classifiers for N preset seed types comprises:
acquiring high-level characteristics of the image to be detected, and independently segmenting each seed in the image to be detected according to the high-level characteristics to obtain M single-seed images, wherein M is a positive integer;
matching each single seed image in the M single seed images with each preset seed type in the N preset seed types by using the detection classifier aiming at the N preset seed types to obtain M multiplied by N first matching degrees;
when only one first matching degree in the first matching degrees corresponding to any single seed image is judged to be larger than the preset matching degree of the preset seed type, marking the single seed image as the matched preset seed type;
when at least two first matching degrees in the first matching degrees corresponding to any single seed image are judged to be larger than the preset matching degree of a preset seed type, detecting the single seed image by using a preset strategy;
and until the labeling of all the single-particle seed images is completed.
4. The method for automatically identifying seeds as claimed in any one of claims 1 to 3, wherein the acquiring of the image to be detected containing seeds comprises:
when the video containing the seeds is collected, the video containing the seeds is segmented to obtain a plurality of single-frame images containing the seeds, and the images to be detected are selected from the single-frame images containing the seeds according to user requirements.
5. The method for automatically identifying seeds as claimed in any one of claims 1 to 3, wherein the obtaining of the seed image to be detected containing the seeds comprises:
and acquiring the image to be detected in an off-line acquisition mode and an on-line acquisition mode.
6. The automatic seed identification method according to any one of claims 1 to 3, further comprising:
and when the detection classifier aiming at the N preset seed types does not detect the seeds in the N preset seed types in the image to be detected, directly outputting the image to be detected.
7. An automatic seed identification system is characterized by comprising an acquisition module and a detection module,
the acquisition module is used for acquiring a seed image to be detected;
the detection module is used for inputting the image to be detected into a detection classifier aiming at N preset seed types; when the detection classifier aiming at the N preset seed types detects the seeds in the N preset seed types in the image to be detected, labeling the detected seeds by using the detection classifier aiming at the N preset seed types to obtain a detection result, wherein N is a positive integer.
8. The automatic seed identification system of claim 7, further comprising a result display module,
and the result display module is used for displaying the detection result.
9. The automatic seed recognition system of claim 7, further comprising a model training module,
the model training module is used for acquiring seed images under different backgrounds to obtain a plurality of first seed images containing seeds;
adding seed type labels to K seeds with preset target seed types in all the first seed images by using LabelImg image annotation software to obtain a plurality of second seed images containing the seed type labels;
and training detection classifiers aiming at N preset seed types according to the plurality of second seed images containing the seed type labels and the TensorFlow training model, wherein N is not more than K, and K is a positive integer.
10. An electronic device comprising a memory, a processor and a program stored on the memory and running on the processor, wherein the steps of a seed auto-discrimination method according to any one of claims 1 to 6 are implemented when the program is executed by the processor.
CN202011608846.5A 2020-12-30 2020-12-30 Method and system for automatically identifying seeds and electronic equipment Pending CN112668488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011608846.5A CN112668488A (en) 2020-12-30 2020-12-30 Method and system for automatically identifying seeds and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011608846.5A CN112668488A (en) 2020-12-30 2020-12-30 Method and system for automatically identifying seeds and electronic equipment

Publications (1)

Publication Number Publication Date
CN112668488A true CN112668488A (en) 2021-04-16

Family

ID=75410955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011608846.5A Pending CN112668488A (en) 2020-12-30 2020-12-30 Method and system for automatically identifying seeds and electronic equipment

Country Status (1)

Country Link
CN (1) CN112668488A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188609A (en) * 2019-04-24 2019-08-30 中国农业科学院深圳农业基因组研究所 A kind of detection method of weed seed
US20190377949A1 (en) * 2018-06-08 2019-12-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image Processing Method, Electronic Device and Computer Readable Storage Medium
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium
US20200293814A1 (en) * 2017-12-03 2020-09-17 Seedx Technologies Inc. Systems and methods for sorting of seeds

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200293814A1 (en) * 2017-12-03 2020-09-17 Seedx Technologies Inc. Systems and methods for sorting of seeds
US20190377949A1 (en) * 2018-06-08 2019-12-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image Processing Method, Electronic Device and Computer Readable Storage Medium
CN110188609A (en) * 2019-04-24 2019-08-30 中国农业科学院深圳农业基因组研究所 A kind of detection method of weed seed
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龙怡霖;蔡骋;: "基于随机森林的缺损杂草种子识别", 计算机应用与软件, no. 08, 15 August 2016 (2016-08-15) *

Similar Documents

Publication Publication Date Title
US10943346B2 (en) Multi-sample whole slide image processing in digital pathology via multi-resolution registration and machine learning
Vogel et al. Natural scene retrieval based on a semantic modeling step
CN107256246B (en) printed fabric image retrieval method based on convolutional neural network
Quelhas et al. Modeling scenes with local descriptors and latent aspects
Kumar et al. Leafsnap: A computer vision system for automatic plant species identification
CN104572804B (en) A kind of method and its system of video object retrieval
CN110472082B (en) Data processing method, data processing device, storage medium and electronic equipment
WO2019127832A1 (en) Intelligent search method and apparatus, terminal, server, and storage medium
CA2976771C (en) Barcode tag detection in side view sample tube images for laboratory automation
CN110222582B (en) Image processing method and camera
CN112990318B (en) Continuous learning method, device, terminal and storage medium
CN111382766A (en) Equipment fault detection method based on fast R-CNN
CN111191012A (en) Knowledge graph generation apparatus, method and computer program product thereof
CN103177266A (en) Intelligent stock pest identification system
CN110009038B (en) Training method and device for screening model and storage medium
CN109740417A (en) Invoice type recognition methods, device, storage medium and computer equipment
CN115115825B (en) Method, device, computer equipment and storage medium for detecting object in image
KR101093107B1 (en) Image information classification method and apparatus
Chen et al. Saliency modeling via outlier detection
CN112668488A (en) Method and system for automatically identifying seeds and electronic equipment
CN115063617B (en) Advertisement image recognition method and advertisement image recognition system
CN106650252A (en) Data processing method and device
CN113780335A (en) Small sample commodity image classification method, device, equipment and storage medium
CN112990245A (en) Article identification method, apparatus, device and storage medium
CN113780116B (en) Invoice classification method, invoice classification device, computer equipment and storage medium

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