Computer program, egg determination method, trained model generation method, and egg determination device.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- NABERU KK
- Filing Date
- 2023-04-13
- Publication Date
- 2026-08-03
Smart Images

Figure 0007898734000001 
Figure 0007898734000002 
Figure 0007898734000003
Abstract
Description
Technical Field
[0004] , , , ,
[0005] , , , , ,
[0001] The present invention relates to a computer program for determining the state of eggs, an egg determination method, a learned model generation method, and an egg determination device.
Background Art
[0002] Among eggs of poultry such as chicken eggs, fertilized eggs may be used for purposes other than food, such as reproduction or vaccine production. Conventionally, the state of such fertilized eggs has been inspected. For example, the shape of the air chamber of an egg is inspected. If the shape of the air chamber is abnormal, the development state during incubation may be abnormal. Therefore, an egg with an abnormal air chamber shape is determined to be abnormal. For example, eggs determined to be normal by inspection are used, and eggs determined to be abnormal are discarded. Patent Document 1 discloses a technique for determining the state of an egg based on an image obtained by photographing the egg using light transmitted through the egg.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] A computer program according to one embodiment of the present invention is characterized by: acquiring an image of an egg; generating a boundary image from the acquired image that shows the boundary between the air cell contained in the egg and other regions; inputting the generated boundary image to a trained model that outputs shape information indicating whether or not the shape of the air cell is normal when the boundary image is input; acquiring the shape information output by the trained model; and causing the computer to perform a process to determine whether or not the shape of the air cell is normal based on the acquired shape information.
[0006] A computer program according to one embodiment of the present invention is characterized by acquiring multiple images of the same egg taken from multiple directions, inputting boundary line images generated from each of the multiple images into the trained model, acquiring shape information output by the trained model to acquire multiple pieces of shape information corresponding to the multiple images, and causing the computer to perform a process to determine whether the shape of the air cell is normal or not based on the single piece of shape information that most strongly indicates that the shape of the air cell is abnormal among the multiple pieces of shape information.
[0007] A computer program according to one embodiment of the present invention is characterized by causing the computer to perform the following processes based on the acquired image: determining whether an egg is dead or unfertilized, the location of the air sac of the egg, or the developmental state of the egg using other trained models; and determining the size of the air sac, the tilt of the air sac, or the orientation of the egg according to predetermined rules based on the acquired image.
[0008] A computer program according to one embodiment of the present invention is characterized in that it causes the computer to perform the following processes: determine whether an egg is dead or unfertilized based on an acquired image; if the egg is not dead or unfertilized, determine whether the shape of the air sac is normal using the trained model; determine the developmental state of the egg based on the acquired image; and if it determines that the shape of the air sac and the developmental state of the egg are normal, determine that the egg is a normal egg.
[0009] An egg determination method according to one embodiment of the present invention is characterized by acquiring an image of an egg, generating a boundary line image from the acquired image that shows the boundary between the air cell contained in the egg and other regions, inputting the generated boundary line image to a trained model that outputs shape information indicating whether or not the shape of the air cell is normal when the boundary line image is input, acquiring the shape information output by the trained model, and determining whether or not the shape of the air cell is normal based on the acquired shape information.
[0010] A method for generating a trained model according to one embodiment of the present invention is characterized by acquiring training data that includes boundary line images showing the boundary between the air cell and other regions contained in the egg, generated from images of an egg, and shape information indicating whether or not the shape of the air cell is normal, and generating a trained model that outputs shape information when a boundary line image is input by training using the said training data.
[0011] An egg determination device according to one embodiment of the present invention comprises a calculation unit, the calculation unit acquires an image of an egg, generates a boundary line image from the acquired image showing the boundary between the air cell contained in the egg and other regions, inputs the generated boundary line image to a trained model that outputs shape information indicating whether or not the shape of the air cell is normal when the boundary line image is input, acquires the shape information output by the trained model, and determines whether or not the shape of the air cell is normal based on the acquired shape information.
[0012] In one embodiment of the present invention, a boundary line image is generated from an image of an egg, showing the boundary between the air cell and other regions contained in the egg. The shape of the air cell in the egg is determined using a trained model that outputs shape information indicating whether the shape of the air cell is normal or abnormal when the boundary line image is input. Depending on the shape of the boundary line, it is 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 taken from multiple directions, shape information is obtained based on each image, and the shape of the air cell is determined based on a single shape information that more strongly indicates that the shape of the air cell is abnormal than others. The shape of the air cell may differ depending on the direction. 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 overall shape of the air cell is considered abnormal. 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 than others, then the shape of the air cell can be considered normal in all directions. Therefore, it is possible to accurately determine whether the shape of the air cell of an egg is normal or abnormal.
[0014] In one embodiment of the present invention, the determination of whether an egg is dead or unfertilized, the location of the air cell in the egg, and the developmental state during incubation are performed using other trained models. Furthermore, the size of the air cell, the tilt of the air cell, or the orientation of the egg is determined based on the egg image 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, based on an image of an egg, if it is determined that the egg is not dead or unfertilized, the shape of the air cell of the egg is determined, and the developmental stage of the egg is determined. If the shape of the air cell and the developmental stage of the egg are normal, the egg is determined to be a normal egg. The state of the egg is determined in an appropriate order, and whether or not the egg is a normal egg is determined with high accuracy. [Effects of the Invention]
[0016] The present invention offers excellent advantages, such as the ability to determine with high accuracy whether the shape of the air sac of an egg is normal or not. [Brief explanation of the drawing]
[0017] [Figure 1] This is a schematic cross-section of an egg. [Figure 2] This is a block diagram showing an example configuration of an egg determination system for assessing the condition of eggs. [Figure 3] It is a schematic plan view showing a configuration example of an egg imaging device. [Figure 4] It is a schematic diagram showing a configuration example of an egg imaging device. [Figure 5] It is a schematic diagram showing a configuration example of an egg imaging device. [Figure 6] It is a schematic plan view showing an example of a light emission pattern. [Figure 7] It is a block diagram showing an internal configuration example of an egg determination device. [Figure 8] It is a conceptual diagram showing the functions of the first learned model, the second learned model, the third learned model, and the fourth learned model. [Figure 9] It is a schematic diagram showing an example of a boundary line image. [Figure 10] It is a block diagram showing an internal functional configuration example of a learning device. [Figure 11] It is a flowchart showing an example of a procedure of processing executed by a learning device. [Figure 12] It is a flowchart showing a procedure of processing executed by an egg determination device.
Mode for Carrying Out the Invention
[0018] Hereinafter, the present invention will be specifically described based on the drawings showing its embodiments. In the present embodiment, the egg is an egg of a domestic fowl 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 downward. In the egg 1, an eggshell membrane 12 exists inside the eggshell 11, and inside the eggshell membrane 12, there is a content 13 containing a yolk, egg white, embryo, and the like. Further, inside the eggshell 11, there is an air chamber 14 which is an air layer. The eggshell membrane 12 consists of an inner membrane and an outer membrane, and the air chamber 14 exists between the inner membrane and the outer membrane. The air chamber 14 is located near the blunt end of the egg 1.
[0019] In this embodiment, it is determined whether egg 1 is a normal egg or an abnormal egg. A normal egg is a fertilized egg that is developing properly toward hatching. Abnormal eggs include unfertilized eggs and dead eggs that have not developed and have already died. Abnormal eggs also include eggs with an excessively large air cell 14, eggs with an abnormally shaped air cell 14, and eggs with an abnormally positioned air cell 14. An abnormally shaped air cell 14 includes a state where the boundary between the area containing the contents 13 and the air cell 14 is indented. An abnormally positioned air cell 14 includes a state where the air cell 14 is located on the side of the egg 1 rather than at the blunt end, and a state where the air cell 14 is positioned at an angle within the egg 1. Furthermore, an abnormal egg also includes an inverted egg 1.
[0020] Figure 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 imaging device 2 that captures an egg image and creates an egg image, and an egg determination device 3 that determines the state of the egg based on the egg image. The egg imaging device 2 shines light on the egg and uses the light that passes through the egg to take an image of the egg. Since light that has passed through the egg is used, the egg image will reflect the internal structure of the egg. The egg determination device 3 is connected to the egg imaging device 2. The egg determination device 3 performs an egg determination method.
[0021] Figure 3 is a schematic plan view showing an example configuration of the egg imaging device 2. The egg imaging device 2 is equipped with a transport path 21 for transporting multiple eggs 1. The transport direction is indicated by an arrow. For example, the transport path 21 is a roller conveyor. The transport path 21 carries egg trays 211 that hold multiple eggs 1 arranged in multiple rows, and transports multiple eggs 1 by transporting the egg trays 211. The transport path 21 transports multiple egg trays 211 sequentially. Each egg tray 211 holds multiple eggs 1, with each egg 1 being held. In the example shown in Figure 3, the egg tray 211 holds six rows of eggs 1, with each row holding six eggs 1.
[0022] In the egg imaging device 2 of this embodiment, as shown in Figure 3, multiple imaging areas A1 to A3 are set along the transport direction in the transport path 21. Figure 3 shows an example in which three imaging areas A1 to A3 are set: the first imaging area A1, the second imaging area A2, and the third imaging area A3. A light-shielding plate 22 is placed in each imaging area A1 to A3. The light-shielding plate 22 divides each of the imaging areas A1 to A3 into a front side where the eggs 1 in the first to third rows are located, and a back side where the eggs 1 in the fourth to sixth rows are located.
[0023] Here, in each shooting area A1 to A3, the eggs 1 on the egg tray 211 being transported are separated by the light-shielding plate 22 into the eggs 1 in the first to third rows at the front and the eggs 1 in the fourth to sixth rows at the back. In other words, the eggs 1 in the first to third rows on the egg tray 211 are transported on the front side of the light-shielding plate 22 in each shooting area A1 to A3, and the eggs 1 in the fourth to sixth rows on the egg tray 211 are transported on the back side of the light-shielding plate 22 in each shooting area A1 to A3.
[0024] The egg imaging device 2 comprises a plurality of imaging units 23 for imaging the egg 1, and a control unit 25 for controlling the operation of each part of the egg imaging device 2. The imaging unit 23 is a camera that has an image sensor such as a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal-Oxide Semiconductor) sensor and generates a color image of the egg 1 in color. The imaging units 23 are arranged on the front and back sides of each imaging area A1 to A3, respectively.
[0025] The control unit 25 is composed of a computer having a processor, internal memory, input / output interface, AD (Analog-to-Digital) converter, etc. Based on a computer program stored in the internal memory, the control unit 25 controls the operation of each part of the egg imaging device 2 through the cooperation of the processor and peripheral devices. The control unit 25 may be composed of a single physical computer or may be composed of multiple physically separate computers.
[0026] Figures 4 and 5 are schematic diagrams showing an example configuration of the egg imaging device 2. Figure 4 is a view of the egg imaging device 2 from the transport direction, and Figure 5 is a view of the egg imaging device 2 from a direction perpendicular to the transport direction. The egg imaging device 2 includes a lift unit 26 that lifts multiple eggs 1 arranged in predetermined rows in each imaging area A1 to A3, and multiple light sources 27 that illuminate the multiple eggs 1 lifted by the lift unit 26. The light sources 27 emit white light. For example, the light sources 27 are configured using LEDs (Light Emitting Diodes).
[0027] The lift units 26 are provided on the front and back sides of the light-shielding plate 22 in each shooting area A1 to A3. The lift units 26 are configured to lift multiple eggs 1 that are arranged in different rows in the multiple shooting areas A1 to A3. Specifically, the two lift units 26 in the first shooting area A1 are configured to lift multiple eggs 1 that are arranged in the 3rd and 6th rows on the egg tray 211. The two lift units 26 in the second shooting area A2 are configured to lift multiple eggs 1 that are arranged in the 2nd and 5th rows on the egg tray 211. The two lift units 26 in the third shooting area A3 are configured to lift multiple eggs 1 that are arranged in the 1st and 4th rows on the egg tray 211.
[0028] Furthermore, the lift unit 26 is located below the transport path 21 and is configured to move up and down relative to the egg tray 211 on the transport path 21. When the egg tray 211 is stopped in each shooting area A1 to A3 on the transport path 21, the lift unit 26 moves from below to above the egg tray 211, contacts the bottom of a plurality of eggs 1 arranged in a predetermined row on the egg tray 211, and lifts the plurality of eggs 1 that it has contacted. Specifically, the lift unit 26 comprises a support part 261 provided corresponding to each of the plurality of eggs 1, a connecting member 262 to which the support part 261 is provided, and an actuator 263 that moves the connecting member 262 up and down. The actuator 263 is, for example, an air cylinder. The actuator 263 is controlled by the control unit 25 and moves the plurality of support parts 261 up and down relative to the egg tray 211.
[0029] Multiple light sources 27 are provided corresponding to multiple eggs 1 arranged in a row, and they illuminate the inside of the multiple eggs 1 with light. In this embodiment, the light sources 27 are configured to illuminate each of the multiple eggs 1 arranged in a row from above and below. That is, two light sources 27 are provided for each egg 1, one above and one below.
[0030] The multiple light sources 27 include multiple upper light sources 271 that illuminate multiple eggs 1 lifted by the lift unit 26 from above, and multiple lower light sources 272 that illuminate multiple eggs 1 lifted by the lift unit 26 from below. The upper light sources 271 and lower light sources 272 are provided in each shooting area A1 to A3 corresponding to the lift unit 26. The multiple upper light sources 271 and multiple lower light sources 272 are controlled by the control unit 25, as described later, and their light emission patterns (on and off) are controlled in synchronization with each other.
[0031] Multiple upper light sources 271 are positioned above multiple eggs 1 that are lifted by a lift unit 26. Each upper light source 271 is provided with a cap portion 273 that contacts the upper end of the egg 1 lifted by the lift unit 26, surrounding it. 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 into the inside of the egg 1 from above via the cap portion 273. Furthermore, each upper light source 271 is provided with a lifting guide portion 24 so that it can move up and down according to the size of the egg 1.
[0032] Multiple lower light sources 272 are provided inside multiple support portions 261 in the lift portion 26. Each support portion 261 has an annular contact portion 264 that contacts the lower end of the egg 1. Each lower light source 272 irradiates light into the inside of the egg 1 from below via the contact portion 264 of the support portion 261. In Figures 4 and 5, the light irradiated onto the egg 1 from the upper light source 271 and the lower light sources 272 is indicated by arrows.
[0033] The lift unit 26 is configured to lift multiple eggs 1 and rotate them by predetermined angles while they are held between the support unit 261 and the cap unit 273. Specifically, the lift unit 26 is configured to rotate the eggs 1 by 90 degrees (0 degrees → 90 degrees → 180 degrees → 270 degrees).
[0034] Each support portion 261 is rotatably mounted on the connecting member 262, and each support portion 261 is connected by a rotation transmission portion 265 using a toothed belt or the like. By driving the rotation transmission portion 265 with an actuator 266 such as a motor, the multiple support portions 261 arranged in a line rotate synchronously by 90 degrees each. The actuator 266 is controlled by the control portion 25 to rotate the multiple support portions 261. The imaging unit 23 images the multiple eggs 1 that have been lifted by the lift portion 26.
[0035] As shown in Figures 3 and 4, the imaging unit 23 is provided in each imaging area A1 to A3, on both the front and back sides of the light-shielding plate 22, and is positioned to photograph multiple eggs 1 with the light-shielding plate 22 as the background. For example, in the front side of the first imaging area A1, the imaging unit 23 photographs the eggs 1 in the third row with the light-shielding plate 22 as the background, and in the back side of the first imaging area A1, the imaging unit 23 photographs the eggs 1 in the sixth row with the light-shielding plate 22 as the background. In the front side of the second imaging area A2, the imaging unit 23 photographs the eggs 1 in the second row, and in the back side of the second imaging area A2, the imaging unit 23 photographs the eggs 1 in the fifth row. In the front side of the third imaging area A3, the imaging unit 23 photographs the eggs 1 in the first row, and in the back side of the third imaging area A3, the imaging unit 23 photographs the eggs 1 in the fourth row. The imaging unit 23 is controlled by the control unit 25 to photograph multiple eggs 1. The images captured by the imaging unit 23 are input to the egg detection device 3.
[0036] The control unit 25 controls the operation and stopping of the transport path 21, the raising and lowering and rotational movement of the lift unit 26, the turning on and off of the multiple light sources 27, and the imaging unit 23 for imaging. The control unit 25 controls the multiple light sources 27 to illuminate each light source 27 while switching between multiple illumination patterns in which two adjacent light sources 27 do not illuminate simultaneously.
[0037] Figure 6 is a schematic plan view showing an example of a light emission pattern. In Figure 6, the row 212 of eggs 1 lifted by the lift unit 26 is enclosed by a dashed line. Among the multiple eggs 1 included in row 212, the egg 1 that is illuminated by light from the light source 27 is shown by a thick line. The 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 Figure 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 from upstream along the transport direction are illuminated, and among the multiple light sources 27 arranged in a row on the back side, the odd-numbered light sources 27 from upstream along the transport direction are illuminated. 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 from upstream along the transport direction are illuminated, and among the multiple light sources 27 arranged in a row on the back side, the even-numbered light sources 27 from upstream along the transport direction are illuminated.
[0039] The control unit 25 controls the imaging unit 23 to photograph multiple eggs 1 for each of the multiple light emission patterns. By acquiring the images taken in the first light emission pattern and the images taken in the second light emission pattern, an image is obtained that captures all of the multiple eggs 1 included in row 212.
[0040] The operation of the egg imaging device 2 will now be explained. The control unit 25 controls the transport path 21 to transport multiple egg trays 211 to each imaging area A1 to A3 and stop them. The egg imaging device 2 uses two lift units 26 provided in each imaging area A1 to A3 to lift multiple eggs 1 arranged in predetermined rows 212. In the first imaging area A1, multiple eggs 1 in the 6th row and multiple eggs 1 in the 3rd row are lifted; in the second imaging area A2, multiple eggs 1 in the 5th row and multiple eggs 1 in the 2nd row are lifted; and in the third imaging area A3, multiple eggs 1 in the 4th row and multiple eggs 1 in the 1st row are lifted.
[0041] The control unit 25 causes the light source 27 to emit light in the first emission pattern. On the near side, the light is shone on the even-numbered eggs 1 from upstream, and on the far side, the light is shone on the odd-numbered eggs 1 from upstream. With each egg 1 illuminated, the imaging unit 23 takes pictures of multiple eggs 1. Next, the control unit 25 causes the light source 27 to emit light in the second emission pattern. On the near side, the light is shone on the odd-numbered eggs 1 from upstream, and on the far side, the light is shone on the even-numbered eggs 1 from upstream. With each egg 1 illuminated, the imaging unit 23 takes pictures of multiple eggs 1. In this way, images of each emission pattern (0-degree images) are taken when the rotation angle is 0 degrees (while the eggs are still being transported).
[0042] The control unit 25 causes multiple light sources 27 to emit light in a first and second emission pattern each time the support portion 261 of the lift unit 26 is rotated by 90 degrees, and the imaging unit 23 photographs multiple eggs 1 for each emission pattern. As a result, images of each emission pattern when rotated by 90 degrees (90-degree images), images of each emission pattern when rotated by 180 degrees (180-degree images), and images of each emission pattern when rotated by 270 degrees (270-degree images) are captured.
[0043] After the imaging unit 23 captures images of each light emission pattern at four different angles (four directions), the control unit 25 lowers the lift unit 26 to return the lifted eggs 1 to the egg tray 211. The control unit 25 also transmits the images of each light emission pattern at the four different angles (four directions) to the egg detection device 3. The images transmitted by the control unit 25 to the egg detection device 3 are color images.
[0044] After the above operations in each shooting area A1 to A3 are completed, the control unit 25 controls the transport path 21 to transport the egg tray 211 to the next shooting area A1 to A3 and stop it. After the inspection in the third shooting area A3 is completed, the egg tray 211 is transported downstream of the third shooting area A3. After the egg tray 211 has stopped in each shooting area A1 to A3, as described above, the lift unit 26 lifts the multiple eggs 1 arranged in a predetermined row 212, and the shooting unit 23 takes images of each light emission pattern at four different angles.
[0045] As the egg imaging device 2 performs the above series of operations, multiple eggs 1 arranged in different rows on the egg tray 211 are sequentially photographed, and all eggs 1 contained in the egg tray 211 are photographed. In addition, the egg imaging device 2 can sequentially photograph multiple eggs 1 arranged in each row of multiple egg trays 211 by sequentially sending multiple egg trays 211 along the transport path 21.
[0046] In this embodiment, multiple eggs 1 are photographed in a light emission pattern in which neither of the two adjacent light sources 27 emits light simultaneously. Therefore, light from adjacent eggs 1 is less likely to enter the image of the captured eggs 1. As a result, the image of the captured eggs 1 is less affected by light from adjacent eggs 1. Thus, the egg determination device 3 can accurately determine the state of the eggs 1 based on the image of the captured eggs 1.
[0047] The light source 27 may consist of either an upper light source 271 or a lower light source 272, illuminating the egg 1 from either above or below. The egg imaging device 2 may also be configured with multiple lift units 26 in each area A1 to A3, allowing the eggs 1 arranged in different rows on the egg tray 211 to be sequentially lifted by the lift units 26. Each area A1 to A3 may not be divided into two regions, a front side and a back side, but rather constitutes a single region.
[0048] In this embodiment, an example is shown where the light emission patterns and the order of the light emission patterns are the same in each shooting area A1 to A3. However, the light emission patterns may differ from one another in each shooting area, and the order of the light emission patterns may also differ from one another. In this embodiment, an example is shown where the egg 1 is lifted by the lift unit 26 moving up and down relative to the egg tray 211. However, the egg shooting device 2 may also be configured such that the egg 1 is lifted by the egg tray 211 moving up and down relative to the lift unit 26.
[0049] In this embodiment, an example is shown in which two light emission patterns are switched in which multiple light sources 27 emit light with one light skipped between them. However, the egg imaging device 2 can be configured to switch between multiple light emission patterns in which two adjacent light sources 27 do not emit light simultaneously. For example, the egg imaging device 2 may be configured to switch between three light emission patterns in which multiple light sources 27 emit light with two light skipped between them.
[0050] In this embodiment, an example is shown in which multiple eggs 1 arranged in a predetermined row are lifted from the egg tray 211 and the lifted multiple eggs 1 are photographed. However, the egg imaging device 2 may be configured to inspect multiple eggs 1 arranged in a row without lifting them. For example, the egg imaging device 2 may be configured to photograph multiple eggs 1 arranged in a row beforehand, with the eggs 1 being transported along the transport path 21 in a predetermined row, and then photographing the eggs 1 while stopping them in a predetermined imaging area.
[0051] Figure 7 is a block diagram showing an example of the internal configuration of the egg detection device 3. The egg detection device 3 is configured using a computer such as a personal computer or a server device. The egg detection device 3 comprises 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 also be configured using a quantum computer. The memory 32 stores temporary data generated in connection with calculations. The memory 32 is, for example, RAM (Random Access Memory). The storage unit 33 is non-volatile and is, 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 disc or portable memory.
[0052] The operation unit 35 accepts 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 accepts input of data from an external source. 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 receives images of the egg 1 taken from the egg imaging device 2.
[0053] The arithmetic 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 arithmetic unit 31 executes processing to realize the functions of the egg detection device 3 according to the computer program 331. The computer program 331 may be stored in the storage unit 33 in advance, or it may be downloaded from outside the egg detection device 3. In this case, the egg detection device 3 does not need to have a reading unit 34.
[0054] The computer program 331 can be deployed on a single computer, at a single site, or distributed across multiple sites and run on multiple computers interconnected by a communication network. That is, the egg detection device 3 may consist of multiple computers, and the computer program 331 may run on multiple computers connected via a communication network. The egg detection device 3 may also 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, which are 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 arithmetic unit 31 executing processing according to the computer program 331. The memory unit 33 stores the 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 neural networks. 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). For example, the AlexNet model is used as the CNN. Other neural networks besides the AlexNet model, such as ResNet (Residual Network), may be used. Each pre-trained model may also be implemented using models other than neural networks, such as support vector machines.
[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 with hardware including a processor and memory for storing the 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 implemented 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 located outside the egg detection device 3, and the egg detection device 3 may execute processing using each of the external trained models. For example, each trained model may be implemented using the cloud.
[0057] Figure 8 is a conceptual diagram showing the functions of the first pre-trained model 332, the second pre-trained model 333, the third pre-trained model 334, and the fourth pre-trained model 335. The first pre-trained model 332 has three input channels and receives an R image consisting of the R (red) component, a G image consisting of the G (green) component, and a B image consisting of the B (blue) component from a color image of egg 1. The first pre-trained model 332 is pre-trained to output dead egg information indicating the confidence that egg 1 is a dead egg, and unfertilized egg information indicating the confidence that egg 1 is an unfertilized egg, when the R image, G image, and B image are input. A larger value for the dead egg information indicates a higher confidence that egg 1 is a dead egg, and a larger value for the unfertilized egg information indicates a higher confidence that egg 1 is an unfertilized egg.
[0058] Since dead eggs and unfertilized eggs have different internal structures than eggs in the process of hatching, the image of egg 1 changes depending on whether egg 1 is dead or unfertilized. 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 egg 1.
[0059] The second pre-trained model 333 has three input channels. The second pre-trained model 333 is pre-trained to output positional information indicating the degree of confidence that the position of the air sac of egg 1 is abnormal and that the air sac is located on the side of egg 1, when the R, G, and B images of an image of egg 1 are input. The larger the positional information value, the higher the degree of confidence that the air sac is located on the side of egg 1. Since eggs with air sacs located on the side have a different internal structure compared to eggs with air sacs in a normal position, the image of egg 1 changes depending on whether or not the air sac is located on the side of egg 1. For this reason, it is possible to generate a second pre-trained model 333 that outputs positional information according to the image of egg 1.
[0060] The third pre-trained model 334 is pre-trained to output shape information indicating the confidence that the shape of the air cell in egg 1 is abnormal, when it receives a monochrome boundary image showing the boundary between the air cell and other regions within egg 1, with only one input channel. The shape of the air cell is considered abnormal if the boundary between the air cell and other regions within egg 1 is not roughly straight but has a large indentation. The shape information consists of a value indicating the confidence that the shape of the air cell is abnormal, with a higher value indicating a higher confidence that the shape of the air cell is abnormal. In eggs with abnormal air cell shapes, the shape of the boundary changes compared to normal eggs, so the boundary image changes depending on whether or not the shape of the air cell is abnormal. For this reason, it is possible to generate a third pre-trained model 334 that outputs shape information according to the boundary image.
[0061] If the developmental stage during incubation is abnormal, the contents 13 of egg 1, as shown in Figure 1, may be deformed compared to a normal egg, and the shape of the air cell 14 may also be deformed in accordance with the deformation of the contents 13. In this case, the boundary between the air cell 14 and the contents 13 is also deformed. Since the air cell is hollow, the region of the air cell in the egg image has a distinctly different color from other regions. For example, the region of the air cell will be white. Therefore, it is possible to extract the boundary between the air cell and other regions from the egg image.
[0062] Figure 9 is a schematic diagram showing an example of a boundary line image. Figure 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 Figure 9, in a normal egg 1, the boundary line is approximately straight, whereas in an abnormal egg 1, the boundary line may be significantly indented. If the shape of the boundary line is abnormal, the shape of the air sac is abnormal, and there is a possibility that the developmental state of egg 1 is abnormal. Therefore, by determining the shape of the air sac based on the boundary line image and determining that egg 1 is an abnormal egg if the shape of the air sac is abnormal, it is possible to eliminate egg 1 that may be in an abnormal developmental state.
[0063] The fourth pre-trained model 335 has three input channels and is pre-trained to output developmental information indicating the developmental state of an egg in the process of hatching when a G image of egg 1 is input to each input channel. The developmental information consists of a value that indicates the degree of confidence that the developmental state of the egg in the process of hatching is abnormal, with a higher value indicating a higher degree of confidence that the developmental state of the egg in the process of hatching is abnormal.
[0064] In eggs with abnormal development, the internal structure of the egg differs from that of a normal egg, so the image of egg 1 will vary depending on its developmental stage. For example, the degree to which blood vessels developing inside egg 1 are developed will vary depending on the developmental stage, and the state of the blood vessels included in the image of egg 1 will vary depending on the developmental stage. In particular, the blood vessel portion included in the image contains a large amount of the G component among the R component, G component, and B component, and the G image changes significantly in accordance with the state of the blood vessels inside egg 1, i.e., the developmental stage of egg 1. For this reason, it is possible to generate a fourth trained model 335 that outputs developmental information according to the G image of the image of egg 1.
[0065] The training 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 training device 4. Figure 10 is a block diagram showing an example of the internal functional configuration of the training device 4. The training device 4 is a computer such as a server or a personal computer. The training device 4 includes an arithmetic unit 41, a memory 42, a storage unit 43, a reading unit 44, an operation unit 45, and a display unit 46. The arithmetic unit 41 is configured using, for example, a CPU, a GPU, or a multi-core CPU. The arithmetic unit 41 may also be configured using a quantum computer. The memory 42 stores temporary data generated in connection with calculations. The memory 42 is, for example, RAM. The reading unit 44 reads information from a recording medium 40 such as an optical disc or portable memory. The storage unit 43 is non-volatile and is, for example, a hard disk or a non-volatile semiconductor memory.
[0066] The operation unit 45 accepts information input by receiving operations from the 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 on a single computer, at a single site, or distributed across multiple sites and run on multiple computers interconnected by a communication network. That is, the learning device 4 may consist of multiple computers, and the computer program 431 may run on multiple computers connected via a communication network. The learning device 4 may also be configured using a cloud server.
[0068] The learning device 4 executes a method for generating trained models. Specifically, the learning device 4 generates the first trained model 332, the second trained model 333, the third trained model 334, and the fourth trained model 335 by performing machine learning. The process by which the learning device 4 generates the third trained model 334 is described below.
[0069] The learning device 4 includes a learning model 432 that serves as the basis for 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 arithmetic unit 31 executing processing according to the computer program 331. The learning model 432 is realized using a neural network, more specifically a CNN, for example, the AlexNet model is used as the CNN. The number of input channels for the learning model 432 is one. The learning model 432 may also be configured using hardware.
[0070] The memory unit 43 stores training data 433 for training the learning model 432 to generate a third trained model 334. The training data 433 contains a dataset that associates monochrome boundary images showing the boundary between the air sac and other regions within the egg 1 with information indicating whether the shape of the air sac of egg 1 is normal or abnormal. The boundary images are monochrome images extracted from images of the egg taken using light transmitted through the egg, showing the boundary between the air sac and other regions. For example, a B image is generated from an image of the egg, a monochrome image is generated by binarizing the B image, the boundary is detected by edge detection within the monochrome image, and a monochrome boundary image showing the detected boundary is generated. For example, boundary images generated from images generated by the egg imaging device 2 are recorded in the training data 433. Whether the shape of the air sac is normal or abnormal is predetermined. For example, a person who examines the boundary image determines whether the shape of the air sac is normal or abnormal, and information indicating whether the shape of the air sac is normal or abnormal is generated. Multiple datasets are recorded in the training data 433.
[0071] Figure 11 is a flowchart showing an example of the processing steps performed by the learning device 4. Hereinafter, steps will be abbreviated as S. The learning device 4 performs the following processing by having the arithmetic unit 41 perform information processing according to the computer program 431. The learning device 4 acquires the training data 433 by having the arithmetic unit 41 read the training data 433 stored in the storage unit 43 (S11). In S11, the learning device 4 may also acquire the training data 433 by receiving the training data 433 from an external source.
[0072] The learning device 4 then generates a third trained model 334 by training the learning model 432 using the training data 433 (S12). In S12, the calculation unit 41 inputs boundary line images recorded in the training data 433 to the learning model 432, which will be the basis for the third trained model 334. The learning model 432 performs calculations in response to the input boundary line images and outputs shape information. The larger the value of the shape information, the higher the confidence that the shape of the air chamber is abnormal.
[0073] The calculation unit 41 adjusts the calculation parameters of the learning model 432 so that the error between the shape information output by the learning model 432 and the information associated with the input boundary line image indicating whether the shape of the air chamber is normal or abnormal is reduced. That is, the calculation unit 41 adjusts the parameters so that the value of the shape information decreases when the information associated with the input boundary line image indicates that the shape of the air chamber is normal, and increases when the information associated with the input boundary line image indicates that the shape of the air chamber is abnormal. For example, the calculation unit 41 adjusts the parameters using backpropagation.
[0074] The calculation unit 41 performs machine learning on the learning model 432 by repeatedly processing multiple datasets recorded in the training data 433 and adjusting the parameters of the learning model 432. By adjusting the computational parameters of the learning model 432 in this way, a third trained model 334 is generated. The calculation unit 41 stores the final adjusted parameters in the storage unit 43. After S12 is completed, the learning device 4 terminates processing.
[0075] The third trained model 334 generated by S11-S12 is provided in the egg detection device 3. For example, the final parameters adjusted in S12 are input to the egg detection device 3 through the input unit 37 and stored in the storage unit 33. The calculation unit 31 performs information processing using the stored parameters to realize the third trained model 334. The egg detection device 3 may also perform the functions 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 a similar manner. The first trained model 332 is generated by training using training data that records a dataset associating R images, G images, and B images with information indicating whether the egg is dead or unfertilized. The second trained model 333 is generated by training using training data that records a dataset associating R images, G images, and B images with information indicating whether the air sac of the egg is located on the side rather than the blunt end. The fourth trained model 335 is generated by training using training data that records a dataset associating G images with information indicating whether the developmental state of the egg in the hatching stage is normal or abnormal.
[0077] The following describes the process by which the egg determination device 3 determines the state of egg 1. Figure 12 is a flowchart showing the steps of the process performed by the egg determination device 3. The calculation unit 31 performs information processing according to the computer program 331, thereby enabling the egg determination device 3 to perform the following processes. The egg determination device 3 acquires an egg image of egg 1 (S201).
[0078] The image captured by the imaging unit 23 of the egg imaging device 2 is input to the egg determination device 3. The egg determination device 3 stores the input image in the storage unit 33. The image captured by the imaging unit 23 includes images of multiple eggs 1. In the example described in this embodiment, the image captured by the imaging unit 23 includes images of three eggs 1 illuminated with light and images of three eggs 1 not illuminated with light. For the same egg 1, there are images including the illuminated egg 1 and images including the unilluminated egg 1. Also, for the same egg 1, there are four images with different rotation angles (0-degree image, 90-degree image, 180-degree image, and 270-degree image).
[0079] In S201, the calculation unit 31 extracts an image of the illuminated egg 1 from the images captured by the imaging unit 23 for each egg 1. At this time, the calculation unit 31 extracts four images with different rotation angles (0-degree image, 90-degree image, 180-degree image, and 270-degree image). In this way, the calculation unit 31 obtains four egg images of each egg 1. The egg image is a color image consisting of multiple pixels, and each pixel contains the pixel values of each RGB component.
[0080] The egg determination device 3 then determines whether 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, a G image consisting of the G component, and a B image consisting of the B component of the egg image, and inputs the R image, G image, and B image to the three input channels of the first trained model 332. The first trained model 332 performs calculations according to the input egg image and outputs dead egg information indicating the degree of confidence that egg 1 is a dead egg, and unfertilized egg information indicating the degree of confidence that 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 four egg images (0-degree image, 90-degree image, 180-degree image, and 270-degree image) to the first trained model 332, and obtains information on dead eggs and unfertilized eggs for each egg image.
[0081] The calculation unit 31 determines whether egg 1 is dead or unfertilized based on the acquired dead egg information and unfertilized egg information. The calculation unit 31 comprehensively evaluates the dead egg information and unfertilized egg information obtained for the four egg images to make a determination. Specifically, the calculation unit 31 calculates the average value of the four acquired dead egg information, and determines that egg 1 is dead if the average value of the dead egg information exceeds a predetermined threshold, and determines that egg 1 is not dead if the average value of the dead egg information does not exceed the threshold. In addition, the calculation unit 31 calculates the average value of the four acquired unfertilized egg information, and determines that egg 1 is unfertilized if the average value of the unfertilized egg information exceeds a predetermined threshold, and determines that egg 1 is not unfertilized if the average value of the unfertilized egg information does not exceed the predetermined threshold.
[0082] The threshold for determining a dead egg and the threshold for determining an unfertilized egg may be the same or different. The calculation unit 31 may determine that egg 1 is a dead egg if the average value of the dead egg information is greater than or equal to the threshold, and may determine that egg 1 is an unfertilized egg if the average value of the unfertilized egg information is greater than or equal to the threshold.
[0083] If egg 1 is dead or unfertilized (S202:YES), the egg determination device 3 determines that egg 1 is an abnormal egg (S212). The calculation unit 31 may display an image on the display unit 36 to indicate that egg 1 is an abnormal egg. If egg 1 is neither dead nor unfertilized (S202:NO), the egg determination device 3 determines whether the size of the air cell of egg 1 is normal (S203). In S203, the calculation unit 31 determines whether the size of the air cell is normal based on the egg image, according to predetermined rules. For example, the calculation unit 31 converts the egg image to a monochrome image by binarization and calculates the area of the white region in the monochrome image. The white region corresponds to the air cell. The calculation unit 31 calculates the area of the white region for four egg images, calculates the sum of the four calculated areas excluding the minimum value, and determines that the size of the air cell is excessive if the calculated sum exceeds a predetermined threshold.
[0084] If the size of the air cell is excessive, the calculation unit 31 determines that the size of the air cell in egg 1 is abnormal. If the calculated sum does not exceed a predetermined threshold, the calculation unit 31 determines that the size of the air cell in egg 1 is normal. The calculation unit 31 may also determine that the size of the air cell is excessive if the calculated sum is greater than or equal to a predetermined threshold.
[0085] If the size of the air sac of egg 1 is abnormal (S203: NO), the egg determination device 3 proceeds to S212. If the size of the air sac of egg 1 is normal (S203: YES), the egg determination device 3 determines whether the position of the air sac of egg 1 is normal or not (S204). In S204, the calculation unit 31 inputs the egg image to the second trained model 333. At this time, the calculation unit 31 generates R, G, and B images of the egg image and inputs the R, G, and B images to the three input channels of the second trained model 333. The second trained model 333 performs calculations according to the input egg image and outputs position information indicating the degree of confidence that the air sac is located on the side of egg 1. The calculation unit 31 acquires the position information output by the second trained model 333. The calculation unit 31 inputs the four egg images (0-degree image, 90-degree image, 180-degree image, and 270-degree image) into the second trained model 333 and obtains positional information for each egg image.
[0086] The calculation unit 31 determines whether the position of the air sac of egg 1 is normal based on the acquired position information. The calculation unit 31 determines that the air sac is located on the side of egg 1 if the maximum value of the four position information obtained according to the four egg images exceeds a predetermined threshold. If the position of the air sac is abnormal at any angle, an abnormal position is determined. If the maximum value of the four position information does not exceed the predetermined threshold, the calculation unit 31 determines that the air sac is not located on the side of egg 1.
[0087] If the air cell is located on the side of egg 1, the calculation unit 31 determines that the position of the air cell in egg 1 is abnormal. If the air cell is not located on the side of egg 1, the calculation unit 31 determines that the position of the air cell in egg 1 is normal. The calculation unit 31 may also determine that the air cell is located on the side of egg 1 if the maximum value of the four positional information is greater than or equal to a threshold.
[0088] If the position of the air sac in egg 1 is abnormal (S204: NO), the egg detection device 3 proceeds to S212. If the position of the air sac in egg 1 is normal (S204: YES), the egg detection device 3 generates a monochrome boundary image showing the boundary between the air sac and other regions within egg 1 (S205).
[0089] In S205, the calculation unit 31 generates a B image from the egg image and generates a monochrome image by binarizing the screen of the generated B image. The calculation unit 31 may also 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 the boundary line by performing edge detection within the generated monochrome image. The calculation unit 31 generates a monochrome boundary line image showing the detected boundary line. As shown in Figure 1, the boundary line image shows the boundary line between the contents 13 located inside the eggshell 11 and eggshell membrane 12 and the air cell 14, which is the layer of air inside the egg 1. The calculation unit 31 generates boundary line images from each of the four egg images (0-degree image, 90-degree image, 180-degree image, and 270-degree image).
[0090] The egg detection 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 according to the input boundary line image and outputs shape information indicating the degree of confidence that the shape of the air sac of 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] Next, the egg detection device 3 acquires shape information (S207). In S207, the calculation unit 31 acquires 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 line images. Based on the shape information, the egg detection device 3 determines whether the shape of the air cell of egg 1 is normal or not (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 line 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] When the shape information exceeds a threshold, the boundary between the air cell and other regions within egg 1 is not approximately straight but has a large indentation. The shape of the air cell may differ depending on the direction (angle) from which 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 overall shape of the air cell is considered abnormal. The single shape information with the maximum value among the four 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, then the shape of the air cell is normal in all directions and can be considered normal. If the shape of the air cell is abnormal based on the maximum value of the shape information, then the shape of the air cell can be considered abnormal. By making a determination using the maximum value among the four shape information, the shape of the air cell of egg 1 can be accurately determined. The calculation unit 31 may also determine that the developmental state of egg 1 is abnormal if the maximum value among the four shape information is greater than or equal to the threshold. The calculation unit 31 may determine whether the shape of the air cell of egg 1 is normal or not based on the shape information using a method other than the determination based on the maximum value of the four shape information. For example, the calculation unit 31 may determine whether the shape of the air cell of egg 1 is normal or not based on the average of the values of the four shape information.
[0093] If the shape of the air cell of egg 1 is abnormal (S208: NO), the egg determination device 3 proceeds to S212. If the shape of the air cell of egg 1 is normal (S208: YES), the egg determination device 3 determines whether the air cell of egg 1 is tilted or whether egg 1 is inverted (S209). In S209, the calculation unit 31 determines whether the air cell is tilted or not based on the egg image, according to predetermined rules. For example, the calculation unit 31 converts the egg image to a monochrome image by binarization, approximates the shape of egg 1 as an ellipse, and obtains the angle of the major axis relative to the horizontal or vertical line from the monochrome image. The calculation unit 31 extracts the boundary line between the air cell contained in egg 1 and other regions from the monochrome image, approximates the boundary line with a straight line, and obtains the angle of the boundary line relative to the horizontal or vertical line. Eggs 1 whose boundary line cannot be approximated with a straight line have been excluded in S208, so obtaining the angle is easy.
[0094] The calculation unit 31 calculates the angle of the boundary line with respect to the major axis of egg 1. The calculation unit 31 calculates the angle of the boundary line with respect to the major axis for four egg images, and determines that the air cell of egg 1 is tilted if the maximum value of the four calculated angles exceeds a predetermined threshold. If the maximum value of the four calculated angles does not exceed the threshold, the calculation unit 31 determines that the air cell of egg 1 is not tilted. The calculation unit 31 may also determine that the air cell of egg 1 is tilted if the maximum value of the four calculated angles is equal to or greater than the threshold. In this way, the egg determination device 3 determines the tilt of the air cell.
[0095] In S209, the calculation unit 31 also determines whether egg 1 is upside down or not according to predetermined rules. For example, the 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. The 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. For the four egg images, the calculation unit 31 calculates the area of the white region in the upper half and the area of the white-white region in the lower half, calculates the sum of the areas of the four upper half white regions excluding the minimum value, and calculates the sum of the areas of the four lower half white regions excluding the minimum value.
[0096] The calculation unit 31 determines that egg 1 is upside down if the sum of the areas of the four upper white regions excluding the minimum value is less than a predetermined threshold, and the sum of the areas of the four lower white regions excluding the minimum value exceeds a predetermined threshold. If the sum of the areas of the four upper white regions excluding the minimum value is not less than a threshold, or if the sum of the areas of the four lower white regions excluding the minimum value does not exceed a threshold, the calculation unit 31 determines that egg 1 is not upside down. The two thresholds may be the same or different. The calculation unit 31 may also determine that egg 1 is upside down if the sum of the areas of the four upper white regions excluding the minimum value is less than or equal to a predetermined threshold, and the sum of the areas of the four lower white regions excluding the minimum value is greater than or equal to a predetermined threshold. In this way, the egg determination device 3 determines the orientation of egg 1.
[0097] If the air sac of egg 1 is tilted, or if egg 1 is upside down (S209: YES), the egg determination device 3 proceeds to S212. If the air sac of egg 1 is not tilted and egg 1 is not upside down (S209: NO), the egg determination device 3 determines whether the developmental state of egg 1 is normal or not (S210). In S210, the calculation unit 31 generates R, G, and B images of the egg image and inputs the three identical G images to the three input channels of the fourth trained model 335. The fourth trained model 335 performs calculations according to the input of the three G images and outputs developmental information indicating the developmental state of the egg in the process of 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 developmental information.
[0098] The calculation unit 31 acquires the developmental information output by the fourth trained model 335. At this time, the calculation unit 31 acquires four pieces of developmental information according to the four egg images. The calculation unit 31 normalizes the four pieces of developmental information, calculates the sum of the two pieces of developmental information with the smallest values, and determines that the developmental state of egg 1 is abnormal if the calculated sum exceeds a predetermined threshold. If the calculated sum is less than or equal to the threshold, the calculation unit 31 determines that the developmental state of egg 1 is normal.
[0099] The developmental stage of an egg in the process of hatching may differ depending on the direction (angle) from which egg 1 is photographed. Even if the developmental stage is abnormal in one direction, if the developmental stage is normal in another direction, the overall developmental stage is considered normal. If the developmental stage is normal based on the two developmental information pieces with the smallest values among the four developmental information pieces, the developmental stage can be considered normal. If the developmental stage is abnormal based on these two developmental information pieces, the developmental stage will be abnormal at all angles, and the developmental stage can be considered abnormal. The developmental stage of 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 also determine that the developmental stage of egg 1 is abnormal if the sum of the two developmental information pieces with the smallest values is greater than or equal to a threshold.
[0100] If the developmental state of egg 1 is abnormal (S210: NO), the egg determination device 3 proceeds to S212. If the developmental state of egg 1 is normal (S210: YES), the egg determination device 3 determines that egg 1 is a normal egg (S211). The calculation unit 31 may display an image on the display unit 36 to indicate that egg 1 is a normal egg. After S211 or S212 is completed, the egg determination device 3 terminates the process.
[0101] The threshold values used in the various determinations made in the S201-S212 processes are either pre-stored in the memory unit 33 or included in the computer program 331. Each threshold value may also be input by the user by operating the operation unit 35. The egg determination device 3 performs the S201-S212 processes for each egg 1 photographed by the egg imaging device 2. In this way, it is determined whether each egg 1 is normal or not. After this, eggs 1 determined to be normal and eggs 1 determined to be abnormal are separated and handled separately. For example, eggs 1 determined to be abnormal are discarded, while eggs 1 determined to be normal are used for breeding or vaccine production, etc.
[0102] As detailed above, in this embodiment, the egg detection device 3 inputs a monochrome boundary line 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. Another method for determining the shape of the air cell is to use a trained model that outputs shape information when a color egg image is input. Compared to a color egg image, the boundary line image contains less information other than the shape of the boundary line. In detection using the third trained model 334 that receives a boundary line image as input, the influence of information other than the shape of the boundary line is less than in detection using a color egg image, and accurate detection according to the shape of the boundary line becomes possible.
[0103] Furthermore, the shape of the boundary line is clearer in monochrome boundary line images compared to color egg images. Therefore, in the judgment using the third trained model 334 that receives the boundary line image as input, it is possible to make a judgment according to the clear shape of the boundary line. Accordingly, in this embodiment, it is possible to determine 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 air cell shape and are likely to be in an abnormal developmental state.
[0104] In this embodiment, the egg determination device 3 determines whether egg 1 is dead or unfertilized using a first trained model 332, determines the position of the air sac of egg 1 using a second trained model 333, and determines the developmental state of egg 1 using a fourth trained model 335. The egg determination device 3 also determines the size of the air sac, the inclination of the air sac, or the orientation of egg 1 according to rules based on the egg image. The state of egg 1 is determined using 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: determination of whether egg 1 is a dead or unfertilized egg, determination of the size of the air cell, determination of the position of the air cell, determination of the shape of the air cell, determination of the tilt of the air cell or the orientation of egg 1, and determination of the developmental state of egg 1. The state of egg 1 is determined in an appropriate order, such as when other determinations are made if egg 1 is not a dead or unfertilized egg, and whether egg 1 is a normal egg or not is determined with high accuracy.
[0106] In this embodiment, a configuration is shown in which images are acquired at four different angles while rotating the egg 1. However, the egg imaging device 2 may acquire images of the egg 1 at fewer than four different angles or more than four different angles. In this embodiment, a configuration is shown in which the G image is input to the fourth trained model 335 as a single-component image of the egg. However, the egg determination device 3 may use the R image or B image as a single-component image. That is, the fourth trained model 335 may be pre-trained to output developmental information when three identical R images or B images are input. Even when using the R image or B image as a single-component image, it is possible to determine the state of the egg 1.
[0107] The present invention is not limited to the embodiments described above, and various modifications are possible within the scope of the claims. That is, embodiments obtained by combining technical means that have been 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. Furthermore, the independent and dependent claims described in the claims can be combined with each other in any combination, regardless of the form of reference. In addition, the claims use a form in which claims referencing two or more other claims (multi-claim form), but are not limited to this. A form in which multi-claims referencing at least one multi-claim (multi-multi-claim) may also be used. [Explanation of symbols]
[0109] 1 egg 2. Egg imaging device 3 Egg determination device 31 Arithmetic section 33 Storage section 331 Computer Programs 332 First Trained Model 333 Second pre-trained model 334 Third Trained Model 335 Fourth Trained Model 4. Learning device
Claims
1. We obtained an image of the egg, From the acquired images, a boundary image is generated that shows the boundary between the air sac and other regions within 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 characterized by causing a computer to perform a process.
2. By obtaining multiple images of the same egg taken from multiple angles, By inputting boundary line images generated from each of the aforementioned multiple images into the trained model and obtaining shape information output by the trained model, multiple pieces of shape information corresponding to the aforementioned multiple images are obtained. Based on the single piece of shape information that most strongly indicates an abnormal shape among the multiple pieces of shape information mentioned above, it is determined whether or not the shape of the air chamber is normal. The computer program according to claim 1, characterized in that it causes a computer to perform a process.
3. Based on the acquired images, the system uses other trained models to determine whether the egg is dead or unfertilized, the location of the egg's air sac, or the egg's developmental stage. Based on the acquired image, the size of the air cell, the tilt of the air cell, or the orientation of the egg is determined according to predetermined rules. The computer program according to claim 1, characterized in that it causes a computer to perform a process.
4. Based on the acquired image, it is determined whether the egg is dead or unfertilized. If the egg is not dead or unfertilized, the trained model is used to determine whether the shape of the air sac is normal. Based on the acquired images, the developmental stage of the egg is determined. If the shape of the air sac and the developmental stage of the egg are determined to be normal, the egg is determined to be a normal egg. The computer program according to claim 1, characterized in that it causes a computer to perform a process.
5. We obtained an image of the egg, From the acquired images, a boundary image is generated that shows the boundary between the air sac and other regions within 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 determination method characterized by performing the processing by computer.
6. We obtained training data that included boundary images showing the boundary between the air cell and other regions of the egg, generated from images of eggs, and shape information indicating whether the shape of the air cell is normal or not. By training with the aforementioned training data, a trained model is generated that outputs shape information when a boundary line image is input. A method for generating a trained model, characterized by performing the processing using a computer.
7. Equipped with a calculation unit, The aforementioned arithmetic unit, We obtained an image of the egg, From the acquired images, a boundary image is generated that shows the boundary between the air sac and other regions within 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 detection device characterized by the following features.