Patent ID: 12217495

DESCRIPTION OF EMBODIMENTS

An embodiment of the disclosure will be described by reference to the attached drawings. In the present specification and the drawings, elements having substantially the same functions and configurations are designated with the same reference numerals, and will not be described repeatedly.

1. Entire Configuration of Inspection Apparatus

An example entire configuration of an inspection apparatus according to the present embodiment will be first described. The inspection apparatus according to the present embodiment is incorporated into part of an operation line of an inspection process for drugs in containers, for example, to inspect an inspection target based on a neural network. The neural network is not limited to any particular type. The inspection apparatus inspects the presence of damage such as cracks and splits in containers, and the presence of foreign matter within containers. The container may be an ampule, a vial, a bottle, a carpule, or a syringe, for example, but is not limited to these examples

The inspection apparatus includes at least a processor and a memory device. The processor includes, for example, an image processor such as a GPU (Graphics Processing Unit) and an operation processor such as a CPU (Central Processing Unit). The memory device includes one or more storage media including an HDD (Hard Disk Drive) and a CD (Compact Disc), a DVD (Digital Versatile Disc), an SSD (Solid State Drive), a USB (Universal Serial Bus) flash, and a storage device.

FIG.1schematically illustrates a configuration of an inspection apparatus1according to the present embodiment. The inspection apparatus1includes an image processing unit40, an inspection unit10, a processing condition setting unit20, a learning unit30, and a memory unit50. Some or all of the image processing unit40, the inspection unit10, the processing condition setting unit20, and the learning unit30are functions that can be implemented by execution of programs by the processor. Some or all of the image processing unit40, the inspection unit10, the processing condition setting unit20, and the learning unit30may be an updatable unit such as a firmware, and may be, for example, a program module that is executed according to instructions from the processor. The memory unit50is a function that is executed by the memory device described above.

The learning unit30forming the inspection apparatus1is an element that functions as a learning processing apparatus, and may be an independent processing device having a partial function including that of the learning unit30.

Imaging devices5aand5bare coupled with the inspection apparatus1for capturing images of containers with drug that are continuously conveyed. The imaging devices5aand5bmay be, for example, a wide-angle CCD (Charge Coupled Device) camera or a line sensor camera. WhileFIG.1illustrates two imaging devices5aand5b, the number of imaging devices may be one, or three or more. The inspection apparatus1may further include an illumination device that illuminates the inspection target with light and a microscope that visually enlarges the inspection target. The inspection apparatus1may further include an image display monitor and a speaker, for example. The image display monitor displays image information and text to enable an operator to confirm the inspection status, for example. The image display monitor may be a touch panel that receives an operator's operation input. The speaker issues guidance for an inspection procedure and raises an alarm upon detection of a defect in a container with a drug, for example.

Inspection may be performed for detecting foreign matter within a container filled with a liquid drug while the container is being conveyed, for example. In this case, capturing an image of the container with a drug that has reached an inspection station while rotating the container allows detection of the state of the container, and capturing an image of the drug within the rotating container, allows detection of foreign matter within the drug. For example, in each of a plurality of inspection stations, a plurality of imaging devices inspect a container with a drug.

The image processing unit40acquires a captured image captured by the imaging devices5aand5b, and stores the acquired captured image in the memory unit50. When storing the captured image in the memory unit50, the image processing unit40may perform image processing suitable for inspection with respect to the captured image. For example, the image processing unit40may cut out a portion of the captured image corresponding to the range of the inspection target. The image processing unit40may also perform processing such as data compression, normalization, and extension with respect to the captured image.

The learning unit30performs training (deep learning) of a neural network using the captured image. Specifically, the learning unit30learns defect-free images and images with various defects obtained under a predetermined inspection condition to construct a neural network model.

The processing condition setting unit20creates a data file of inspection processing conditions of the inspection target. The data file of inspection processing conditions refers to a data file of a collection of inspection processing procedures and inspection condition parameters. In inspections that employ conventional rule-based image recognition processing, inspections are performed based on a data file of predetermined inspection conditions, and the inspection conditions for each inspection are stored along with image data captured by each imaging device, for example. When a neural network model is constructed by learning, an inspection condition data file corresponding to the constructed neural network model is generated from the inspection conditions regarding images used for the learning.

A user executes an inspection according to the inspection processing conditions that are set. The inspection unit10performs an inspection of the inspection target with a trained neural network model. For example, the inspection unit10inputs an image of the inspection target in a neural network model, and performs an inspection of the inspection target based on the output. The neural network model that is used has been formed by learning under the inspection processing conditions that are set.

