CN110927167A - Egg detection method and device, electronic equipment and storage medium - Google Patents

Egg detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110927167A
CN110927167A CN201911056480.2A CN201911056480A CN110927167A CN 110927167 A CN110927167 A CN 110927167A CN 201911056480 A CN201911056480 A CN 201911056480A CN 110927167 A CN110927167 A CN 110927167A
Authority
CN
China
Prior art keywords
egg
image
eggs
circle
tray
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
CN201911056480.2A
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.)
Beijing Haiyi Tongzhan Information Technology Co Ltd
Original Assignee
Beijing Haiyi Tongzhan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Haiyi Tongzhan Information Technology Co Ltd filed Critical Beijing Haiyi Tongzhan Information Technology Co Ltd
Priority to CN201911056480.2A priority Critical patent/CN110927167A/en
Publication of CN110927167A publication Critical patent/CN110927167A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Abstract

The application relates to an egg detection method, an egg detection device, electronic equipment and a storage medium. According to the technical scheme, a whole plate of eggs is photographed, firstly, an egg classification model is adopted to quickly perform coarse-grained classification on the eggs, and for the eggs with coarse-grained classification results which do not meet preset conditions, an egg detection model is adopted to perform pixel identification, namely fine-grained classification. Therefore, through twice classification of the coarse and fine particle sizes, the detection efficiency is effectively improved, light source irradiation is not needed during detection, the detection is not influenced by physical conditions, slightly damaged eggs can be accurately identified, and the egg detection accuracy is improved.

Description

