Computer program, egg determination method, learned model generation method and egg determination device
A computer program analyzes egg images from multiple angles using trained models to accurately assess the air chamber shape, enhancing the classification of eggs for hatching suitability.
Patent Information
- Application Number
- JP2023065888
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Existing methods for determining the shape of an egg's air chamber are inaccurate, leading to potential misclassification of eggs as normal or abnormal, which can affect their hatching process.
A computer program that acquires images of eggs from multiple directions, generates boundary line images, and uses trained models to analyze these images for shape information, determining the normalcy of the air chamber based on multiple shape information inputs.
Accurately determines the shape of the air chamber with high precision, enabling the differentiation between normal and abnormal eggs, thereby improving the selection of eggs for breeding or vaccine production.
Smart Images

Figure 2024152009000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a computer program for determining the state of an egg, an egg determination method, a trained model generation method, and an egg determination device. [Background technology]
[0002] Among poultry eggs such as chicken eggs, fertilized eggs may be used for purposes other than food, such as breeding or vaccine production. Conventionally, the condition of such fertilized eggs has been inspected. For example, the shape of the egg's air cell is inspected. If the shape of the air cell is abnormal, there is a possibility that the development state during hatching will be abnormal. For this reason, eggs with an abnormal shape of the air cell are determined to be abnormal. For example, eggs that are determined to be normal by the inspection are used, and eggs that are determined to be abnormal are discarded. Patent Document 1 discloses a technology for determining the condition of an egg based on an image of the egg taken using light transmitted through the egg. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2020 / 262557 Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present invention is to provide a computer program, an egg judgment method, a trained model generation method, and an egg judgment device that can determine with high accuracy whether the shape of an egg air cell is normal or not. [Means for solving the problem]
[0005] A computer program according to one embodiment of the present invention is characterized in that it causes a computer to execute a process of acquiring an image of an egg, generating a boundary image from the acquired image showing the boundary between an air cell contained in the egg and other areas, inputting the generated boundary image into a trained model that outputs shape information showing whether the shape of the air cell is normal or not when a boundary image is input, acquiring the shape information output by the trained model, and determining whether the shape of the air cell is normal or not based on the acquired shape information.
[0006] A computer program according to one embodiment of the present invention is characterized in that it causes a computer to execute a process of acquiring multiple images of the same egg taken from multiple directions, inputting boundary images generated from each of the multiple images into the trained model, and acquiring shape information output by the trained model, thereby acquiring multiple pieces of shape information corresponding to the multiple images, and determining whether the shape of the air cell is normal based on a single piece of shape information among the multiple pieces of shape information that most strongly indicates that the shape of the air cell is abnormal.
[0007] A computer program according to one embodiment of the present invention is characterized in that it causes a computer to execute a process of determining whether an egg is dead or infertile, the position of the egg's air cell, or the developmental state of the egg based on an acquired image using other trained models, and determining the size of the air cell, the inclination of the air cell, or the orientation of the egg based on the acquired image in accordance with predetermined rules.
[0008] A computer program according to one embodiment of the present invention is characterized in that it causes a computer to execute a process of determining whether an egg is dead or unfertilized based on an acquired image, and if the egg is not dead or unfertilized, determining whether the shape of the air cell is normal using the trained model, determining the developmental state of the egg based on the acquired image, and determining that the egg is a normal egg if it is determined that the shape of the air cell and the developmental state of the egg are normal.
[0009] An egg judgment method according to one embodiment of the present invention includes acquiring an image of an egg, generating a boundary image from the acquired image showing the boundary between an air cell contained in the egg and other areas, inputting the generated boundary image into a trained model that outputs shape information showing whether the shape of the air cell is normal or not when a boundary image is input, acquiring the shape information output by the trained model, and determining whether the shape of the air cell is normal or not based on the acquired shape information.
[0010] A trained model generation method according to one embodiment of the present invention is characterized in that it acquires training data including a boundary image, generated from an image of an egg, showing the boundary between an air cell in the egg and other areas, and shape information showing whether the shape of the air cell is normal, and generates a trained model that outputs shape information when a boundary image is input by learning using the training data.
[0011] An egg judgment device according to one embodiment of the present invention comprises a calculation unit, which acquires an image of an egg, generates a boundary image from the acquired image showing the boundary between an air cell contained in the egg and other areas, inputs the generated boundary image to a trained model that outputs shape information showing whether the shape of the air cell is normal or not when a boundary image is input, acquires the shape information output by the trained model, and judges whether the shape of the air cell is normal or not based on the acquired shape information.
[0012] In one aspect of the present invention, a boundary image showing the boundary between the air cell in the egg and other areas is generated from an image of the egg, and the shape of the air cell in the egg is determined using a trained model that outputs shape information showing whether the shape of the air cell is normal or not when the boundary image is input. Depending on the shape of the boundary, it becomes possible to determine with high accuracy whether the shape of the air cell in the egg is normal or abnormal.
[0013] In one embodiment of the present invention, images of an egg are obtained from multiple directions, shape information is obtained based on each image, and the shape of the air cell is determined based on a single piece of shape information that more strongly indicates that the shape of the air cell is abnormal. The shape of the air cell may vary depending on the direction. If the shape of the air cell is abnormal in one direction, the shape of the air cell is deemed abnormal overall even if the shape of the air cell is normal in other directions. If the shape of the air cell is normal based on shape information that more strongly indicates that the shape of the air cell is abnormal, the shape of the air cell is normal in all directions, and the shape of the air cell can be deemed normal. Therefore, it can be accurately determined whether the shape of the egg air cell is normal or abnormal.
[0014] In one embodiment of the present invention, the determination of whether the egg is dead or infertile, the determination of the position of the egg's air cell, and the developmental state during hatching are performed using other trained models. Also, based on the egg image, the size of the air cell, the inclination of the air cell, or the orientation of the egg is determined according to predetermined rules. The state of the egg is determined by an appropriate method according to the determination content.
[0015] In one embodiment of the present invention, when an egg is determined to be neither dead nor infertile based on an image of the egg, the shape of the egg's air cell is determined, and the egg's developmental state is determined. When the shape of the air cell and the egg's developmental state are normal, the egg is determined to be a normal egg. The egg state is determined in an appropriate order, and it is determined with high accuracy whether the egg is a normal egg or not. Effect of the Invention
[0016] The present invention has excellent effects such as making it possible to determine with high accuracy whether the shape of the air cell of an egg is normal or not. [Brief description of the drawings]
[0017] [Figure 1] FIG. 2 is a schematic cross-sectional view of an egg. [Diagram 2] FIG. 1 is a block diagram showing an example of the configuration of an egg determination system for determining the state of an egg. [Diagram 3] FIG. 2 is a schematic plan view showing a configuration example of an egg imaging device. [Figure 4] FIG. 2 is a schematic diagram showing a configuration example of an egg imaging device. [Diagram 5] FIG. 2 is a schematic diagram showing a configuration example of an egg imaging device. [Figure 6] 5A to 5C are schematic plan views showing examples of light emission patterns. [Figure 7] FIG. 2 is a block diagram showing an example of the internal configuration of the egg determination device. [Figure 8] A conceptual diagram showing the functions of the first trained model, the second trained model, the third trained model, and the fourth trained model. [Figure 9] FIG. 13 is a schematic diagram showing an example of a boundary line image. [Figure 10] 2 is a block diagram showing an example of an internal functional configuration of the learning device; [Figure 11] 11 is a flowchart illustrating an example of a processing procedure executed by the learning device. [Figure 12] 4 is a flowchart showing the procedure of a process executed by the egg determination device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] The present invention will now be described in detail with reference to the drawings showing embodiments thereof. In this embodiment, the egg is a poultry egg such as a chicken egg. FIG. 1 is a schematic cross-sectional view of an egg. FIG. 1 shows a cross-section of an egg 1 with the sharp end facing down. In egg 1, an eggshell membrane 12 is present inside an eggshell 11, and contents 13 including egg yolk, egg white, embryo, etc. are present inside eggshell membrane 12. In addition, an air chamber 14, which is an air layer, is present inside eggshell 11. Eggshell membrane 12 is composed of an inner membrane and an outer membrane, and air chamber 14 is present between the inner membrane and the outer membrane. Air chamber 14 is located near the blunt end of egg 1.
[0019] In this embodiment, it is determined whether the egg 1 is a normal egg or an abnormal egg. A normal egg is a fertilized egg that is in the process of hatching and is developing appropriately toward hatching. Abnormal eggs include unfertilized eggs that are not fertilized, and dead eggs that have not developed and have already died. Abnormal eggs include eggs in which the size of the air cell 14 is excessive, eggs in which the shape of the air cell 14 is abnormal, and eggs in which the position of the air cell 14 is abnormal. A state in which the shape of the air cell 14 is abnormal includes a state in which the boundary between the area in which the contents 13 are present and the air cell 14 is concave. A state in which the position of the air cell 14 is abnormal includes a state in which the air cell 14 is located on the side of the egg 1 rather than at the blunt end, and a state in which the air cell 14 is arranged at an angle within the egg 1. Furthermore, an abnormal egg includes a state in which the egg 1 is upside down.
[0020] Fig. 2 is a block diagram showing an example configuration of an egg determination system for determining the state of an egg. The egg determination system 20 includes an egg photographing device 2 that creates an egg image by photographing an egg, and an egg determination device 3 that determines the state of the egg based on the egg image. The egg photographing device 2 shines light on the egg and photographs the egg using the light that has passed through the egg. As the light that has passed through the egg is used, the egg image is an image that reflects the internal structure of the egg. The egg determination device 3 is connected to the egg photographing device 2. The egg determination device 3 executes an egg determination method.
[0021] FIG. 3 is a schematic plan view showing an example of the configuration of egg photography device 2. Egg photography device 2 is provided with a transport path 21 that transports multiple eggs 1. The transport direction is indicated by an arrow. For example, transport path 21 is a roller conveyor. Egg trays 211 that hold multiple eggs 1 arranged in multiple rows are placed on transport path 21, and the multiple eggs 1 are transported by transporting egg trays 211. Transport path 21 transports multiple egg trays 211 sequentially. Multiple eggs 1 are placed on egg trays 211, and each egg 1 is held by the egg trays 211. In the example shown in FIG. 3, egg tray 211 holds six rows of eggs 1, with each row holding six eggs 1.
[0022] In the egg photographing device 2 of this embodiment, as shown in Fig. 3, a plurality of photographing areas A1 to A3 are set along the conveying direction on the conveying path 21. Fig. 3 shows an example in which three photographing areas A1 to A3, a first photographing area A1, a second photographing area A2 and a third photographing area A3, are set. A light shielding plate 22 is disposed in each of the photographing areas A1 to A3. The light shielding plate 22 divides each of the photographing areas A1 to A3 into a front side where the eggs 1 included in the first to third rows are located, and a back side where the eggs 1 included in the fourth to sixth rows are located.
[0023] Here, in each of the photographing areas A1 to A3, the eggs 1 on the transported egg tray 211 are separated into eggs 1 in the first to third rows on the front side and eggs 1 in the fourth to sixth rows on the back side by light shielding plate 22. That is, the eggs 1 in the first to third rows on egg tray 211 are transported in front of light shielding plate 22 in each of the photographing areas A1 to A3, and the eggs 1 in the fourth to sixth rows on egg tray 211 are transported on the back side of light shielding plate 22 in each of the photographing areas A1 to A3.
[0024] The egg photography device 2 comprises a plurality of photography units 23 that photograph the eggs 1, and a control unit 25 that controls the operation of each unit of the egg photography device 2. The photography units 23 are cameras that have imaging elements such as a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal-Oxide Semiconductor) sensor, and generate color images by photographing the eggs 1 in color. The photography units 23 are disposed respectively on the front and back sides of each of the photography areas A1 to A3.
[0025] The control unit 25 is composed of a computer having a processor, an internal memory, an input / output interface, an AD (Analog-to-Digital) converter, etc. The control unit 25 controls the operation of each part of the egg imaging device 2 by cooperation of the processor and peripheral devices based on a computer program stored in the internal memory. The control unit 25 may be composed of one physical computer, or may be composed of multiple physically separated computers.
[0026] Figures 4 and 5 are schematic diagrams showing an example of the configuration of the egg photography device 2. Figure 4 is a diagram of the egg photography device 2 as viewed from the transport direction, and Figure 5 is a diagram of the egg photography device 2 as viewed from a direction perpendicular to the transport direction. The egg photography device 2 includes a lift unit 26 that lifts up multiple eggs 1 arranged in a predetermined row in each of the photography areas A1 to A3, and multiple light sources 27 that irradiate light onto the multiple eggs 1 lifted by the lift unit 26. The light source 27 emits white light. For example, the light source 27 is configured using an LED (Light Emitting Diode).
[0027] The lift units 26 are provided on the front and back sides of the light shielding plate 22 in each of the photographing areas A1 to A3. The lift units 26 are configured to lift a plurality of eggs 1 arranged in different rows in the photographing areas A1 to A3. Specifically, the two lift units 26 in the first photographing area A1 are configured to lift a plurality of eggs 1 arranged in the third and sixth rows on the egg tray 211. The two lift units 26 in the second photographing area A2 are configured to lift a plurality of eggs 1 arranged in the second and fifth rows on the egg tray 211. The two lift units 26 in the third photographing area A3 are configured to lift a plurality of eggs 1 arranged in the first and fourth rows on the egg tray 211.
[0028] Lift unit 26 is provided below conveying path 21 and is provided so as to be movable up and down relative to egg tray 211 on conveying path 21. When egg tray 211 is stopped in each of photographing areas A1 to A3 on conveying path 21, lift unit 26 moves from below egg tray 211 toward above, contacts the lower portions of a plurality of eggs 1 arranged in a predetermined row on egg tray 211, and lifts up the plurality of eggs 1 that it has come into contact with. Specifically, lift unit 26 includes support units 261 provided corresponding to each of the plurality of eggs 1, connecting member 262 provided with support units 261, and actuator 263 that moves connecting member 262 up and down. Actuator 263 is, for example, an air cylinder. Actuator 263 is controlled by control unit 25 to move a plurality of support units 261 up and down relative to egg tray 211.
[0029] The multiple light sources 27 are provided corresponding to the multiple eggs 1 arranged in a row, and irradiate light onto the insides of the multiple eggs 1. In this embodiment, the light sources 27 are configured to irradiate light from above and below each of the multiple eggs 1 arranged in a row. That is, two light sources 27, one above and one below, are provided for one egg 1.
[0030] The multiple light sources 27 include multiple upper light sources 271 that irradiate light from above onto the multiple eggs 1 lifted by the lift section 26, and multiple lower light sources 272 that irradiate light from below onto the multiple eggs 1 lifted by the lift section 26. The upper light sources 271 and the lower light sources 272 are provided in each of the photographing areas A1 to A3 corresponding to the lift section 26. The multiple upper light sources 271 and the multiple lower light sources 272 are controlled by the control section 25 as described below, and their light emission patterns (on and off) are controlled in synchronization with each other.
[0031] The multiple upper light sources 271 are provided above the multiple eggs 1 lifted by the lift unit 26. Here, each upper light source 271 is provided with a cap portion 273 that is in contact with and surrounds the upper end of the egg 1 lifted by the lift unit 26. This cap portion 273 is made of an elastically deformable material to absorb variations in the shape of the egg 1. Each upper light source 271 irradiates light from above into the inside of the egg 1 via the cap portion 273. Furthermore, each upper light source 271 is provided so as to be movable up and down by the lift guide unit 24 in accordance with the size of the egg 1.
[0032] The multiple lower light sources 272 are provided inside the multiple support parts 261 in the lift part 26. The support part 261 has an annular contact part 264 that comes into contact with the lower end part of the egg 1. Each lower light source 272 irradiates light from below into the inside of the egg 1 via the contact part 264 of the support part 261. In Figures 4 and 5, the light irradiated from the upper light source 271 and the lower light source 272 to the egg 1 is indicated by arrows.
[0033] The lift unit 26 is configured to be able to lift up multiple eggs 1 and rotate the eggs 1 by a predetermined angle while the multiple eggs 1 are sandwiched between the support unit 261 and the cap unit 273. Specifically, the lift unit 26 is configured to be able to rotate the eggs 1 by 90 degrees (0 degrees → 90 degrees → 180 degrees → 270 degrees).
[0034] Each support part 261 is rotatably provided with respect to a connecting member 262, and each support part 261 is connected by a rotation transmission part 265 using a toothed belt or the like. By driving the rotation transmission part 265 by an actuator 266 such as a motor, the multiple support parts 261 arranged in a row rotate 90 degrees in synchronously. The actuator 266 is controlled by the control part 25 to rotate the multiple support parts 261. The imaging part 23 images the multiple eggs 1 lifted by the lift part 26.
[0035] As shown in Figs. 3 and 4, the photographing units 23 are provided on the front and back sides of the light shielding plate 22 in each of the photographing areas A1 to A3, and are arranged so as to photograph a plurality of eggs 1 with the light shielding plate 22 as a background. For example, at the front side of the first photographing area A1, the photographing unit 23 photographs a plurality of eggs 1 in the third row with the light shielding plate 22 as a background, and at the back side of the first photographing area A1, the photographing unit 23 photographs a plurality of eggs 1 in the sixth row with the light shielding plate 22 as a background. At the front side of the second photographing area A2, the photographing unit 23 photographs a plurality of eggs 1 in the second row, and at the back side of the second photographing area A2, the photographing unit 23 photographs a plurality of eggs 1 in the fifth row. At the front side of the third photographing area A3, the photographing unit 23 photographs a plurality of eggs 1 in the first row, and at the back side of the third photographing area A3, the photographing unit 23 photographs a plurality of eggs 1 in the fourth row. The photographing section 23 is controlled by the control section 25 to photograph a plurality of eggs 1. The images photographed by the photographing section 23 are input to the egg judgment device 3.
[0036] The control unit 25 controls operation and stopping of the transport path 21, vertical movement and rotational movement of the lift unit 26, turning on and off the multiple light sources 27, and photographing by the photographing unit 23. The control unit 25 controls the multiple light sources 27 to cause each light source 27 to emit light while switching between multiple emission patterns in which two adjacent light sources 27 do not emit light at the same time.
[0037] Fig. 6 is a schematic plan view showing an example of a light emission pattern. In Fig. 6, a row 212 of eggs 1 lifted by lift unit 26 is surrounded by a dashed line. Among the eggs 1 included in row 212, eggs 1 irradiated with light from light source 27 are shown by a thick line. Control unit 25 causes each light source 27 to emit light while alternately switching between the first light emission pattern and the second light emission pattern shown in Fig. 6.
[0038] In the first light emission pattern, among the multiple light sources 27 arranged in a row on the front side, the even-numbered light sources 27 arranged from the upstream in the transport direction are caused to emit light, and among the multiple light sources 27 arranged in a row on the back side, the odd-numbered light sources 27 arranged from the upstream in the transport direction are caused to emit light. In the second light emission pattern, among the multiple light sources 27 arranged in a row on the front side, the odd-numbered light sources 27 arranged from the upstream in the transport direction are caused to emit light, and among the multiple light sources 27 arranged in a row on the back side, the even-numbered light sources 27 arranged from the upstream in the transport direction are caused to emit light.
[0039] Control unit 25 controls image capturing unit 23 to capture images of multiple eggs 1 in each of multiple light emission patterns. Images captured in the first light emission pattern and images captured in the second light emission pattern are obtained, thereby capturing images of all of multiple eggs 1 included in row 212.
[0040] The operation of the egg photographing device 2 will be described. The control unit 25 controls the transport path 21 to transport and stop a plurality of egg trays 211 to each of the photographing areas A1 to A3. The egg photographing device 2 lifts up a plurality of eggs 1 arranged in a predetermined row 212 by two lift units 26 provided in each of the photographing areas A1 to A3. In the first photographing area A1, the plurality of eggs 1 in the sixth row and the plurality of eggs 1 in the third row are lifted, in the second photographing area A2, the plurality of eggs 1 in the fifth row and the plurality of eggs 1 in the second row are lifted, and in the third photographing area A3, the plurality of eggs 1 in the fourth row and the plurality of eggs 1 in the first row are lifted.
[0041] The control unit 25 causes the light source 27 to emit light in a first light emission pattern. On the front side, the even-numbered eggs 1 are irradiated with light from the upstream, and on the back side, the odd-numbered eggs 1 are irradiated with light from the upstream. With each egg 1 irradiated with light, the photographing unit 23 photographs the multiple eggs 1. The control unit 25 then causes the light source 27 to emit light in a second light emission pattern. On the front side, the odd-numbered eggs 1 are irradiated with light from the upstream, and on the back side, the even-numbered eggs 1 are irradiated with light from the upstream. With each egg 1 irradiated with light, the photographing unit 23 photographs the multiple eggs 1. In this way, images of each light emission pattern (0-degree images) in a state where the rotation angle is 0 degrees (as transported) are photographed.
[0042] The control unit 25 causes the multiple light sources 27 to emit light in the first light emission pattern and the second light emission pattern each time the support unit 261 of the lift unit 26 is rotated 90 degrees, and the photographing unit 23 photographs the multiple eggs 1 in each light emission pattern. As a result, an image of each light emission pattern when rotated 90 degrees (90 degree image), an image of each light emission pattern when rotated 180 degrees (180 degree image), and an image of each light emission pattern when rotated 270 degrees (270 degree image) are photographed.
[0043] After photographing unit 23 photographs images of each light emission pattern at four different angles (four directions), control unit 25 lowers lift unit 26 and returns the multiple eggs 1 that were lifted to egg tray 211. Furthermore, control unit 25 transmits the images of each light emission pattern at four different angles (four directions) to egg determination device 3. The images that control unit 25 transmits to egg determination device 3 are color images.
[0044] After the above operations in each of the photographing areas A1-A3 are completed, control unit 25 controls transport path 21 to transport egg tray 211 to the next photographing area A1-A3 and stop it. After the inspection in the third photographing area A3 is completed, egg tray 211 is carried out to the downstream side of the third photographing area A3. After egg tray 211 stops at each of the photographing areas A1-A3, as described above, lift unit 26 lifts up multiple eggs 1 arranged in a predetermined row 212, and photographing unit 23 photographs images of each light emission pattern at four different angles.
[0045] By performing the above series of operations by egg photographing device 2, multiple eggs 1 arranged in different rows on egg tray 211 are photographed in sequence, and all eggs 1 contained in egg tray 211 are photographed. Furthermore, by sequentially sending multiple egg trays 211 onto transport path 21, egg photographing device 2 can sequentially photograph multiple eggs 1 arranged in each row on the multiple egg trays 211.
[0046] In this embodiment, multiple eggs 1 are photographed in a light emission pattern in which two adjacent light sources 27 do not both emit light at the same time, so light from adjacent eggs 1 is less likely to enter the photographed image of the egg 1. For this reason, the photographed image of the egg 1 is less likely to be influenced by light from adjacent eggs 1. Therefore, the egg determination device 3 can accurately determine the state of the egg 1 based on the photographed image of the egg 1.
[0047] Incidentally, light source 27 may have only either upper light source 271 or lower light source 272, and may be configured to irradiate eggs 1 from only above or below. Egg photographing device 2 may be configured such that multiple lift units 26 are provided in each of areas A1 to A3, and eggs 1 arranged in different rows in egg tray 211 can be lifted sequentially by lift units 26. Each of areas A1 to A3 may be configured as a single area instead of being divided into two areas, a front side and a back side.
[0048] In this embodiment, an example has been shown in which the light emission pattern and the order of the light emission patterns are the same in each of the photographing areas A1 to A3, but the light emission pattern may differ from one photographing area to another, and the order of the light emission patterns may differ from one photographing area to another. In this embodiment, an example has been shown in which lift unit 26 moves up and down relative to egg tray 211 to lift egg 1, but egg photographing device 2 may be configured to lift egg 1 by egg tray 211 moving up and down relative to lift unit 26.
[0049] In the present embodiment, an example is shown in which two light emission patterns are switched in which the multiple light sources 27 emit light alternately, but the egg photographing device 2 may be configured to switch between multiple light emission patterns in which two adjacent light sources 27 do not emit light at the same time. For example, the egg photographing device 2 may be configured to switch between three light emission patterns in which the multiple light sources 27 emit light alternately.
[0050] In this embodiment, an example has been shown in which multiple eggs 1 arranged in a predetermined line are lifted from egg tray 211 and the lifted multiple eggs 1 are photographed, but egg photographing device 2 may be configured to inspect multiple eggs 1 arranged in a line without lifting them. For example, egg photographing device 2 may be configured to arrange multiple eggs E in a line in advance and photograph the multiple eggs 1 arranged in the line. For example, egg photographing device 2 may be configured to transport eggs 1 along transport path 21 in a state in which multiple eggs 1 have been arranged in a line in advance, and photograph the eggs 1 while stopping them in a predetermined photographing area.
[0051] FIG. 7 is a block diagram showing an example of the internal configuration of the egg determination device 3. The egg determination device 3 is configured using a computer such as a personal computer or a server device. The egg determination device 3 includes a calculation unit 31, a memory 32, a storage unit 33, a reading unit 34, an operation unit 35, a display unit 36, and an input unit 37. The calculation unit 31 is configured using, for example, a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or a multi-core CPU. The calculation unit 31 may be configured using a quantum computer. The memory 32 stores temporary data generated in association with the calculation. The memory 32 is, for example, a RAM (Random Access Memory). The storage unit 33 is non-volatile, for example, a hard disk or a non-volatile semiconductor memory. The reading unit 34 reads information from a recording medium 30 such as an optical disk or a portable memory.
[0052] The operation unit 35 receives input of information such as text by receiving operations from the user. The operation unit 35 is, for example, a keyboard, a pointing device, or a touch panel. The display unit 36 displays images. The display unit 36 is, for example, a liquid crystal display or an EL display (Electroluminescent Display). The operation unit 35 and the display unit 36 may be integrated. The input unit 37 receives input of data from the outside. The input unit 37 is, for example, an input interface or a communication unit. The input unit 37 is connected to the egg imaging device 2, and an image of an egg 1 is input from the egg imaging device 2.
[0053] The calculation unit 31 causes the reading unit 34 to read the computer program 331 recorded on the recording medium 30, and stores the read computer program 331 in the storage unit 33. The calculation unit 31 executes processing for realizing the functions of the egg determination device 3 in accordance with the computer program 331. The computer program 331 may be stored in the storage unit 33 in advance, or may be downloaded from outside the egg determination device 3. In this case, the egg determination device 3 does not need to be equipped with the reading unit 34.
[0054] The computer program 331 can be deployed to be executed on a single computer, or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network. That is, the egg determination device 3 may be configured with multiple computers, and the computer program 331 may be executed on multiple computers connected via a communication network. The egg determination device 3 may be configured using a cloud server.
[0055] The egg determination device 3 includes a first trained model 332, a second trained model 333, a third trained model 334, and a fourth trained model 335 used to determine the state of the egg 1. The first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 are realized by the calculation unit 31 executing processing according to the computer program 331. The storage unit 33 stores data necessary to realize each trained model. For example, the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 are realized using a neural network. More specifically, the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 are realized using a CNN (Convolutional Neural Network). As the CNN, for example, an AlexNet model is used. Neural networks other than the AlexNet model, such as ResNet (Residual Network), may be used. Each trained model may be realized using a model other than a neural network, such as a support vector machine.
[0056] The first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 may be configured using hardware. For example, each trained model may be configured by hardware including a processor and a memory that stores necessary programs and data. Alternatively, the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 may be realized using a quantum computer. Alternatively, the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 may be provided outside the egg determination device 3, and the egg determination device 3 may perform processing using each external trained model. For example, each trained model may be realized using the cloud.
[0057] 8 is a conceptual diagram showing the functions of the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335. The first trained model 332 has three input channels, and receives an R image consisting of an R (red) component, a G image consisting of a G (green) component, and a B image consisting of a B (blue) component of a color image of an egg 1. The first trained model 332 has been trained in advance to output dead egg information indicating the certainty that the egg 1 is a dead egg and infertile egg information indicating the certainty that the egg 1 is an infertile egg when the R image, the G image, and the B image are input. The larger the value of the dead egg information, the higher the certainty that the egg 1 is a dead egg, and the larger the value of the infertile egg information, the higher the certainty that the egg 1 is an infertile egg.
[0058] Since the internal structure of dead eggs and unfertilized eggs differs from that of eggs in the process of hatching, the image of the egg 1 changes depending on whether the egg 1 is a dead egg or an unfertilized egg. Therefore, it is possible to generate a first trained model 332 that outputs dead egg information and unfertilized egg information according to the image of the egg 1.
[0059] The second trained model 333 has three input channels. The second trained model 333 has been trained in advance to output position information indicating the degree of certainty that the position of the air cell of the egg 1 is abnormal and that the air cell is located on the side of the egg 1 when the R image, G image, and B image of the image of the egg 1 are input. The larger the value of the position information, the higher the degree of certainty that the air cell is located on the side of the egg 1. Since an egg with an air cell located on the side has a different internal structure compared to an egg with an air cell in a normal position, the image of the egg 1 changes depending on whether the air cell is located on the side of the egg 1 or not. For this reason, it is possible to generate the second trained model 333 that outputs position information depending on the image of the egg 1.
[0060] The third trained model 334 has one input channel and is trained in advance to output shape information indicating the degree of certainty that the shape of the air cell of the egg 1 is abnormal when a monochrome boundary image showing the boundary between the air cell in the egg 1 and other regions is input. When the boundary between the air cell in the egg 1 and other regions is not substantially straight but has a large concave shape, the shape of the air cell is considered to be abnormal. The shape information is composed of a value indicating the degree of certainty that the shape of the air cell is abnormal, and the larger the value, the higher the degree of certainty that the shape of the air cell is abnormal. In an egg with an abnormal air cell shape, the shape of the boundary changes compared to a normal egg, so the boundary image changes depending on whether the shape of the air cell is abnormal or not. For this reason, it is possible to generate a third trained model 334 that outputs shape information depending on the boundary image.
[0061] If the developmental state during hatching is abnormal, the contents 13 of egg 1 as shown in Figure 1 will be deformed compared to a normal egg, and the shape of the air cell 14 may also be deformed in response to the deformation of contents 13. In this case, the boundary between the air cell 14 and contents 13 will also be deformed. Since the air cell is hollow, the air cell area will be a clearly different color from other areas in the egg image. For example, the air cell area will be a white area. For this reason, it is possible to extract the boundary between the air cell and other areas from the egg image.
[0062] FIG. 9 is a schematic diagram showing an example of a boundary line image. FIG. 9 shows a boundary line image obtained from a normal egg 1 and a boundary line image obtained from an abnormal egg 1. As shown in FIG. 9, in a normal egg 1, the boundary line is substantially straight, whereas in an abnormal egg 1, the boundary line may have a large concave shape. If the shape of the boundary line is abnormal, the shape of the air cell is abnormal, and it is possible that the developmental state of the egg 1 is abnormal. For this reason, by determining the shape of the air cell based on the boundary line image and determining that the egg 1 is an abnormal egg if the shape of the air cell is abnormal, it is possible to eliminate eggs 1 that may be developing abnormally.
[0063] The fourth trained model 335 has three input channels and has been trained in advance to output development information indicating the developmental state of the egg in the process of hatching when G images of an image of an egg 1 are input to each input channel. The developmental information is made up of a value indicating the degree of certainty that the developmental state of the egg in the process of hatching is abnormal, and the larger the value, the higher the degree of certainty that the developmental state of the egg in the process of hatching is abnormal.
[0064] In an egg with an abnormal developmental state, the internal structure of the egg differs from that of a normal egg, and so the image of the egg 1 taken varies depending on the developmental state. For example, the degree to which blood vessels occurring inside the egg 1 are developed varies depending on the developmental state, and the state of the blood vessels included in the image of the egg 1 taken varies depending on the developmental state. In particular, the blood vessel portion included in the image contains a large amount of G component among R component, G component, and B component, and the G image changes significantly depending on the state of the blood vessels in the egg 1, i.e., the developmental state of the egg 1. For this reason, it is possible to generate a fourth trained model 335 that outputs developmental information depending on the G image of the image of the egg 1 taken.
[0065] The learning of the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 is performed by the learning device 4. FIG. 10 is a block diagram showing an example of the internal functional configuration of the learning device 4. The learning device 4 is a computer such as a server device or a personal computer. The learning device 4 includes a calculation unit 41, a memory 42, a storage unit 43, a reading unit 44, an operation unit 45, and a display unit 46. The calculation unit 41 is configured using, for example, a CPU, a GPU, or a multi-core CPU. The calculation unit 41 may be configured using a quantum computer. The memory 42 stores temporary data generated in association with the calculation. The memory 42 is, for example, a RAM. The reading unit 44 reads information from a recording medium 40 such as an optical disk or a portable memory. The storage unit 43 is non-volatile, for example, a hard disk or a non-volatile semiconductor memory.
[0066] The operation unit 45 receives information input by receiving operations from a user. The operation unit 45 is, for example, a keyboard, a pointing device, or a touch panel. The display unit 46 displays an image. The display unit 46 is, for example, a liquid crystal display or an EL display.
[0067] The computer program 431 can be deployed to be executed on a single computer, or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network. That is, the learning device 4 may be configured with multiple computers, and the computer program 431 may be executed on multiple computers connected via a communication network. The learning device 4 may be configured using a cloud server.
[0068] The learning device 4 executes a trained model generation method. That is, the learning device 4 performs machine learning to generate a first trained model 332, a second trained model 333, a third trained model 334, and a fourth trained model 335. The process by which the learning device 4 generates the third trained model 334 will be described below.
[0069] The learning device 4 includes a learning model 432 that is the basis of the third trained model 334. The learning device 4 trains the learning model 432 to generate the third trained model 334. The learning model 432 is realized by the calculation unit 31 executing processing according to the computer program 331. The learning model 432 is realized using a neural network, more specifically, using a CNN, and for example, an AlexNet model is used as the CNN. The number of input channels of the learning model 432 is one. The learning model 432 may be configured using hardware.
[0070] The storage unit 43 stores training data 433 for training the learning model 432 to generate the third trained model 334. The training data 433 includes a data set that associates a monochrome boundary image showing the boundary between the air cell in the egg 1 and other regions with information showing whether the shape of the air cell in the egg 1 is normal or abnormal. The boundary image is a monochrome image in which the boundary between the air cell and other regions is extracted from an image of the egg photographed using light transmitted through the egg. For example, a B image is generated from an image of the egg photographed, a monochrome image is generated by binarizing the screen of the B image, and a boundary line is detected by edge detection in the monochrome image, and a monochrome boundary image showing the detected boundary line is generated. For example, a boundary image generated from an image generated by the egg photographing device 2 is recorded in the training data 433. Whether the shape of the air cell is normal or abnormal is determined in advance. For example, a person who checks the boundary image determines whether the shape of the air cell is normal or abnormal, and information showing whether the shape of the air cell is normal or abnormal is generated. A plurality of data sets are recorded in the training data 433.
[0071] 11 is a flowchart showing an example of a procedure of processing executed by the learning device 4. Hereinafter, step is abbreviated as S. The learning device 4 executes the following processing as the calculation unit 41 executes information processing according to the computer program 431. The learning device 4 acquires the training data 433 as the calculation unit 41 reads out the training data 433 stored in the storage unit 43 (S11). In S11, the learning device 4 may acquire the training data 433 by inputting the training data 433 from an external source.
[0072] The learning device 4 then uses the training data 433 to train the learning model 432, thereby generating the third trained model 334 (S12). In S12, the calculation unit 41 inputs the boundary line image recorded in the training data 433 to the learning model 432 that is the basis of the third trained model 334. The learning model 432 performs calculations in response to the input of the boundary line image, and outputs shape information. The larger the value of the shape information, the higher the certainty that the shape of the air chamber is abnormal.
[0073] The calculation unit 41 adjusts the calculation parameters of the learning model 432 so as to reduce the error between the shape information output by the learning model 432 and the information associated with the input boundary image and indicating whether the shape of the air chamber is normal or abnormal. That is, the calculation unit 41 adjusts the parameters so that the value of the shape information is small when the information associated with the input boundary image indicates that the shape of the air chamber is normal, and so that the value of the shape information is large when the information associated with the input boundary image indicates that the shape of the air chamber is abnormal. For example, the calculation unit 41 adjusts the parameters by the error backpropagation method.
[0074] The calculation unit 41 performs machine learning of the learning model 432 by repeating processing using multiple data sets recorded in the training data 433 and adjusting the parameters of the learning model 432. By adjusting the parameters of the calculation of the learning model 432 in this manner, a third trained model 334 is generated. The calculation unit 41 stores the adjusted final parameters in the storage unit 43. After S12 ends, the learning device 4 ends the processing.
[0075] The third trained model 334 generated by S11 to S12 is provided in the egg determination device 3. For example, the final parameters adjusted in S12 are input to the egg determination device 3 through the input unit 37 and stored in the storage unit 33. The calculation unit 31 executes information processing using the stored parameters, thereby realizing the third trained model 334. It should be noted that the egg determination device 3 may also have the function of the learning device 4.
[0076] The first trained model 332, the second trained model 333, and the fourth trained model 335 are also generated by the learning device in the same manner. The first trained model 332 is generated by learning using training data in which a dataset in which an R image, a G image, and a B image are associated with information indicating whether an egg is dead or infertile is recorded. The second trained model 333 is generated by learning using training data in which a dataset in which an R image, a G image, and a B image are associated with information indicating whether an air cell of an egg is located on a side surface rather than a blunt end is recorded. The fourth trained model 335 is generated by learning using training data in which a dataset in which a G image is associated with information indicating whether a developmental state of an egg during hatching is normal or abnormal is recorded.
[0077] The following describes the process by which the egg determination device 3 determines the state of the egg 1. Fig. 12 is a flow chart showing the procedure of the process executed by the egg determination device 3. The calculation unit 31 executes information processing according to the computer program 331, causing the egg determination device 3 to execute the following process. The egg determination device 3 acquires an egg image obtained by photographing the egg 1 (S201).
[0078] The images captured by the photographing section 23 of the egg photographing device 2 are input to the egg determination device 3. The egg determination device 3 stores the input images in the memory section 33. The images captured by the photographing section 23 include images of multiple eggs 1. In the example described in this embodiment, the images captured by the photographing section 23 include images of three eggs 1 irradiated with light and images of three eggs 1 not irradiated with light. For the same egg 1, there are images including the egg 1 irradiated with light and images including the egg 1 not irradiated with light. Furthermore, for the same egg 1, there are four images rotated at different angles (a 0 degree image, a 90 degree image, a 180 degree image, and a 270 degree image).
[0079] In S201, the calculation unit 31 extracts an image of the egg 1 irradiated with light from the images captured by the imaging unit 23 for one egg 1. At this time, the calculation unit 31 extracts four images with different rotation angles (a 0-degree image, a 90-degree image, a 180-degree image, and a 270-degree image). In this way, the calculation unit 31 obtains four egg images of one egg 1 captured. The egg image is a color image made up of a plurality of pixels, and each pixel contains pixel values for each RGB component.
[0080] The egg determination device 3 then determines whether the egg 1 is a dead egg or an unfertilized egg (S202). In S202, the calculation unit 31 inputs the egg image to the first trained model 332. At this time, the calculation unit 31 generates an R image consisting of the R component of the egg image, a G image consisting of the G component, and a B image consisting of the B component, and inputs the R image, G image, and B image to three input channels of the first trained model 332. The first trained model 332 performs calculations in response to the input of the egg image, and outputs dead egg information indicating the degree of certainty that the egg 1 is a dead egg, and unfertilized egg information indicating the degree of certainty that the egg 1 is an unfertilized egg. The calculation unit 31 acquires the dead egg information and unfertilized egg information output by the first trained model 332. The calculation unit 31 inputs each of the four egg images (a 0-degree image, a 90-degree image, a 180-degree image, and a 270-degree image) into the first trained model 332, and obtains dead egg information and infertile egg information for each egg image.
[0081] The calculation unit 31 judges whether the egg 1 is a dead egg or an unfertilized egg based on the acquired dead egg information and unfertilized egg information. The calculation unit 31 makes a judgment by comprehensively evaluating the dead egg information and unfertilized egg information obtained for the four egg images. Specifically, the calculation unit 31 calculates the average value of the four acquired dead egg information, and judges the egg 1 to be a dead egg if the average value of the dead egg information exceeds a predetermined threshold, and judges the egg 1 to be a not a dead egg if the average value of the dead egg information does not exceed the threshold. The calculation unit 31 also calculates the average value of the four acquired unfertilized egg information, and judges the egg 1 to be an unfertilized egg if the average value of the unfertilized egg information exceeds a predetermined threshold, and judges the egg 1 to be a not an unfertilized egg if the average value of the unfertilized egg information does not exceed the predetermined threshold.
[0082] The threshold for determining whether an egg is dead or infertile may be the same as or different from the threshold for determining whether an egg is infertile. The calculation unit 31 may determine that the egg 1 is a dead egg when the average value of the dead egg information is equal to or greater than the threshold, and may determine that the egg 1 is an infertile egg when the average value of the infertile egg information is equal to or greater than the threshold.
[0083] If the egg 1 is a dead egg or an infertile egg (S202: YES), the egg determination device 3 determines that the egg 1 is an abnormal egg (S212). The calculation unit 31 may display an image on the display unit 36 to inform the user that the egg 1 is an abnormal egg. If the egg 1 is neither a dead egg nor an infertile egg (S202: NO), the egg determination device 3 determines whether the size of the air chamber of the egg 1 is normal or not (S203). In S203, the calculation unit 31 determines whether the size of the air chamber is normal or not based on the egg image in accordance with a predetermined rule. For example, the calculation unit 31 converts the egg image into a monochrome image by a binarization process, and calculates the area of a white region in the monochrome image. The white region corresponds to the air chamber. The calculation unit 31 calculates the area of the white region for the four egg images, calculates the sum excluding the minimum value of the calculated four areas, and determines that the size of the air chamber is excessively large if the calculated sum exceeds a predetermined threshold value.
[0084] If the size of the air chamber is excessively large, calculation unit 31 determines that the size of the air chamber of egg 1 is abnormal. If the calculated sum value does not exceed a predetermined threshold value, calculation unit 31 determines that the size of the air chamber of egg 1 is normal. Calculation unit 31 may also determine that the size of the air chamber is excessively large if the calculated sum value is equal to or greater than a predetermined threshold value.
[0085] If the size of the air cell of egg 1 is abnormal (S203: NO), egg determination device 3 advances the process to S212. If the size of the air cell of egg 1 is normal (S203: YES), egg determination device 3 determines whether the position of the air cell of egg 1 is normal or not (S204). In S204, calculation unit 31 inputs the egg image to second trained model 333. At this time, calculation unit 31 generates an R image, a G image, and a B image of the egg image, and inputs the R image, the G image, and the B image to three input channels of second trained model 333. Second trained model 333 performs calculations in response to the input of the egg image, and outputs position information indicating the degree of certainty that the air cell is located on the side surface of egg 1. Calculation unit 31 acquires the position information output by second trained model 333. The calculation unit 31 inputs each of the four egg images (a 0-degree image, a 90-degree image, a 180-degree image, and a 270-degree image) into the second trained model 333, and obtains position information for each egg image.
[0086] The calculation unit 31 determines whether the position of the air cell of the egg 1 is normal or not based on the acquired position information. If the maximum value of the four pieces of position information obtained according to the four egg images exceeds a predetermined threshold, the calculation unit 31 determines that the air cell is located on the side of the egg 1. If the position of the air cell is abnormal at any angle, a position abnormality is determined. If the maximum value of the four pieces of position information does not exceed a predetermined threshold, the calculation unit 31 determines that the air cell is not located on the side of the egg 1.
[0087] If the air cell is located on the side of egg 1, calculation unit 31 determines that the position of the air cell of egg 1 is abnormal. If the air cell is not located on the side of egg 1, calculation unit 31 determines that the position of the air cell of egg 1 is normal. Calculation unit 31 may determine that the air cell is located on the side of egg 1 if the maximum value of the four pieces of positional information is equal to or greater than a threshold value.
[0088] If the position of the air cell of the egg 1 is abnormal (S204: NO), the egg determination device 3 advances the process to S212. If the position of the air cell of the egg 1 is normal (S204: YES), the egg determination device 3 generates a monochrome boundary image showing the boundary between the air cell and other areas in the egg 1 (S205).
[0089] In S205, the calculation unit 31 generates a B image from the egg image and binarizes the screen of the generated B image to generate a monochrome image. The calculation unit 31 may generate a monochrome image from the egg image by other methods, such as binarizing the sum of the values of the three RGB components. The calculation unit 31 detects a boundary line by performing edge detection in the generated monochrome image. The calculation unit 31 generates a monochrome boundary line image showing the detected boundary line. As shown in FIG. 1, the boundary line image shows the boundary line between the contents 13 present inside the eggshell 11 and eggshell membrane 12 and the air chamber 14, which is an air layer inside the egg 1. The calculation unit 31 generates a boundary line image from each of the four egg images (0 degree image, 90 degree image, 180 degree image, and 270 degree image).
[0090] The egg determination device 3 inputs the boundary line image to the third trained model 334 (S206). In S206, the generated boundary line image is input to the third trained model 334. The third trained model 334 performs calculations in response to the input of the boundary line image, and outputs shape information indicating the degree of certainty that the shape of the air cell of the egg 1 is abnormal. The calculation unit 31 inputs each of the four boundary line images corresponding to the four egg images (0 degree image, 90 degree image, 180 degree image, and 270 degree image) to the third trained model 334, and the third trained model 334 outputs four pieces of shape information corresponding to the four boundary line images.
[0091] The egg determination device 3 next acquires shape information (S207). In S207, the calculation unit 31 acquires the shape information output by the third trained model 334. At this time, the calculation unit 31 acquires four pieces of shape information corresponding to the four boundary images. The egg determination device 3 determines whether the shape of the air cell of the egg 1 is normal or not based on the shape information (S208). The calculation unit 31 determines that the shape of the air cell is abnormal if the maximum value of the four pieces of shape information obtained according to the four boundary images exceeds a predetermined threshold. The calculation unit 31 determines that the shape of the air cell is normal if the maximum value of the four pieces of shape information does not exceed a predetermined threshold.
[0092] In the state where the shape information exceeds the threshold value, the boundary between the air cell and other areas contained in the egg 1 is not substantially straight but has a large concave shape. The shape of the air cell may vary depending on the direction (angle) at which the egg 1 is photographed. If the shape of the air cell is abnormal in one direction, even if the shape of the air cell is normal in other directions, the shape of the air cell as a whole is deemed abnormal. A single piece of shape information having a maximum value among the four pieces of shape information most strongly indicates that the shape of the air cell is abnormal. If the shape of the air cell is normal based on the maximum value of this shape information, the shape of the air cell is normal in all directions, and the shape of the air cell can be deemed normal. If the shape of the air cell is abnormal based on the maximum value of the shape information, the shape of the air cell can be deemed abnormal. The shape of the air cell of the egg 1 can be accurately determined by making a determination using the maximum value of the four pieces of shape information. The calculation unit 31 may determine that the developmental state of the egg 1 is abnormal when the maximum value of the four pieces of shape information is equal to or greater than the threshold value. Calculation unit 31 may determine whether or not the shape of the air cell of egg 1 is normal based on the shape information using a method other than a determination based on the maximum value of the four pieces of shape information. For example, calculation unit 31 may determine whether or not the shape of the air cell of egg 1 is normal according to the average of the values of the four pieces of shape information.
[0093] If the shape of the air cell of the egg 1 is abnormal (S208: NO), the egg determination device 3 advances the process to S212. If the shape of the air cell of the egg 1 is normal (S208: YES), the egg determination device 3 determines whether the air cell of the egg 1 is tilted or whether the egg 1 is inverted (S209). In S209, the calculation unit 31 determines whether the air cell is tilted based on the egg image in accordance with a predetermined rule. For example, the calculation unit 31 converts the egg image into a monochrome image by binarization processing, approximates the shape of the egg 1 to an ellipse, and obtains the angle of the major axis with respect to a horizontal line or a vertical line from the monochrome image. The calculation unit 31 extracts the boundary line between the air cell contained in the egg 1 and other areas from the monochrome image, approximates the boundary line with a straight line, and obtains the angle of the boundary line with respect to the horizontal line or the vertical line. Since eggs 1 whose boundary lines cannot be approximated with a straight line are eliminated in S208, it is easy to obtain the angle.
[0094] Calculation unit 31 calculates the angle of the boundary line relative to the long axis of egg 1. Calculation unit 31 calculates the angle of the boundary line relative to the long axis for the four egg images, and determines that the air cell of egg 1 is inclined if the maximum value of the four calculated angles exceeds a predetermined threshold. Calculation unit 31 determines that the air cell of egg 1 is not inclined if the maximum value of the four calculated angles does not exceed the threshold. Calculation unit 31 may also determine that the air cell of egg 1 is inclined if the maximum value of the four calculated angles is equal to or greater than the threshold. In this manner, egg determination device 3 determines the inclination of the air cell.
[0095] In S209, calculation unit 31 also determines whether egg 1 is inverted or not in accordance with a predetermined rule. For example, calculation unit 31 generates a monochrome image of the upper half of the egg image, and calculates the area of the white region in the monochrome image. Calculation unit 31 generates a monochrome image of the lower half of the egg image, and calculates the area of the white region in the monochrome image. Calculation unit 31 calculates the area of the white region in the upper half and the area of the white region in the lower half for the four egg images, calculates the sum excluding the minimum value of the areas of the white regions in the four upper halves, and calculates the sum excluding the minimum value of the areas of the white regions in the four lower halves.
[0096] The calculation unit 31 determines that the egg 1 is inverted when the sum of the areas of the white regions of the four upper halves excluding the minimum value is less than a predetermined threshold value and the sum of the areas of the white regions of the four lower halves excluding the minimum value exceeds a predetermined threshold value. When the sum of the areas of the white regions of the four upper halves excluding the minimum value is not less than the threshold value or when the sum of the areas of the white regions of the four lower halves excluding the minimum value does not exceed the threshold value, the calculation unit 31 determines that the egg 1 is not inverted. The two threshold values may be the same or different. The calculation unit 31 may determine that the egg 1 is inverted when the sum of the areas of the white regions of the four upper halves excluding the minimum value is less than or equal to a predetermined threshold value and the sum of the areas of the white regions of the four lower halves excluding the minimum value is greater than or equal to a predetermined threshold value. In this way, the egg determination device 3 determines the orientation of the egg 1.
[0097] If the air cell of the egg 1 is tilted or the egg 1 is inverted (S209: YES), the egg determination device 3 advances the process to S212. If the air cell of the egg 1 is not tilted and the egg 1 is not inverted (S209: NO), the egg determination device 3 determines whether the developmental state of the egg 1 is normal or not (S210). In S210, the calculation unit 31 generates an R image, a G image, and a B image of the egg image, and inputs the same three G images to three input channels of the fourth trained model 335. The fourth trained model 335 performs a calculation according to the input of the three G images, and outputs developmental information indicating the developmental state of the egg during hatching. For each of the four egg images (0 degree image, 90 degree image, 180 degree image, and 270 degree image), the calculation unit 31 inputs the G image to the fourth trained model 335, and the fourth trained model 335 outputs the developmental information.
[0098] The calculation unit 31 acquires the development information output by the fourth trained model 335. At this time, the calculation unit 31 acquires four pieces of development information corresponding to the four egg images. The calculation unit 31 normalizes the four pieces of development information, calculates the sum of the two pieces of development information with the smallest values, and if the calculated sum exceeds a predetermined threshold, determines that the developmental state of the egg 1 is abnormal. If the calculated sum is equal to or less than the threshold, the calculation unit 31 determines that the developmental state of the egg 1 is normal.
[0099] The developmental state of an egg in the process of hatching may vary depending on the direction (angle) at which the egg 1 is photographed. Even if the developmental state is abnormal in one direction, if the developmental state is normal in another direction, the developmental state is normal overall. If the developmental state is normal based on the two developmental information pieces with the smallest values among the four developmental information pieces, the developmental state can be considered normal. If the developmental state is abnormal based on these two developmental information pieces, the developmental state becomes abnormal at all angles, and the developmental state can be considered abnormal. The developmental state of the egg 1 can be accurately determined by making a determination using the sum of the two developmental information pieces with the smallest values. The calculation unit 31 may determine that the developmental state of the egg 1 is abnormal when the sum of the two developmental information pieces with the smallest values is equal to or greater than a threshold value.
[0100] If the developmental state of the egg 1 is abnormal (S210: NO), the egg determination device 3 advances the process to S212. If the developmental state of the egg 1 is normal (S210: YES), the egg determination device 3 determines that the egg 1 is a normal egg (S211). The calculation unit 31 may display an image on the display unit 36 to notify that the egg 1 is a normal egg. After S211 or S212 is completed, the egg determination device 3 ends the process.
[0101] The respective threshold values used in the various determinations performed in the processes of S201 to S212 are stored in advance in the memory unit 33, or are included in the computer program 331. Each threshold value may be input by the user operating the operation unit 35. The egg determination device 3 performs the processes of S201 to S212 for each egg 1 photographed by the egg photographing device 2. In this manner, it is determined whether or not each egg 1 is normal. Thereafter, the eggs 1 determined to be normal and the eggs 1 determined to be abnormal are separated and handled separately. For example, the eggs 1 determined to be abnormal are discarded, and the eggs 1 determined to be normal are used for breeding, vaccine production, or the like.
[0102] As described above in detail, in this embodiment, the egg determination device 3 inputs a monochrome boundary image to the third trained model 334, and determines the shape of the air cell of the egg 1 based on the shape information output by the third trained model 334. As another method of determining the shape of the air cell, it is possible to use a trained model that outputs shape information when a color egg image is input. Compared to a color egg image, the information contained in the boundary image contains less information other than the shape of the boundary line. A determination using the third trained model 334 to which a boundary image is input is less affected by information other than the shape of the boundary line compared to a determination using a color egg image, making it possible to make an accurate determination according to the shape of the boundary line.
[0103] Furthermore, the shape of the boundary line is clearer in a monochrome boundary line image than in a color egg image. Therefore, in a judgment using third trained model 334 to which the boundary line image is input, judgment based on a clear shape of the boundary line is possible. Therefore, in this embodiment, it is possible to judge with high accuracy whether the shape of the air cell of egg 1 is normal or abnormal. By determining the shape of the air cell of egg 1 with high accuracy, it is possible to accurately eliminate eggs 1 that have an abnormal shape of the air cell and may be in an abnormal developmental state.
[0104] In this embodiment, egg determination device 3 determines whether egg 1 is a dead egg or an infertile egg using first trained model 332, determines the position of the air cell of egg 1 using second trained model 333, and determines the developmental state of egg 1 using fourth trained model 335. Furthermore, egg determination device 3 determines the size of the air cell, the inclination of the air cell, or the orientation of egg 1 based on the egg image in accordance with rules. The state of egg 1 is determined by an appropriate method according to the determination content, and the state of egg 1 is determined with high accuracy.
[0105] In this embodiment, the egg determination device 3 performs determinations in the following order: determine whether or not the egg 1 is a dead egg or an infertile egg, determine the size of the air cell, determine the position of the air cell, determine the shape of the air cell, determine the inclination of the air cell or the orientation of the egg 1, and determine the developmental state of the egg 1. The state of the egg 1 is determined in an appropriate order, such as when the egg 1 is not a dead egg or an infertile egg, other determinations are made, and it is determined with high accuracy whether or not the egg 1 is a normal egg.
[0106] In this embodiment, a form in which images at four different angles are acquired while rotating the egg 1 has been shown, but the egg imaging device 2 may be configured to acquire images of the egg 1 at a plurality of angles, less than four or more than four. In this embodiment, a form in which a G image is input to the fourth trained model 335 as a single-component image of an egg image has been shown, but the egg determination device 3 may be configured to use an R image or a B image as the single-component image. In other words, the fourth trained model 335 may be configured to have been trained in advance to output development information when three identical R images or B images are input. Even when an R image or a B image is used as the single-component image, it is possible to determine the state of the egg 1.
[0107] The present invention is not limited to the contents of the above-described embodiment, and various modifications are possible within the scope of the claims. In other words, embodiments obtained by combining technical means appropriately modified within the scope of the claims are also included in the technical scope of the present invention.
[0108] The matters described in each embodiment can be combined with each other. In addition, the independent claims and dependent claims described in the claims can be combined with each other in any and all combinations regardless of the citation format. Furthermore, the claims use a format in which a claim cites two or more other claims (multiple claim format), but this is not limited to this. A multiple claim (multi-multi claim) that cites at least one multiple claim may also be used. [Explanation of symbols]
[0109] 1 egg 2. Egg Photography Device 3 Egg determination device 31 Arithmetic section 33 Storage section 331 Computer Programs 332 First trained model 333 Second trained model 334 Third trained model 335 4th trained model 4. Learning Device
Claims
1. Obtain an image of the egg, A boundary image is generated from the acquired image, which shows the boundary between the air cell and other regions in the egg; The generated boundary image is input to a trained model that outputs shape information indicating whether the shape of the air chamber is normal or not when a boundary image is input, and the shape information output by the trained model is obtained; Based on the acquired shape information, it is determined whether the shape of the air chamber is normal or not. A computer program that causes a computer to execute a process.
2. Obtain multiple images of the same egg taken from multiple angles, A boundary image generated from each of the plurality of images is input to the trained model, and shape information output by the trained model is obtained, thereby obtaining a plurality of pieces of shape information corresponding to the plurality of images; Among the plurality of pieces of shape information, a single piece of shape information that most strongly indicates that the shape of the air chamber is abnormal is used to determine whether the shape of the air chamber is normal or not.
2. The computer program product according to claim 1, which causes a computer to execute a process.
3. Based on the acquired image, determining whether the egg is dead or infertile, the location of the air cell of the egg, or the developmental state of the egg using another trained model; Based on the acquired image, the size of the air cell, the inclination of the air cell, or the orientation of the egg is determined according to predetermined rules.
2. The computer program product according to claim 1, which causes a computer to execute a process.
4. Based on the acquired image, it is determined whether the egg is a dead egg or an infertile egg; If the egg is not a dead egg or an infertile egg, using the trained model, determining whether the shape of the air cell is normal; Based on the acquired images, the developmental state of the eggs is judged, If the shape of the air cell and the state of development of the egg are determined to be normal, the egg is determined to be a normal egg.
2. The computer program product according to claim 1, which causes a computer to execute a process.
5. Obtain an image of the egg, A boundary image is generated from the acquired image, which shows the boundary between the air cell and other regions in the egg; The generated boundary image is input to a trained model that outputs shape information indicating whether the shape of the air chamber is normal or not when a boundary image is input, and the shape information output by the trained model is obtained; Based on the acquired shape information, it is determined whether the shape of the air chamber is normal or not.
2. A method for determining eggs.
6. Obtaining training data including a boundary image, which is generated from an image of an egg and shows a boundary between an air cell in the egg and other regions, and shape information showing whether the shape of the air cell is normal; A trained model that outputs shape information when a boundary image is input is generated by training using the training data. A trained model generation method comprising:
7. A calculation unit is provided, The calculation unit is Obtain an image of the egg, A boundary image is generated from the acquired image, which shows the boundary between the air cell and other regions in the egg; The generated boundary image is input to a trained model that outputs shape information indicating whether the shape of the air chamber is normal or not when a boundary image is input, and the shape information output by the trained model is obtained; Based on the acquired shape information, it is determined whether the shape of the air chamber is normal or not. An egg judgment device.
Citation Information
Patent Citations
Method and apparatus for inspecting fertilized egg
JP2004101204A
Automatic discriminator of superior egg
JP2007212155A
Egg air space position inspection method and device
JP2011215015A
Egg classification system
JP2022099480A
Automatic candling machine
US20060038978A1