The inspection unit10may be configured to perform inspections based on the conventional rule-based image recognition processing in combination with an inspection based on the neural network model. The inspection apparatus1according to the present embodiment which will be described below is configured to be executable of an inspection based on the conventional rule-based image recognition processing, in addition to an inspection based on a neural network model.

2. Inspection Processing Example

An example of inspection processing according to an inspection procedure included in a data file of the inspection processing condition will be described.

FIG.2illustrates an example inspection processing. According to the inspection procedure illustrated inFIG.2, in step S11to step S19, inspection units vsn_PC1to vsn_PC4perform inspection processing under respective set conditions, and thereafter determination is made using a neural network model. Then, in the following step S21, a defect of an inspection target is determined. Among these steps, in steps S11to S17, inspection processing that employs rule-based image recognition processing, for example, is performed, and in step S19, inspection processing that employs a neural network model is performed.

When an inspection target is a bottle-shaped container, the following processing is performed in step S11to step S17. Specifically, a condition is set to enable optical determination of whether a large flaw is present in a portion of the container which is prone to cracks, such as a shoulder or neck of the container, or whether foreign matter is present within the container, and an inspection is performed. Then, determination is made based on an image obtained as a result of the inspection, for example. In each of step S11to step S17, a predetermined inspection is performed while changing between the imaging devices5aand5bto image a container to be inspected or changing the amount of exposure, spectrum, or exposure time of light to be emitted from the illumination device, according to setting of a data file of the inspection processing conditions. In step S11to step S17, the conventional rule-based detection of an outer appearance of the container or the presence of foreign matter within the container is performed based on the obtained image data.

The inspection processing conditions in the respective inspections and the images obtained in the respective inspections in step S11to step S17are stored in the memory unit50in association with the corresponding inspections in step S11to step S17.

In step S19, the outer appearance of the container or the presence of a defect in the container is determined with a neural network model. In step S19, similarly, each of images of a plurality of containers that are inspected is input to a neural network model according to the setting in the data file of inspection processing condition, and the presence of flaws in the container and the presence of foreign matter within the container is inspected based on the output. Specifically, an image of the container obtained by one inspection is input to a neural network model prepared for that inspection, so that a determination result regarding a defect such as a flaw that is an inspection result for that inspection can be obtained. Then, for each inspection, a data file of the inspection processing conditions that is used is stored in association with a neural network model that is used.

In step S21, the quality of the inspection target is determined from the determination results in step S11to step S19. It is possible, for example, to determine, as a failure, a container that is determined to have a defect based on either the determination result in steps S11to S17or the determination result in step S19, or both of the determination results. As conventionally known techniques are applicable to the processing performed in each of step S11to step S21, detailed description of the processing will be omitted.

Regarding the inspection processing with a neural network model performed in step S19, the inspection apparatus1according to the present embodiment stores the data file of inspection processing conditions along with model identification data of the neural network model and condition identification data of the data file of inspection processing conditions. The model identification data is assigned to a neural network model when the neural network model is constructed by learning. Specifically, different identification data that is difficult to rewrite is assigned to each of different data sets used for learning the neural network. Then, in step S19, the model identification data of the neural network model used for the inspection processing is stored in association with the corresponding inspection. Therefore, at the end of the inspection, the model identification data of the neural network model that is used has been stored for each inspection, and this enables verification of the neural network model used for inspection processing.

For each neural network model, an image data list and setting parameters used for constructing the neural network model are stored. This configuration enables the user to specify the neural network model from the model identification data upon user's detection of some faults in image recognition, which further enables tracking of the image data list and setting parameters used for learning the neural network. It is therefore possible to verify validity of the neural network model for an inspection to be performed.

3. Learning Processing Operation and Setting Processing Operation for Inspection Processing Conditions

Operation examples of neural network learning processing and inspection processing condition setting processing to be performed by the inspection apparatus1will be now described.

FIG.3is a flowchart illustrating an operation example of neural network learning processing and inspection processing condition setting processing.FIG.3illustrates, on the left half, an operation regarding setting of an inspection processing condition (recipe: Rcp), and illustrates, on the right half, an operation regarding a data set (Dtst) for use in creating a neural network model.

First, the processing condition setting unit20of the inspection apparatus1detects, based on user input, application of a neural network model to a specific inspection processing condition (YES in step S31). More specifically, a neural network model is constructed by learning, and also a data file of inspection processing conditions to be applied to the constructed neural network model is generated.