Egg detection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to a method and an apparatus for detecting eggs, an electronic device, and a storage medium.
Background
At present, the detection of abnormal eggs is one of the most important links in the production, management and processing processes of eggs. Abnormal eggs are found and removed in time, so that loss can be reduced, storage and processing quality can be improved, scientific management is facilitated for producers and operators, and market competitiveness of enterprises and products thereof is enhanced.
The existing automatic detection method for poultry egg abnormality is mainly based on a machine vision technology. The image information of the eggs irradiated by a certain light source is collected one by utilizing a camera, and the image information is analyzed by a computer to detect the quality index of the eggs.
However, the automatic detection method in the prior art detects the poultry eggs one by one, and the detection efficiency is low; in addition, the detection accuracy cannot be fundamentally guaranteed due to the great influence of physical conditions, such as the intensity of light, the difference of media, and the like.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, embodiments of the present application provide an egg detection method, an egg detection device, an electronic apparatus, and a storage medium.
In a first aspect, an embodiment of the present application provides an egg detection method, including:
acquiring an egg tray image to be detected, wherein the egg tray image to be detected comprises eggs placed in an egg tray;
positioning the eggs from the egg tray image to be detected to obtain a first egg image corresponding to the eggs and position information of the eggs in the egg tray;
classifying the first egg image by adopting a pre-trained egg classification model, wherein the obtained classification result comprises a first egg type of the egg;
for a second egg image of which the classification result does not meet the preset condition, adopting a pre-trained egg detection model to perform pixel identification, and determining the second egg type of the egg according to the identification result;
and generating labels corresponding to the eggs according to the types of the first eggs, the types of the second eggs and the position information.
Optionally, the positioning the eggs from the egg tray image to be detected to obtain a first egg image and position information of the eggs in the egg tray includes:
identifying a first circle corresponding to the poultry egg from the egg tray image to be detected;
determining the first egg image from the first circle.
Optionally, the positioning the eggs from the egg tray image to be detected to obtain a first egg image and position information of the eggs in the egg tray, further includes:
when all egg trough positions of the egg tray are not covered by the first egg image, acquiring an intersection point of a transverse connecting line and a longitudinal connecting line of the first circular circle center;
obtaining a second circle by taking the intersection point as a circle center according to the average radius of the first circle;
determining the first egg image from the second circle.
Optionally, the positioning the eggs from the egg tray image to be detected to obtain a first egg image and position information of the eggs in the egg tray, further includes:
when all egg tray positions of the egg tray are not covered by the first egg image, performing sliding window from the circle centers of the first circle and the second circle according to the average diameter of the first circle and/or the second circle to obtain a third circle;
determining the first egg image from the third circle.
Optionally, the positioning the eggs from the egg tray image to be detected to obtain a first egg image and position information of the eggs in the egg tray, further includes:
and filtering the first egg image according to the position information and/or the size information corresponding to the first egg image.
Optionally, the positioning the eggs from the egg tray image to be detected to obtain a first egg image and position information of the eggs in the egg tray, further includes:
calculating the overlapping rate of two adjacent circles;
adjusting a position and/or size of the first egg image when the overlap ratio is greater than or equal to a first threshold.
Optionally, the first egg type comprises normal eggs and abnormal eggs; the classification result further includes: a probability corresponding to the first egg category;
the poultry egg image with the classification result not meeting the preset condition comprises the following steps:
the first egg type is a normal egg and the probability corresponding to the first egg type is less than or equal to a second threshold value.
Optionally, the pixel recognition is performed by using a pre-trained egg detection model, and the second egg category of the egg is determined according to the recognition result, including:
performing image semantic segmentation on the second egg image according to the egg detection model to obtain a mask image corresponding to the second egg image;
and determining a second egg type of the second egg image according to the pixel value of each pixel in the mask image.
Optionally, the method further includes:
generating a sorting instruction according to the tag, wherein the sorting instruction is used for controlling sorting equipment to execute sorting operation corresponding to the egg type on the eggs corresponding to the position information in the egg tray;
and sending the sorting instruction to the sorting equipment.
In a second aspect, embodiments of the present application provide an egg detection device, including:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring an egg tray image to be detected, and the egg tray image to be detected comprises eggs placed in an egg tray;
the positioning module is used for positioning the eggs from the egg tray image to be detected to obtain a first egg image corresponding to the eggs and position information of the eggs in the egg tray;
a first classification module, configured to classify the first egg image using a pre-trained egg classification model, where an obtained classification result includes a first egg type of the egg;
the second classification module is used for carrying out pixel identification on a second egg image of which the classification result does not meet the preset condition by adopting a pre-trained egg detection model, and determining the second egg type of the egg according to the identification result;
and the generating module is used for generating the labels corresponding to the eggs according to the first egg type, the second egg type and the position information.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the above method steps when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the above-mentioned method steps.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
by taking a picture of the whole plate of eggs, firstly, an egg classification model is adopted to quickly carry out coarse-grained classification on the eggs, and for the eggs with the coarse-grained classification result not meeting the preset condition, an egg detection model is adopted to carry out pixel identification, namely fine-grained classification. Therefore, through twice classification of the coarse and fine particle sizes, the detection efficiency is effectively improved, light source irradiation is not needed during detection, the detection is not influenced by physical conditions, slightly damaged eggs can be accurately identified, and the egg detection accuracy is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
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, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow chart of a method for detecting eggs according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for detecting eggs according to another embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for detecting eggs according to another embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a first circle recognized from an egg tray image to be detected according to an embodiment of the present application;
fig. 5 is a schematic diagram of an egg tray image detection result provided in the embodiment of the present application;
FIG. 6 is a block diagram of an egg detection device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The whole plate of poultry eggs are detected based on the computer vision mode, the detection efficiency is effectively improved, light source irradiation is not needed during detection, the influence of physical conditions is avoided, and the detection accuracy is high.
First, a method for detecting eggs according to an embodiment of the present invention will be described.
Fig. 1 is a flowchart of an egg detection method according to an embodiment of the present disclosure. As shown in fig. 1, the method comprises the steps of:
step S11, acquiring an egg tray image to be detected, wherein the egg tray image to be detected comprises eggs placed in an egg tray;
s12, positioning eggs from the egg tray images to be detected to obtain first egg images corresponding to the eggs and position information of the eggs in the egg tray;
step S13, classifying the first egg image by adopting a pre-trained egg classification model, wherein the obtained classification result comprises a first egg type of the egg;
step S14, for a second egg image of which the classification result does not meet the preset condition, adopting a pre-trained egg detection model to carry out pixel identification, and determining the second egg type of the egg according to the identification result;
and step S15, generating labels corresponding to the eggs according to the types of the first eggs, the types of the second eggs and the position information.
In this embodiment, by taking a picture of the whole egg, the egg classification model is first used to quickly perform coarse-grained classification on the eggs, and for eggs whose coarse-grained classification result does not meet the preset conditions, the egg detection model is used to perform pixel identification, that is, fine-grained classification. Therefore, through twice classification of the coarse and fine particle sizes, the detection efficiency is effectively improved, light source irradiation is not needed during detection, the detection is not influenced by physical conditions, slightly damaged eggs can be accurately identified, and the egg detection accuracy is improved.
The egg tray image to be detected comprises a whole egg tray, for example, the egg tray has the specification of 5 multiplied by 6, namely, comprises 30 egg grooves, and 30 eggs can be placed in the egg tray. By the method of the embodiment, the egg types of the 30 eggs and the positions of each egg in the egg tray can be identified at one time.
In practice, only normal eggs or only abnormal eggs may be identified, or both normal and abnormal eggs may be identified, i.e., the type and location of each egg is detected.
Optionally, the method further includes: generating a sorting instruction according to the tag, wherein the sorting instruction is used for controlling sorting equipment to execute sorting operation corresponding to the type of the poultry eggs corresponding to the position information in the egg tray; and sending the sorting instruction to the sorting equipment.
In this embodiment, after detection, abnormal eggs and normal eggs in the egg tray are identified, and the sorting device can be controlled to perform corresponding sorting operations on the eggs in the egg tray. Therefore, abnormal eggs are found and removed in time, loss caused by the influence of the abnormal eggs on normal eggs is reduced, and the storage and processing quality of the eggs is improved. And, sorting accuracy and efficiency are improved.
In addition, since the sorting device may be contaminated when picking up abnormal eggs, for example, when picking up damaged eggs, the egg liquid flows out to contaminate the sorting device, or pick up mildewed eggs to contaminate the sorting device, etc., and further, the normal operation of the sorting device is disturbed, and even the sorting device may be damaged due to a fault, only normal eggs are picked up and sorted to other egg trays, and the contact operation is not performed on abnormal eggs. After normal eggs are sorted, the sorting equipment can be controlled to move the egg tray containing abnormal eggs to the garbage bin.
Fig. 2 is a flowchart of an egg detection method according to another embodiment of the present disclosure. As shown in fig. 2, the step S12 includes:
step S21, identifying a first circle corresponding to the egg from the egg tray image to be detected;
at step S22, a first egg image is determined based on the first circle.
In the embodiment, when the egg tray is overlooked, the circular characteristic of the eggs and the fixed position of the egg tray are utilized, and the circular shape corresponding to the eggs in the egg tray can be detected in a Hough transform characteristic detection mode, so that the eggs are quickly positioned.
However, due to the influence of light and the egg placement position, the positions of the eggs cannot be accurately positioned by adopting the hough transform mode. For example, if some egg grooves in the egg tray lack eggs, the positions of the missing eggs cannot be located by using the hough transform method. For another example, if the presented image is oval due to incorrect egg placement, or if circular information is not obvious due to too close egg distance, missing detection may occur by using hough transform.
To solve the above problem, the eggs in the egg flat image to be detected can be more accurately positioned in the following manner.
And (I) for the position of the missing poultry egg, positioning and determining the position of the missing poultry egg through connecting lines of circle centers of other circles.
Fig. 3 is a flowchart of an egg detection method according to another embodiment of the present disclosure. As shown in fig. 3, the step S12 further includes:
step S31, when all egg tray positions of the egg tray are not covered by the first egg image, acquiring the intersection point of the transverse connecting line and the longitudinal connecting line of the first circular circle center;
step S32, taking the intersection point as the center of a circle, and obtaining a second circle according to the average radius of the first circle;
in step S33, a first egg image is determined based on the second circle.
Fig. 4 is a schematic diagram illustrating a first circle recognized from an egg tray image to be detected according to an embodiment of the present application. As shown in fig. 4, the circles in the second row, the second column, and the third row, the fourth column of the egg tray are not identified. The centers of the circles corresponding to the two positions can be determined through the intersection points of the transverse connecting lines and the longitudinal connecting lines of the centers of the other circles, and then the circles corresponding to the two positions can be obtained according to the average radius of the other circles, such as the dotted circle in fig. 4.
And (II) the position of the missing egg can be determined by sliding the window from other circles.
The step S12 further includes: when all egg tray positions of the egg tray are not covered by the first egg image, performing sliding window from the circle centers of the first circle and the second circle according to the average diameter of the first circle and/or the second circle to obtain a third circle; determining a first egg image from the third circle.
Through the two modes, the eggs or empty egg slots which are not identified in the Hough transform mode can be positioned, so that all eggs on the egg tray in the image can be identified quickly and accurately.
In addition, the circle recognized from the egg tray image by the hough transform mode may not be the circle corresponding to the egg, for example, the small hole on the egg tray is also recognized as a circle. Therefore, the circle identified by the hough transform needs to be filtered. Optionally, the step S12 further includes: and filtering the first egg image according to the corresponding position information and/or size information of the first egg image. Especially, when the number of the finally identified first egg images is larger than the number of egg grooves of the egg plate, the images of non-eggs can be excluded according to the corresponding position information or size information of the images, such as the circular radius.
Moreover, due to a certain recognition error existing in the hough transform mode, the recognized circles may overlap with each other, which further causes the error of the obtained egg image to be larger, and reduces the accuracy of subsequent classification. Thus, when circular overlap occurs, the entire first egg image position or size is required, reducing the overlap rate. Optionally, the step S12 further includes: calculating the overlapping rate of two adjacent circles; when the overlap ratio is greater than or equal to the first threshold, adjusting a position and/or size of the first egg image.
For example, an intersection-to-intersection ratio (IOU) of two adjacent circles may be calculated, and when the IOU is greater than or equal to a preset threshold, the egg image may be shifted by adjusting the position of the circle or by reducing the radius of the circle, or the size of the egg image may be reduced. Therefore, each egg image is closer to the egg and only contains the information of the egg, and the accuracy of subsequent classification based on the egg images is improved.
Optionally, the egg classification model in step S13 may be obtained based on convolutional neural network training such as MobileNetV1, MobileNetV2, MobileNetV3, and the like.
Optionally, the first egg type comprises normal eggs and abnormal eggs. The poultry egg image with the classification result not meeting the preset condition comprises the following steps: the first egg type is a normal egg. In order to avoid missing detection of slightly damaged eggs, fine-grained classification is carried out on the egg images of which the coarse-grained classification results are normal eggs. Therefore, the accuracy and the efficiency of egg detection can be improved.
Optionally, the classification result further includes: a probability corresponding to the first egg category. In step S14, the egg images whose classification results do not meet the preset conditions include: the first egg type is a normal egg and the probability corresponding to the first egg type is less than or equal to a second threshold.
For example, based on an egg classification model trained by MobileNetV2, the output results include egg types and corresponding probabilities. If the probability that a certain egg is a normal egg is more than 99.5%, determining that the egg is a normal egg; if the probability that a certain egg is a normal egg is less than or equal to 99.5%, that is, the damage of the egg may be slight or the egg shell has small flaws, the egg needs to be subjected to subsequent fine-grained classification; and if the classification result is abnormal eggs, directly classifying the eggs as abnormal eggs. Therefore, the detection efficiency is further improved while the damaged eggs are accurately detected.
Optionally, in step S14, performing pixel recognition by using a pre-trained egg detection model, and determining a second egg category of the egg according to the recognition result, including:
performing image semantic segmentation on the second egg image according to the egg detection model to obtain a mask image corresponding to the second egg image;
a second egg type of the second egg image is determined based on the pixel values of the pixels in the mask image.
Optionally, the poultry egg detection model may be obtained by training a neural network based on image semantic segmentation, such as CGNet, ERFNet, ESPNet, ICNet, and the like.
And for the egg image of which the classification result does not meet the preset condition, performing foreground classification on each pixel in the image by using an egg detection model, namely performing image semantic segmentation on the egg image, and determining the egg type through the pixel value in the mask image returned by the model. If the mask image has a promising pixel value, the egg is broken and classified as an abnormal egg. For example, the mask image is a black-and-white image, and the white portion pixel value is 0 and the black portion pixel value is 1. For an egg without breakage, the corresponding mask image should have no black pixels or no black pixels corresponding to the breakage state. If a black pixel corresponding to a broken morphology appears in the mask image, it may be determined that the type corresponding to the egg should be an abnormal egg.
The damaged egg has various damaged forms, including serious damage, such as complete damage, clear visible cracks and the like, and slight damage, such as slight dent, flat round small hole and the like. Therefore, abnormal egg samples of different abnormal types can be collected in advance, and the training of the egg detection model is carried out through the abnormal egg samples, so that the egg detection model can identify various types, particularly slightly damaged eggs.
Optionally, the egg detection model may be obtained based on CGNet, and the model not only uses the features of each pixel when classifying each pixel, but also fully uses the features of the pixels around the pixel and the features of the full image, thereby improving the classification accuracy for slightly damaged eggs.
Optionally, in the above method embodiment, a multithreading technology is adopted, and the egg images are subjected to parallel classification processing, for example, 30 egg images are obtained by positioning, parallel coarse and fine granularity classification is performed by adopting 5 threads, and final classification results are summarized, so that the egg detection efficiency is improved, and the detection time is reduced.
Fig. 5 is a schematic diagram of an egg tray image detection result provided in the embodiment of the present application. As shown in fig. 5, in which a slightly broken egg is accurately identified.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 6 is a block diagram of an egg detection device according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device through software, hardware or a combination of the two. As shown in fig. 6, the egg detection apparatus includes:
the acquisition module 51 is used for acquiring an egg tray image to be detected, wherein the egg tray image to be detected comprises eggs placed in an egg tray;
the positioning module 52 is configured to position eggs from the egg tray image to be detected, so as to obtain a first egg image corresponding to the eggs and position information of the eggs in the egg tray;
the first classification module 53 is configured to classify the first egg image by using a pre-trained egg classification model, where an obtained classification result includes a first egg type of an egg;
the second classification module 54 is configured to perform pixel recognition on a second egg image of which the classification result does not meet the preset condition by using a pre-trained egg detection model, and determine a second egg category of the egg according to the recognition result;
and the generating module 55 is configured to generate tags corresponding to the eggs according to the first egg type, the second egg type and the location information.
An embodiment of the present application further provides an electronic device, as shown in fig. 7, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the method embodiments described below.
The communication bus mentioned in the electronic device may be a peripheral component interconnect (pci) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method embodiments described below.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further noted that, herein, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. An egg detection method, comprising:
acquiring an egg tray image to be detected, wherein the egg tray image to be detected comprises eggs placed in an egg tray;
positioning the eggs from the egg tray image to be detected to obtain a first egg image corresponding to the eggs and position information of the eggs in the egg tray;
classifying the first egg image by adopting a pre-trained egg classification model, wherein the obtained classification result comprises a first egg type of the egg;
for a second egg image of which the classification result does not meet the preset condition, adopting a pre-trained egg detection model to perform pixel identification, and determining the second egg type of the egg according to the identification result;
and generating labels corresponding to the eggs according to the types of the first eggs, the types of the second eggs and the position information.
2. The method according to claim 1, wherein the positioning the eggs from the egg flat image to be detected to obtain a first egg image and position information of the eggs in the egg flat comprises:
identifying a first circle corresponding to the poultry egg from the egg tray image to be detected;
determining the first egg image from the first circle.
3. The method according to claim 2, wherein the positioning of the eggs from the egg flat image to be detected to obtain a first egg image and position information of the eggs in the egg flat further comprises:
when all egg trough positions of the egg tray are not covered by the first egg image, acquiring an intersection point of a transverse connecting line and a longitudinal connecting line of the first circular circle center;
obtaining a second circle by taking the intersection point as a circle center according to the average radius of the first circle;
determining the first egg image from the second circle.
4. The method according to claim 3, wherein the positioning of the eggs from the flat image to be detected to obtain a first egg image and position information of the eggs in the flat, further comprises:
when all egg tray positions of the egg tray are not covered by the first egg image, performing sliding window from the circle centers of the first circle and the second circle according to the average diameter of the first circle and/or the second circle to obtain a third circle;
determining the first egg image from the third circle.
5. The method according to any one of claims 2 to 4, wherein the positioning the eggs from the flat image to be detected to obtain a first egg image and position information of the eggs in the flat, further comprises:
and filtering the first egg image according to the position information and/or the size information corresponding to the first egg image.
6. The method according to any one of claims 2 to 4, wherein the positioning the eggs from the flat image to be detected to obtain a first egg image and position information of the eggs in the flat, further comprises:
calculating the overlapping rate of two adjacent circles;
adjusting a position and/or size of the first egg image when the overlap ratio is greater than or equal to a first threshold.
7. The method of claim 1, wherein the first egg type comprises normal eggs and abnormal eggs; the classification result further includes: a probability corresponding to the first egg category;
the poultry egg image with the classification result not meeting the preset condition comprises the following steps:
the first egg type is a normal egg and the probability corresponding to the first egg type is less than or equal to a second threshold value.
8. A method according to claim 7, wherein said employing a pre-trained egg detection model for pixel recognition and determining a second egg category of said eggs based on said recognition results comprises:
performing image semantic segmentation on the second egg image according to the egg detection model to obtain a mask image corresponding to the second egg image;
and determining a second egg type of the second egg image according to the pixel value of each pixel in the mask image.
9. The method of claim 1, further comprising:
generating a sorting instruction according to the tag, wherein the sorting instruction is used for controlling sorting equipment to execute sorting operation corresponding to the egg type on the eggs corresponding to the position information in the egg tray;
and sending the sorting instruction to the sorting equipment.
10. An egg detection device, comprising:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring an egg tray image to be detected, and the egg tray image to be detected comprises eggs placed in an egg tray;
the positioning module is used for positioning the eggs from the egg tray image to be detected to obtain a first egg image corresponding to the eggs and position information of the eggs in the egg tray;
a first classification module, configured to classify the first egg image using a pre-trained egg classification model, where an obtained classification result includes a first egg type of the egg;
the second classification module is used for carrying out pixel identification on a second egg image of which the classification result does not meet the preset condition by adopting a pre-trained egg detection model, and determining the second egg type of the egg according to the identification result;
and the generating module is used for generating the labels corresponding to the eggs according to the first egg type, the second egg type and the position information.
11. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor, when executing the computer program, implementing the method steps of any of claims 1-9.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 9.
CN201911056480.2A 2019-10-31 2019-10-31 Egg detection method and device, electronic equipment and storage medium Pending CN110927167A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911056480.2A CN110927167A (en) 2019-10-31 2019-10-31 Egg detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911056480.2A CN110927167A (en) 2019-10-31 2019-10-31 Egg detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110927167A true CN110927167A (en) 2020-03-27

