The present disclosure relates to a method and a program for generating a learning model for use in machine learning to automatically examine the number of target objects.
An examination of checking the number of components or target objects accommodated in a tray or container, or an examination of confirming whether a required number of components are accommodated in the container is conducted to allow a robot or the like to pick up each component in the tray on some occasions. On such an occasion, an adoptable way is to photograph the tray accommodating the components and automatically specify the number of components in the tray by performing image recognition. Many images of the tray accommodating components may be subjected to machine learning as training image data to generate a learning model for the examination with an aim of reliable performance of the image recognition.
Japanese Unexamined Patent Publication No. 2020-126414 discloses a technology of creating, on the basis of an actual image captured by actually photographing a tray accommodating components, a plurality of pieces of training image data for machine learning by changing a position of each component and differentiating an orientation of the component. However, the actual image does not always clearly reflect each component in a recognizable manner. For instance, in the image recognition of each component through edge extraction, recognition performance reduces when an edge of the component is obscure or adjacent components overlap each other. Therefore, execution of the machine learning using the training image data created on the basis of the actual image under the circumstances may lead to a failure in acquisition of a reliable learning model.
The present disclosure provides a learning model generation method for reliably generating a learning model for use in machine learning to examine the number of target objects.
A learning model generation method for examining the number of target objects according to one aspect of the present disclosure is a method for generating a learning model for use in machine learning to automatically examine the number of target objects accommodated in a container. The method includes: by a device that generates the learning model, a step of inputting model data which represents a shape of the container and a shape of a target object in an image; a step of creating, by using the model data, a plurality of unit formative assemblies each having a plurality of target objects arranged in a specific array and arranging the unit formative assemblies in a container area corresponding to the container in a specific formation to create shape image data of the container accommodating the target objects at a specific density; and a step of creating training image data for use in establishing the learning model by applying processing of giving a real texture of each of the container and the target object to the shape image data.
A learning model generation program for examining the number of target objects according to another aspect of the present disclosure is a program for causing a predetermined learning model generation device to generate a learning model for use in machine learning to automatically examine the number of target objects accommodated in a container. The program includes: causing the learning model generation device to execute: a step of receiving model data which represents a shape of the container and a shape of a target object in an image; a step of creating, by using the model data, a plurality of unit formative assemblies each having a plurality of target objects arranged in a specific array and arranging the unit formative assemblies in a container area corresponding to the container in a specific formation to create shape image data of the container accommodating the target objects at a specific density; and a step of creating training image data for use in establishing the learning model by applying processing of giving a real texture of each of the container and the target object to the shape image data.
Hereinafter, embodiments of a method for generating a learning model to examine the number of target objects according to the present disclosure will be described in detail with reference to the accompanying drawings. A learning model to be generated in the present disclosure is for use in a predetermined processor to automatically conduct, by performing image recognition, an examination of grasping the number of target objects accommodated in a container or an examination to determine whether a required number of target objects are accommodated in the container. An image of the target objects accommodated in the container in various arrays is subjected to the machine learning as training image data to generate a learning model for the number examination. In the present disclosure, not an actual image of the container accommodating the target objects, but a composite image created on the basis of shape image data like CAD data is used as the training image.
An object recognizable as an individual in a captured image can be an examination target object in the present disclosure without any particular limitation. Further, a container which can accommodate a required number of target objects and has an opening for allowing all the accommodated target objects to be photographed is available without any particular limitation. Examples of the target objects include: components, such as machine components and electronic components; final products each having a small size; agricultural products, such as cereals, fruits, vegetables, and root vegetables; and processed foods. Examples of the container include; a storage box; a tray; a flatware; and other containers, each having an opening on the top thereof.
The automatic number examining system 1 includes a learning model generation device 10, an examination camera 14, an examination processor 15, and an examination display 16. The learning model generation device 10 executes learning with a predetermined machine learning algorithm by using, as training image data, a composite image of the container T accommodating the components C in various arrays, and generates a learning model. The examination camera 14 captures an actual image of the container T accommodating the components C whose number is to be examined.
The examination processor 15 detects the number of components C accommodated in the container T shown in the actual image captured by the examination camera 14, by applying the learning model generated by the learning model generation device 10 to the actual image. The examination processor 15 includes an image processing part 151 and a number recognizing part 152. The image processing part 151 applies, to actual image data captured by the examination camera 14, necessary image processing, such as modification of contrast or brightness, noise removal, enlarging or reduction, edge enhancement, and trimming. The image processing part 151 may be excludable when no special image processing is required. The number recognizing part 152 applies the learning model to the actual image data subjected to the image processing, and detects the number of objects recognized as the components C in the actual image data. The examination display 16 displays the number of components C recognized by the examination processor 15, or displays a result of success or failure based on the number.
The learning model generation device 10 includes a training image data creator 11, a learning processor 12, and a learning model storage 13. The training image data creator 11 creates various kinds of training image data to be learning materials by image composition. The learning processor 12 executes supervised learning with a machine learning algorithm by using the various kinds of training image data created by the training image data creator 11 to generate a learning model. Deep learning like the CNN (Convolution Neural Network) which is machine learning using a neural network is adoptable as the machine learning algorithm. The learning model storage 13 stores the learning model generated by the learning processor 12.
The data input part 26 inputs, into the processor 2, model data representing a three-dimensional shape of each of the component C and the container T in an image to create a composite image. For instance, the data input part 26 indicates another computer that creates three-dimensional CAD data, or a server that stores the three-dimensional CAD data. The manipulation part 27 receives a necessary manipulation from an operator to the processor 2 in creating the composite image to be training image data. The display part 28 displays the created composite image.
The processor 2 operatively has a confined area setting part 21, a unit formative assembly creation part 22, a component arrangement image creation part 23, a rendering part 24, and a data storage part 25. The confined area setting part 21 creates a confined area to be a unit area for accommodating a specific number of components C created from model data. The unit formative assembly creation part 22 performs a processing for inducing the specific number of components C to freefall into the confined area in accordance with a physical simulation. Execution of the freefall leads to creation of a unit formative assembly 3 (
The component arrangement image creation part 23 creates shape image data of the container T accommodating the components C at a specific density by arranging unit formative assemblies 3 in a container area corresponding to the container T in a specific formation. The rendering part 24 creates a composite image by applying processing of giving a real texture of each of the container T and the component C to the shape image data. Data of the composite image serves as training image data to be used in establishing the learning model by the learning processor 12. The data storage part 25 stores information indicating a position of each component C in the shape image data as true data indicating the position of the component C in the training image data.
[Overall Sequence of Creating the Training Image Data]
Each unit formative assembly 3 created at the stage 1 includes a component CA created with three-dimensional CAD data, and a confined area 31 restricting an arrangement area of the component. At the stage 1, a plurality of unit formative assemblies 3 each having a specified number of components CA arranged in a specific array different from an array in another assembly is created. Specifically, each of the created unit formative assemblies 3 has a different size of the confined area 31, a different number of components CA, and a different arrangement direction of the component CA. It is noted here that the confined area 31 has a size which is smaller than the size of a container area TA corresponding to the container T.
At the stage 2, the unit formative assemblies 3 created at the stage 1 are combined in a specific manner and arranged in the mixture area 4 to diversify arrangements of the components CA. The mixture area 4 is set to a size which is equal to or smaller than the container area TA and larger than the confined area 31. Concerning the unit formative assemblies 3A to 3D, a plurality of mixture areas 4 each having a different number of arranged unit formative assemblies 3, a different formation thereof, a different arrangement direction thereof, and a different coarseness and fineness state thereof is created.
At the stage 3, each mixture area 4 formed at the stage 2 is arranged in the container area TA at a specific position in a specific direction to create shape image data. Further, the shape image data is subjected to rendering processing to be given a texture matching a real texture of each of the component C and the container T. The processing at the stage 3 results in creating data of the training image 5 including an image comparable to the actual image captured by photographing the container T accommodating the component C.
[Details of Processing at Each Stage]
Hereinafter, a specific example of the processing executed at each of the stages 1 to 3 will be described. A physical simulator is used for each processing.
<Stage 1>
X=size of the component CA in a long side direction×expansion coefficient β; and
Y=size of the component CA in a short side direction×the number of components CA×expansion coefficient β.
The expansion coefficient β in each equation serves as a coefficient for setting a density of components CA per unit area in the confined area 31. The expansion coefficient β may be set, for example, in increments of 0.1 within a range from 1.0 to 2.0. Each component CA reflects a tolerance of the corresponding actual component C. In a case where the component CA has a square shape, multiplying a size of one side of the square by the expansion coefficient β can define a size of the component in each of the XY directions. In a case where the component CA has a circular shape, multiplying a diameter thereof by the expansion coefficient β can define a size of the component in each of the XY directions.
The unit formative assembly 3 is created by arranging a specific number of components CA in the confined area 31 in a specific array. Adoptable ways of the arrangement in the specific array in the embodiment include a way of inducing the specific number of components CA to freefall into the confined area 31 or the confinement container 32 in accordance with the physical simulation. The arrangement of the components CA in this array through the freefall aims at preventing the components CA from being arranged in a manner defying physical laws. However, the setting of the confined area 31 restricts chaotic rolling of the component CA after the freefall, and regulates an area for arrangement of the component CA in a specific array to come to the confined area 31. This facilitates: creation of a group of unit formative assemblies 3 (e.g., a group of the unit formative assemblies 3A in
When a component CA having a specific posture at a certain height level is induced to freefall into the confinement container 32, the component CA can have various postures in the confinement container 32.
The right view in each of
The component C11 illustrated in (A1) in
As described heretofore, the way of inducing the components CA to freefall in accordance with the physical simulation is employed in the embodiment. This way is less likely to cause specific dense arrangement of components in creation of many unit formative assemblies 3 each having a specific number of components CA arranged in the confined area 31 in a specific array. This consequently enables creation of unit formative assemblies 3 each allowing for various postures in respective confined areas 31, and creation of shape image data having various densities, or coarseness and fineness degrees of components CA.
<Stage 2>
size of the mixture area 4=size of the container area TA×reduction coefficient α.
The reduction coefficient α is a coefficient for setting the mixture area 4 to a size suitable for arrangement of a plurality of unit formative assemblies 3 in the container area TA. For instance, when the container area TA has a rectangular shape with its sides extending in the XY directions, the mixture area 4 is set to a size having a side length in each of the XY directions obtained by multiplying the side length in each of the XY directions of the container area by the reduction coefficient α. The reduction coefficient α is settable within a range of, for example, 0.8 to 1.0.
The unit formative assemblies 3 created at the stage 1 are arranged in the mixture area 4 in a specific formation.
Next, the component group G2 is arranged in the mixture area 4. Similarly, an arrangement coordinate of the component group center GC of the component group G2 in the mixture area 4 and a rotation thereof are appropriately set. Thereafter, a contact check is executed to check whether a component CA in the component group G2 is in contact with a precedingly arranged component CA in the component group G1. As exemplified in
When no occurrence of contact is confirmed as a result of the contact check, the component group G3 is subsequently arranged in the mixture area 4. Another contact check is executed, and the component group G4 is then arranged in the mixture area 4.
Subsequently, as shown in
Thereafter, the arrangement state of the component groups G1 to G4 in the mixture component group area 41 is stored. Specifically, a storage device stores an arrangement coordinate and a rotation angle of the corresponding component group center GC of each of the component groups G1 to G4 with reference to a mixture component group center MGC being a center coordinate of the mixture component group area 41 as a reference coordinate. Data to be stored includes values “xn, yn, and θn” respectively denoting coordinate values in an x-direction and a y-direction with reference to the mixture component group center MGC, and a rotation angle θ of the component group center GC about a z-axis.
<Stage 3>
At the stage 3, arrangement of the mixture component group area 41 or the mixture area 4 formed at the stage 2 in the container area TA is executed.
By contrast,
At the stage 3, subsequently, processing of giving a texture to each of the container area TA and the components CA is executed by rendering. The processing preferably adopts a physically based rendering tool. One way of the rendering processing is a setting of an optical system for photographing the container area TA including components CA arranged therein. The setting of the photographic optical system is performed in consideration of a case where the examination camera 14 (
For the pseudo-camera, parameters including exposure (diaphragm, a shutter speed, and an ISO sensitivity), a depth of field, a view angle, and a camera arrangement angle are set. The actual photographing by the examination camera 14 is performed under the presumption that images having different focus degrees may be captured or images captured in different directions may be acquired, and thus uniform images are not acquirable. Thus, a variation range is set for each parameter which is likely to fluctuate and give influence on an image quality among the aforementioned parameters. It is noted here that a variation value is within a range conforming to the physical laws. This setting can cover an image acquirable by the examination camera 14, and succeeds in creation of training image data suitable for an actual situation.
Concerning the pseudo-lighting, parameters including a type of a lighting device to be used, brightness, a hue, a lighting direction, a reflection condition in the examination chamber are set. A lighting condition also may fluctuate due to various factors. For instance, the lighting condition temporarily fluctuates due to a shadow made when an operator passes around a photographing position for the examination camera 14. For this case, a variation range is set for each parameter which is likely to fluctuate among the aforementioned parameters.
Another way of the rendering processing is a setting of a material of each of the component CA and the container area TA. For instance, when an actual component C is a metal bolt, parameters including metallic luster, reflection from projections and protrusions of a screw part, and roughness are set. Parameters including a material quality, a color, and surface luster of an actual container T are set for the component CA as well. The setting of the material leads to adjustment of the texture of each of the component CA and the container area TA. The real texture of each of the component C and the container T involves a variation, and thus, a variation range is set for the material quality parameters.
When the setting of rendering for the component CA and the container area TA is completed, physically based rendering is executed to create a training image 5 and training image data thereof is stored.
[Sequence of the Process of Creating Training Image Data]
Subsequently, the unit formative assembly creation part 22 selects a kind of and the number of components CA constituting a unit formative assembly 3 (
Next, the unit formative assembly creation part 22 sets a freefall condition of the component CA selected in step S2 to freefall into the confinement container 32 generated in step S3 (step S4). Here, a freefall start position and a component posture of the component CA are set. The freefall start position is set by an X-Y coordinate position indicating a position on an XY-plane, and a Z-coordinate position corresponding to a fall start height level h1 (
After stabilization of the postures of the components CA induced to have freefallen, the unit formative assembly creation part 22 further removes the confinement container 32, and waits for a lapse of a predetermined standby time after the removal. When the fluctuation in the components CA ceases, creation of one unit formative assembly 3 is completed. Thereafter, the unit formative assembly creation part 22 stores, in the data storage part 25, data of the X-Y position coordinate of each component CA relative to the component group center GC of the created unit formative assembly 3 and the rotation angle of each component about each axis (step S6). The processing of creating the unit formative assembly 3 is executed to create a required number of unit formative assemblies 3.
Next, the component arrangement image creation part 23 sets unit formative assemblies 3 to be arranged in the mixture area 4 (
Subsequently, the component arrangement image creation part 23 executes arrangement of the unit formative assemblies 3 in the mixture area 4 in a specific formation at a specific rotation angle as exemplified in
Thereafter, the component arrangement image creation part 23 sets the mixture component group area 41 (
The component arrangement image creation part 23 further randomly arranges the mixture component group area 41 in the container area TA as exemplified in
Subsequently, the rendering part 24 executes processing of giving a texture to each of the container area TA and the component CA by the physically based rendering. Specifically, the rendering part 24 sets an optical system (camera and lighting) to photograph the container area TA including the components CA arranged therein, and sets a variation range thereof (step S13). The rendering part 24 further sets a material of each of the component CA and the container area TA, and sets a variation range of the material (step S14).
Thereafter, the rendering part 24 executes the physically based rendering to create composite image data or training image data to be the training image 5 (step S15). The created training image data is stored in the data storage part 25 (step S16). The training image data in the data storage part 25 is provided to the learning model generation device 10, if necessary.
A tendency of placing a component C in a container T may vary depending on an operator or a robot. For instance, a preceding operator A has an operation tendency of uniformly and dispersedly placing components C in the container T. By contrast, a subsequent operator B who takes over the operation has an operation tendency of densely placing the components C in the container T at a certain position. A learning model currently stored in a learning model storage 13 and having a high number determination accuracy under the operation of the operator A may not have a high number determination accuracy under the operation of the operator B having the different operation tendency. In consideration of the foregoing, the model updating processor 17 periodically determines the accuracy of the learning model.
The model updating processor 17 operatively includes an image similarity evaluation part 171 and a relearning determination part 172. The image similarity evaluation part 171 compares an actual image of the container T accommodating the components C actually captured by the examination camera 14 in an automatic number examination with a training image 5 created by the training image data creator 11, and evaluates an image similarity between the actual image and the training image. The image similarity can be evaluated by a way of, for example, template matching, or can be evaluated by, for example, SWD (Sliced Wasserstein Distance).
The relearning determination part 172 determines, on the basis of a result of the evaluation by the image similarity evaluation part 171, the necessity of updating the learning model, i.e., the necessity of relearning using training image data. When the image similarity is lower than a predetermined threshold, the relearning determination part 172 instructs a learning model generation device 10 to create another training image data reflecting a feature of an actual image currently acquired and update the learning model.
The composite training image T1 has the highest similarity to the actual image AD1, and the composite training image T2 has the secondly highest similarity thereto among the composite training images T1 to T5. By contrast, each of the composite training images T3, T4, and T5 has a lower similarity to the actual image AD1. The composite training image T3 has the highest similarity to the actual image AD2, and each of the composite training images T4 and T5 has the secondly highest similarity thereto. By contrast, each of the composite training images T1 and T2 has a lower similarity to the actual image AD2.
When an image acquired in an actual number examination has a feature of the actual image AD1, the performance of the learning model is improved through learning of more training images each including the dispersed components like the composite training images T1, T2. When the acquired image has a feature of the actual image AD2, the performance of the learning model is improved through learning of more training images each including the densely arranged components like the composite training images T3 to T5.
For instance, when a feature of an image captured by the examination camera 14 changes from the feature of the actual image AD1 to the feature of the actual image AD2, the model updating processor 17 instructs the learning model generation device 10 to create and relearn a wide variety of composite images reflecting the features of the composite training images T3 to T5, particularly, the feature of the composite training image T3, and update the learning model. According to the second embodiment described heretofore, when a difference between the training image data and the actual image becomes larger as an automatic examination of the number of components actually proceeds, a learning model is updated to conform to the context of an actual situation and have an improved performance.
In the third embodiment, at the stage 1 shown in
In the step of arrangement into a mixture area 4 at the stage 2, the unacceptable object blocks 6 are arranged together with a plurality of unit formative assemblies 3.
At the subsequent stage 3, shape image data is created by arranging the mixture area 4 including the unacceptable object blocks 6 in a container area TA at a specific position. Further, processing of giving a texture to the shape image data by applying the rendering thereto is executed to create a training image 5. In the training image 5, the unacceptable object 61 is also given a real texture of an actual unacceptable object which is a model, and thus, the component CA and the unacceptable object 61 are respectively represented by a component CAR and an unacceptable object 61R having their respective textures.
Such creation of the training image 5 including the unacceptable object 61R is useful for the examination processor 15 to identify, when an examination target image acquired by the examination camera 14 includes an estimated unacceptable object, the unacceptable object as being mixed in the container T. This succeeds in preventing the container accommodating the unacceptable object mixed with the components C from proceeding to a subsequent step.
A fourth embodiment exemplifies simplification of processing of creating shape image data prior to the rendering processing. The first embodiment exemplifies creation of shape image data by arranging unit formative assemblies 3, each created to have components CA induced to have freefallen, in a mixture area 4 in a specific formation, and arranging the mixture area in a container area TA at a specific position. By contrast, the fourth embodiment exemplifies creation of shape image data by inducing a component CA to directly freefall into a container area TA.
The fall start height level h2 is lower than the fall start height level h1 shown in
Next, the unit formative assembly creation part 22 sets a freefall condition of the component groups C31 to C34 selected in step S22 (step S23). Here, a freefall start position and a component posture of each of the component groups C31 to C34 are set. The freefall start position is set by an X-Y coordinate position indicating a position on an XY-plane, and a Z-coordinate position corresponding to the fall start height level h2. The component posture is set at a rotation angle about each of the X-axis, the Y-axis, and the Z-axis.
Thereafter, the unit formative assembly creation part 22 induces the component groups C31 to C34 to freefall into the container area TA under the set freefall condition in accordance with the physical simulation (step S24). After stabilization of the postures of the component groups C31 to C34 induced to have freefallen, the data storage part 25 stores data including the X-Y position coordinate of each component constituting the component group C31 to C34 and a rotation angle of the component about each axis (step S25).
Subsequently, the rendering part 24 executes the processing of giving a texture to each of the container area TA and the component groups C31 to C34 by the physically based rendering (steps S26 to S28). The rendering processing to be executed is the same as the processing described for steps S13 to S15 in
[Operational Effects]
According to each embodiment described above, pseudo-shape image data as shown in
A training image is not created from an actual image but is created through image composition from the beginning, and thus, the created training image data can be more suitable for learning.
Image processing including edge extraction is required to recognize a target object, such as a component, from the two-dimensional image.
[Disclosure Covered by Embodiments]
A learning model generation method for examining the number of target objects according to one aspect of the present disclosure is a method for generating a learning model for use in machine learning to automatically examine the number of target objects accommodated in a container. The method includes: by a device that generates the learning model, a step of inputting model data which represents a shape of the container and a shape of a target object in an image; a step of creating, by using the model data, a plurality of unit formative assemblies each having a plurality of target objects arranged in a specific array and arranging the unit formative assemblies in a container area corresponding to the container in a specific formation to create shape image data of the container accommodating the target objects at a specific density; and a step of creating training image data for use in establishing the learning model by applying processing of giving a real texture of each of the container and the target object to the shape image data.
A learning model generation program for examining the number of target objects according to another aspect of the present disclosure is a program for causing a predetermined learning model generation device to generate a learning model for use in machine learning to automatically examine the number of target objects accommodated in a container. The program includes: causing the learning model generation device to execute: a step of receiving model data which represents a shape of the container and a shape of a target object in an image; a step of creating, by using the model data, a plurality of unit formative assemblies each having a plurality of target objects arranged in a specific array and arranging the unit formative assemblies in a container area corresponding to the container in a specific formation to create shape image data of the container accommodating the target objects at a specific density; and a step of creating training image data for use in establishing the learning model by applying processing of giving a real texture of each of the container and the target object to the shape image data.
According to the method for generating the learning model or the program for generating the learning model, pseudo-shape image data is created by using model data of a container and a target object. The shape image data is created by arranging a plurality of unit formative assemblies in a container area in a specific formation. Each of the unit formative assemblies is created by arranging a plurality of target objects in the container area in a specific array, and thus, shape image data having various densities or coarseness and fineness of the target objects can be easily composed. Further, training image data is created by applying the processing of giving a real texture of each of the container and the target object to the shape image data. Thus, training image data compatible to an actual image captured by actually photographing the container accommodating the target object is acquirable. This results in enhancing the performance of a learning model to be generated through machine learning using the training image data.
In the method for generating the learning model, each of the unit formative assemblies is desirably created by presetting a confined area which is smaller than the container area, and arranging a specific number of the target objects in the confined area in a specific array.
According to the method for generating the learning model, an area of the unit formative assemblies is stylized by the confined area, and thus, arrangement of the unit formative assemblies into the container area thereafter is facilitated.
In the method for generating the learning model, the specific number of the target objects are induced to freefall into the confined area in accordance with a physical simulation to preferably come in the confined area in the specific array.
According to the method for generating the learning model, employing freefall in accordance with the physical simulation is less likely to cause specific dense arrangement of the specific number of the target objects in the confined area. This consequently enables creation of the unit formative assemblies each allowing for various arrangement postures in respective confined areas, and creation of shape image data having various densities, or coarseness and fineness degrees of target objects.
In the method for generating the learning model, the step of creating the shape image data desirably includes: a step of setting a mixture area which is equal to or smaller than the container area and larger than the confined area, and arranging the unit formative assemblies in the mixture area in a specific formation; and a step of arraigning the mixture area including the unit formative assemblies in the container area at a specific position in a specific direction.
According to the method for generating the learning model, the unit formative assemblies are arranged in the mixture area in a specific formation, and the mixture area is then arranged in the container area at a specific position. This enables creation of shape image data having a wider variety of densities, or coarseness and fineness degrees of target objects, for example, creation of shape image data showing target objects dispersed in the container or densely arranged therein.
In the method for generating the learning model, the unit formative assemblies are allowed to freefall from a fall start position where the target objects stay in a specific array into the container area in accordance with a physical simulation to come in the container area in the specific formation.
The method for generating the learning model attains direct arrangement of the unit formative assemblies in the container area in a specific formation while allowing the target objects to stay in the specific array. This can consequently simplify the creation of the shape image data.
The method for generating the learning model desirably further includes: defining information indicating a position of each of the target objects in the shape image data as true data indicating a position of the target object in the training image data; and causing a storage included in the device that generates the learning model to store the training image data and the true data in association with each other.
The method for generating the learning model achieves linkage between a position of each target object in the training image data and corresponding true data more accurately than a way of acquiring the true data on the basis of an actual image.
In the method for generating the learning model, the processing of giving the texture is desirably executed by physically based rendering including: a setting of a photographic optical system for each of the target objects and the container, and a setting of a variation range of the photographic optical system; and a setting of a material of each of the target object and the container, and a setting of a variation range of the material.
The method for generating the learning model succeeds in giving the texture to each of the target object and the container in accordance with a situation of an actual number examination. This consequently enables creation of training image data far more similar to an actual image.
The method for generating the learning model desirably further includes: comparing the training image data with an actual image of the container accommodating the target objects, the actual image being actually acquired in the automatic examination of the number of target objects; and updating the learning model by creating another training image data reflecting a feature of the actual image when a similarity between the training image data and the actual image is lower than a predetermined threshold.
According to the method for generating the learning model, when a difference between the training image data and the actual image becomes larger as an automatic examination of the number of target objects actually proceeds, a learning model is updated to conform to the context of an actual situation and have an improved performance.
In the method for generating the learning model, the step of creating the shape image data desirably includes a step of arranging in the container area an unacceptable object other than the target object.
According to the method for generating the learning model, shape image data showing an unacceptable object is created. The learning model is hence applicable to an examination for existence or absence of an unacceptable object as well as to the number examination.
Conclusively, the present disclosure described heretofore can provide a learning model generation method and a learning model generation program for reliably generating a learning model for use in machine learning to examine the number of target objects.
This application is a National Stage of International Patent Application No. PCT/JP2021/013359, filed Mar. 29, 2021, the entire content of which is incorporated herein by reference.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2021/013359 | 3/29/2021 | WO |