Subsequently, the learning unit30sets a learning data set for a neural network (step S33). The learning data set refers to a list of image data for use in learning for a neural network, and data of setting parameters for use in learning. The setting parameters are parameters such as a depth and learning rate of deep learning for a neural network, and error functions, for example. The list of image data may be selected arbitrarily from the image data stored in the memory unit50or may be designated by the user. Specifically, image data have been stored regarding results of inspections performed under specific inspection conditions, as examples with or without defects, and, based on these data sets, a neural network model would be constructed.

For example, at the start of learning, 50% of the stored image data may be arbitrarily extracted for learning to thereby create a neural network model, and thereafter, the remaining 50% of the image data may be input to the created neural network model for verification of the model. If an error is detected by such verification, the corresponding image data may be manually added as learning image data. Alternatively, when there are any foreign matter or container defects that cannot be detected with a neural network model suitable for manufacturing of a container with a drug, the image data of the container may be newly registered in a data set to enable learning of the image data.

The learning unit30then assigns the model identification data to the data set that has been set (step S35). The model identification data that is assigned is identification data that is difficult to rewrite, and is individually assigned to each of data sets that are only partially different. The learning unit30, upon changing the list of image data or setting parameters for use in learning at least partially, always assigns different model identification data to the data set to thereby enable discrimination among different data sets. The model identification data thus specifies the neural network model and the data set used for constructing the neural network model. The model identification data may be binary data, for example. The use of binary data enables identification data that is distinguishable from identification data of other data sets to be easily incorporated into a data set, as identification data that is difficult to rewrite.

The learning unit30further performs learning of a neural network to create a neural network model (step S37). The learning unit30performs learning of the neural network while classifying the image data, for example. The image data may be classified, for example, according to the state of a container having cracks, the state of a container being chipped, the state of a container containing foreign matter, and the extent of these states. The applicable neural network types and their learning methods are not limited to specific types and methods, and an appropriate neural network or learning method is selected in accordance with the content of an inspection.

The learning unit30then assigns the model identification data to the neural network model that is created (step S39). In this example, the same identification data as the model identification data that has been assigned to a data set is assigned to the neural network model. When a neural network model is created with the data set being unchanged, a hash value would be different. However, the same identification data (binary data in the present embodiment) would be assigned as the model identification data for the same data set. Meanwhile, when the data set is changed at least partially, different model identification data would be assigned to the neural network model.

Subsequently, the processing condition setting unit20applies the created neural network model to a data file of inspection processing conditions (step S41). Specifically, the neural network model that is created is applied as a neural network model for use in inspection processing employing the neural network. More specifically, a data file of the inspection processing conditions corresponding to the neural network model that is created is generated from the inspection processing conditions corresponding to the data set used for constructing the neural network model.

When a new neural network model is created, the inspection unit10may verify validity of the neural network model prior to application of the neural network model to a data file of the inspection processing condition. This configuration enhances reliability of an inspection employing the neural network model.

The processing condition setting unit20then assigns condition identification data to the data file of inspection processing conditions that is generated and stores the data file of inspection processing conditions (step S43), thereby terminating the processing. As the condition identification data, different values are assigned to the data files of inspection processing conditions with different model identification data of the neural network models. The condition identification data, similar to the model identification data, is identification data that cannot be easily rewritten. The condition identification data may be binary data, for example.

Here, in response to NO in the determination in step S31, the learning unit30determines whether or not a data set has been changed (step S45). Specifically, the learning unit30determines whether or not the user has added the learning image data or has added or changed the setting parameters. In response to the determination that the data set has not been changed (S45/No), the learning unit30maintains the neural network model and the data file of the inspection processing condition that are stored, and terminates the processing. In response to the determination that the data set has been changed (S45/Yes), the learning unit30returns the process to step S35, and creates a new neural network model and a data file of inspection processing condition. At this time, the learning unit30assigns new model identification data and new condition identification data to the neural network model and the data file of inspection processing conditions, respectively.

As the processing in steps S31to S45is continuously repeated, a new neural network model and data file of inspection processing conditions are generated in response to a user input or a change of the data set.

FIG.4andFIG.5are tables for explaining the model identification data and the condition identification data before and after a change of the data set.FIG.4shows a data file of the model identification data and the condition identification data before a change of the data set, andFIG.5shows a data file of the model identification data and the condition identification data after a change of the data set. InFIG.4andFIG.5, the data files are designated with project file numbers (Prj) “111” and “112”, respectively.

In the examples illustrated inFIGS.4and5, the first inspection unit vsn_PC1uses a list of image data captured by each of a first imaging camera cmr1, a second imaging camera cmr2, a third imaging camera cmr3, and a fourth imaging camera cmr4to perform an inspection based on a neural network model. Further, each of the second inspection unit vsn_PC2to the tenth inspection unit vsn_PC10uses a list of image data captured by at least one of the first imaging camera cmr1, the second imaging camera cmr2, the third imaging camera cmr3, and the fourth imaging camera cmr4to perform an inspection based on conventional rule-based imaging recognition processing.