Family

ID=69850131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911056480.2A Pending CN110927167A (en) 2019-10-31 2019-10-31 Egg detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110927167A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582109A (en) * 2020-04-28 2020-08-25 北京海益同展信息科技有限公司 Recognition method, recognition device, computer-readable storage medium and electronic equipment
CN111783886A (en) * 2020-06-30 2020-10-16 创新奇智(青岛)科技有限公司 Method and device for identifying product defects
CN111866400A (en) * 2020-07-02 2020-10-30 北京海益同展信息科技有限公司 Image processing method and device
CN113793328A (en) * 2021-09-23 2021-12-14 中国农业大学 Light-weight egg shape recognition method based on SE-ResNet structure

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104764744A (en) * 2015-04-21 2015-07-08 华中农业大学 Visual inspection device and method for inspecting freshness of poultry eggs
CN104949998A (en) * 2015-07-01 2015-09-30 华中农业大学 Online visual inspection device and method for surface dirt of group origin eggs
CN106954563A (en) * 2017-04-24 2017-07-18 广东工业大学 A kind of recognition methods of native birds, beasts and eggs and its identifying device
CN107064150A (en) * 2017-05-27 2017-08-18 华中农业大学 A kind of brown shell infertile egg and fertile egg identification device and discrimination method based on machine vision technique
CN107330449A (en) * 2017-06-13 2017-11-07 瑞达昇科技(大连)有限公司 A kind of BDR sign detection method and device
CN108229575A (en) * 2018-01-19 2018-06-29 百度在线网络技术(北京)有限公司 For detecting the method and apparatus of target
CN108665457A (en) * 2018-05-16 2018-10-16 腾讯科技(深圳)有限公司 Image-recognizing method, device, storage medium and computer equipment
CN109187553A (en) * 2018-09-11 2019-01-11 湖北工业大学 A kind of rotten egg online intelligent recognition method based on machine vision
CN109727229A (en) * 2018-11-28 2019-05-07 歌尔股份有限公司 Rosin joint detection method and device
CN109886170A (en) * 2019-02-01 2019-06-14 长江水利委员会长江科学院 A kind of identification of oncomelania intelligent measurement and statistical system
CN109993187A (en) * 2017-12-29 2019-07-09 深圳市优必选科技有限公司 A kind of modeling method, robot and the storage device of object category for identification
CN110210286A (en) * 2019-04-17 2019-09-06 平安科技(深圳)有限公司 Abnormality recognition method, device, equipment and storage medium based on eye fundus image
CN110334736A (en) * 2019-06-03 2019-10-15 北京大米科技有限公司 Image-recognizing method, device, electronic equipment and medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104764744A (en) * 2015-04-21 2015-07-08 华中农业大学 Visual inspection device and method for inspecting freshness of poultry eggs
CN104949998A (en) * 2015-07-01 2015-09-30 华中农业大学 Online visual inspection device and method for surface dirt of group origin eggs
CN106954563A (en) * 2017-04-24 2017-07-18 广东工业大学 A kind of recognition methods of native birds, beasts and eggs and its identifying device
CN107064150A (en) * 2017-05-27 2017-08-18 华中农业大学 A kind of brown shell infertile egg and fertile egg identification device and discrimination method based on machine vision technique
CN107330449A (en) * 2017-06-13 2017-11-07 瑞达昇科技(大连)有限公司 A kind of BDR sign detection method and device
CN109993187A (en) * 2017-12-29 2019-07-09 深圳市优必选科技有限公司 A kind of modeling method, robot and the storage device of object category for identification
CN108229575A (en) * 2018-01-19 2018-06-29 百度在线网络技术(北京)有限公司 For detecting the method and apparatus of target
CN108665457A (en) * 2018-05-16 2018-10-16 腾讯科技(深圳)有限公司 Image-recognizing method, device, storage medium and computer equipment
CN109187553A (en) * 2018-09-11 2019-01-11 湖北工业大学 A kind of rotten egg online intelligent recognition method based on machine vision
CN109727229A (en) * 2018-11-28 2019-05-07 歌尔股份有限公司 Rosin joint detection method and device
CN109886170A (en) * 2019-02-01 2019-06-14 长江水利委员会长江科学院 A kind of identification of oncomelania intelligent measurement and statistical system
CN110210286A (en) * 2019-04-17 2019-09-06 平安科技(深圳)有限公司 Abnormality recognition method, device, equipment and storage medium based on eye fundus image
CN110334736A (en) * 2019-06-03 2019-10-15 北京大米科技有限公司 Image-recognizing method, device, electronic equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
范钦和: "《病理科建设管理规范和操作常规》", 31 January 2006, 东南大学出版社 *
高宏伟 等: "《电子制造装备技术》", 30 September 2015, 西安电子科技大学出版社 *
齐继阳 等: "《异形涵管钢筋骨架自动变径高速滚焊机》", 30 April 2019, 华中科技大学出版社 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582109A (en) * 2020-04-28 2020-08-25 北京海益同展信息科技有限公司 Recognition method, recognition device, computer-readable storage medium and electronic equipment
CN111582109B (en) * 2020-04-28 2023-09-05 京东科技信息技术有限公司 Identification method, identification device, computer-readable storage medium, and electronic apparatus
CN111783886A (en) * 2020-06-30 2020-10-16 创新奇智(青岛)科技有限公司 Method and device for identifying product defects
CN111783886B (en) * 2020-06-30 2023-01-20 创新奇智(青岛)科技有限公司 Method and device for identifying product defects
CN111866400A (en) * 2020-07-02 2020-10-30 北京海益同展信息科技有限公司 Image processing method and device
CN111866400B (en) * 2020-07-02 2022-01-07 京东科技信息技术有限公司 Image processing method and device
CN113793328A (en) * 2021-09-23 2021-12-14 中国农业大学 Light-weight egg shape recognition method based on SE-ResNet structure

Similar Documents

Publication Publication Date Title
CN110927167A (en) Egg detection method and device, electronic equipment and storage medium
CN110349145B (en) Defect detection method, defect detection device, electronic equipment and storage medium
CN110060237B (en) Fault detection method, device, equipment and system
TWI608369B (en) Classification method, classification module and computer program product
CN111310826B (en) Method and device for detecting labeling abnormality of sample set and electronic equipment
US9679354B2 (en) Duplicate check image resolution
TW202239281A (en) Electronic substrate defect detection
CN111709948A (en) Method and device for detecting defects of container
CN112037222B (en) Automatic updating method and system of neural network model
CN111986183A (en) Chromosome scattergram image automatic segmentation and identification system and device
CN110135514A (en) A kind of workpiece classification method, device, equipment and medium
CN111178446A (en) Target classification model optimization method and device based on neural network
TW202242390A (en) Defect inspection device, defect inspection method, and manufacturing method
CN111325181B (en) State monitoring method and device, electronic equipment and storage medium
CN110796210A (en) Method and device for identifying label information
CN110570398A (en) Cable joint welding spot qualification detection method based on deep learning technology
CN111191670A (en) Neural network-based classification device and classification method
US20210080450A1 (en) Methods and systems for automated assessment of spermatogenesis
CN112884054A (en) Target labeling method and target labeling device
CN116258703A (en) Defect detection method, defect detection device, electronic equipment and computer readable storage medium
CN116596875A (en) Wafer defect detection method and device, electronic equipment and storage medium
CN117392042A (en) Defect detection method, defect detection apparatus, and storage medium
CN111122582B (en) Poultry egg detection method, image processing method and device
CN113284141A (en) Model determination method, device and equipment for defect detection
CN113267506A (en) Wood board AI visual defect detection device, method, equipment and 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
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: BEIJING HAIYI TONGZHAN INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327

RJ01 Rejection of invention patent application after publication