For each of the inspections performed by each of the inspection units vsn_PC1to vsn_PC10with a list of image data captured by each of the first imaging camera cmr1, the second imaging camera cmr2, the third imaging camera cmr3, and the fourth imaging camera cmr4, a data file of inspection processing conditions is generated. InFIG.4, for example, “010”, “003”, “021”, “004”, “018”, “013”, . . . and “066” are assigned to the data files, respectively, as condition identification data (R.U.N.) of the corresponding data files of inspection processing conditions.

Regarding inspections employing the neural network models, the neural network models applied to the respective inspection processing conditions are designated with model identification data (M.U.N.) “002”, “001”, “017”, and “002”, respectively.

Here, assuming that a data set for creating a neural network model with a list of image data captured by the first imaging camera cmr1and the third imaging camera cmr3is changed, the model identification data (M.U.N.) of the neural network model that is created is updated to “003” and “018”, respectively, as indicated inFIG.5. Further, the condition identification data (R.U.N.) that is identification data of the data file of inspection processing conditions applied to the neural network model is updated to “012” and “022”, respectively.

As described above, in the inspection apparatus1according to the present embodiment, the learning unit30creates a neural network model with the model identification data that is difficult to rewrite being assigned thereto, every time part of the data set for creating the neural network model is changed. Further, the processing condition setting unit20assigns the condition identification data that is difficult to change to the inspection processing conditions to which a neural network model having different model identification data is applied, and generates a data file of the inspection processing conditions. This configuration enables a user, who feels that there is deficiency in the result of an inspection based on image recognition with a neural network model, to track the list of image data or the setting parameters used for creating the neural network model and the creation time of the neural network model.

Specifically, in each inspection project, the condition identification data, and, when a neural network model is used, the model identification data, are stored for each camera of the inspection unit. This configuration facilitates verification of the network model used for determination and the corresponding inspection conditions. Further, as the condition identification data is changed with a change of the network model, the data set corresponding to the network model can also be reliably verified.

For rule-based inspections to be performed without a neural network model, a data file of inspection processing conditions is also generated corresponding to each inspection, and is stored with corresponding condition identification data. At this time, condition identification data different from the condition identification data that is generated for an inspection based on a neural network model is assigned, although the same inspection processing condition is used until the imaging process.

As such, different condition identification data are assigned to inspection processing condition data files for inspection between an inspection not based on a neural network model and an inspection based on a neural network model. Further, when different neural network models are used, different condition identification data are assigned for respective inspection processing condition data files.

Regarding the vsn_PC2inFIGS.4and5, for example, the condition identification data (R.U.N.) is assigned to the inspection processing condition data file of each inspection. If determination is made using a neural network model in the vsn_PC2, different condition identification data (R.U.N.) corresponding to the model would be assigned.

This configuration enables a user who cannot understand the content of the neural network to verify, based on the model identification data or the condition identification data, whether or not a neural network model used for an inspection is the same as a model used for creating and verifying the neural network model or to verify validity, such as effectiveness, of the neural network model.

As the model identification data and the condition identification data that are assigned are difficult to rewrite, such as binary data, the possibility of tampering of the neural network model or the data file of inspection processing conditions that has been created is lowered, which increases reliability of validity of the neural network model.

Further, the model identification data is assigned to each neural network model that is created and the condition identification data is assigned to each data file of inspection processing conditions. This facilitates selection of a neural network model to be used, in accordance with the inspection environment, such as when a container or the content within a container has been changed.

While the embodiment of the disclosure has been described in detail with reference to the drawings, the present disclosure is not limited to the above example. It is obvious to a person with ordinary knowledge in the technical field of the present disclosure that various modification or correction examples may be conceived of within the scope of technical idea described in the claims, and it is naturally understood that these modification or correction examples fall within the technical scope of the present disclosure.

For example, in the above embodiment, the inspection apparatus1includes the inspection unit10, the processing condition setting unit20, the learning unit30, and the image processing unit40that are formed by a single computer. However, the present disclosure is not limited to this example, and each, or two or more, of the inspection unit10, the processing condition setting unit20, the learning unit30, and the image processing unit40may be formed by a plurality of computer devices that are communicable with each other.

REFERENCE SIGNS LIST

1inspection apparatus,10inspection unit,20processing condition setting unit,30learning unit,40image processing unit.