Defect Detection of Freeze-Dried Pharmaceutical Products Using Convolutional Neural Networks

Through convolutional neural network and transfer learning technology, the problems of low accuracy and imbalanced data sets in the detection of freeze-dried protein therapeutics are solved, and high-accuracy classification and defect identification of freeze-dried drug product vials are achieved, improving detection efficiency. efficiency and accuracy.

CN112912964BActive Publication Date: 2024-09-27F HOFFMANN LA ROCHE & CO AG
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN201980068705.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-05-23
Filing Date
2019-10-16
Publication Date
2024-09-27
Estimated Expiration
2039-10-16

AI Technical Summary

Technical Problem

Existing defect detection technologies for freeze-dried protein therapeutics suffer from low accuracy, loss of efficiency, and increased costs. In particular, it is difficult to distinguish between glass defects and fogging events, and due to the low defect rate, training machine learning algorithms is required. There are not enough defective samples, resulting in an imbalanced data set.

Method used

A convolutional neural network (CNN) combined with transfer learning was used to classify images of freeze-dried pharmaceutical product vials by training a computer vision model, using multiple camera stations to acquire images to detect defects in all possible locations, and reducing overshooting through manual labeling bias. Fitting, using transfer learning to reduce training data set size and improve generalization ability.

Benefits of technology

It achieves high-accuracy classification of vials of freeze-dried pharmaceutical products, reduces the false detection rate, improves detection efficiency and accuracy, reduces additional inspections and costs, and can effectively identify defects with a low defect rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112912964B_ABST
    Figure CN112912964B_ABST
Patent Text Reader

Abstract

In one embodiment, the present invention discloses a method, comprising: receiving one or more query images associated with a pharmaceutical product container, each of the one or more query images being based on a specific angle of the pharmaceutical product container; for the pharmaceutical product container, calculating one or more confidence scores associated with one or more defect indications, respectively, by processing the one or more query images using a target machine learning model; and for the pharmaceutical product container, determining a defect indication from the one or more defect indications based on a comparison between the one or more confidence scores and one or more predefined threshold scores, respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to inspection systems and methods for detecting and classifying defects in lyophilized protein therapeutics, including antibodies, using machine learning algorithms, such as convolutional neural networks. Background Art

[0002] The global protein therapeutics market was valued at $21.3 billion in 2015 and is expected to grow to more than $46 billion by 2024. The increasing adoption and development of such technologies has highlighted the challenges in handling, storing and distributing protein therapeutics, which are often more unstable than conventional small molecule drugs. Due to limited stability, protein drug products are often lyophilized or freeze-dried to minimize degradation and aggregation for storage and distribution. The three processing steps of lyophilization include freezing, primary drying and secondary drying, which together remove most of the water surrounding the protein product to form a solid cake product. Physical packaging (usually in glass vials) plays an important role in the stability of lyophilized protein therapeutics. For example, special vial stoppers vent water vapor and are usually dehydrated to prevent moisture release. In addition, the glass of the vial allows for efficient heat transfer between the shelf and the vial. Packaging of lyophilized protein therapeutics is usually completed by crimping the cap of the vial containing the product, and the final lyophilized protein product is generally visually inspected to ensure the absence of foreign contaminants and packaging defects.

[0003] The main challenge of these inspections is to find contaminants in solid cakes. While liquid products are rotated quickly to identify possible contaminants by their movement, contaminants in solid products (such as lyophilized protein therapeutics) are immovable and must be visually located. In addition, contaminants are usually very small, resulting in inconsistent detection by manual inspection. Other packaging defects may also seriously affect drug efficacy and safety, such as improper product filling levels (e.g., too much or too little lyophilized protein product) or cracks in vials that may expose lyophilized cakes to external moisture. In addition, cosmetic defects such as slight glass impact cracks or scratches can also be identified to identify potential manufacturing problems. A variety of manual and automatic inspection techniques are generally used to inspect filled vials, but they must be relatively fast to avoid affecting the drug product. Figure 1 An example of a manual inspection process 100 of vials of lyophilized protein therapeutics is shown. As can be seen, the process 100 may include six steps, namely, cleaning the vials, checking fill levels, checking for other defects, marking defects, logging and sorting, and completing the inspection. Figure 2An exemplary inspection environment 200 for manually inspecting vials of lyophilized protein therapeutics is shown. Because both manual and automated inspections are entirely visual processes, it is easy to confuse an event of "fogging" on a vial with a vial scratch or even an impact crack. "Fog" refers to the different patterns of white fog that can often be observed on glass vials above the product cake after lyophilization. Although fogging of glass vials has traditionally been viewed as a non-critical, purely cosmetic defect with respect to drug efficacy, a large number of fogging events can cause manufacturing difficulties for lyophilized drug products due to challenges in inspection (manual or automated). Ideally, the inspection technology should distinguish fogging from glass defects with a high degree of accuracy, as recent studies have shown that it is impossible to completely avoid fogging during manufacturing. Summary of the invention

[0004] Provided herein are inspection systems and methods for improving defect detection of lyophilized protein therapeutics, including antibodies.

[0005] In certain embodiments, the inspection system disclosed herein can improve defect detection in freeze-dried pharmaceutical products by using complex machine learning algorithms. The inspection system can use an artificial neural network to train a machine learning model that classifies images of freeze-dried product vials. The inspection system can use transfer learning to reduce the number of samples required for machine learning model training. As an example and not a limitation, industrial samples of Herceptin (trastuzumab) products can be used to develop the inspection system. Once the inspection system is developed, it can collect images of vials to be inspected, classify the vials using a machine learning model, and return defective vials for further inspection while passing qualified vials.

[0006] In order to achieve the goal of applying machine learning algorithms to freeze-dried drug product inspection, there are some technical challenges. One technical challenge includes achieving very high accuracy, because not catching defective products may have a significant impact on patients. Another technical challenge is to ensure accurate identification of non-defective vials, because classifying clean vials as defective vials may lead to additional inspections, efficiency losses, increased costs, and potential delays. In fact, some commercially available automatic inspection systems have very low accuracy in glass defect detection, with a false detection rate of about 80%. The solution to the above challenges proposed by the embodiments disclosed herein is to use one or more specific architectures of machine learning algorithms, which results in high classification accuracy for clean or defective vials. Another technical challenge includes that since the defect rate of biopharmaceutical products is between 0.01%-1%, there is a lack of defective vial samples suitable for training machine learning algorithms. Therefore, a small representative defect library is artificially created for inspection training, which results in a highly unbalanced data set that is generally not suitable for training machine learning algorithms. The solution to the challenge of a small defect library proposed by the embodiments disclosed herein is to use transfer learning when training machine learning algorithms. Although this disclosure describes inspecting a particular product in a particular manner via a particular system, this disclosure contemplates inspecting any suitable product in any suitable manner via any suitable system. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 An example of a manual inspection process for a vial is shown.

[0008] Figure 2 An exemplary inspection environment for a manual inspection process of vials is shown.

[0009] Figure 3 An exemplary automated inspection system is shown.

[0010] Figure 4 An exemplary conventional CNN architecture for image classification is shown.

[0011] Figure 5 An exemplary container (such as a glass vial) containing a lyophilized protein therapeutic (such as an antibody) is shown.

[0012] Figure 6 An exemplary convolutional neural network (CNN) model with multiple input images acquired from two camera stations is shown.

[0013] Figure 7 An exemplary target training image of a vial of lyophilized protein therapeutic Herceptin (trastuzumab) is shown.

[0014] Figure 8 An exemplary image acquisition system is shown.

[0015] Fig. 9 An exemplary image from the MNIST dataset is shown.

[0016] Fig.10 Examples of glass defects including scratches are shown compared to fogging on the glass.

[0017] Fig.11 An exemplary CNN architecture for binary classification of glass defects is shown.

[0018] Fig.12 Shown are exemplary loss and accuracy for a target machine learning model trained for binary classification of glass defects from random weights.

[0019] Fig.13 An exemplary visualization of the activation function of a CNN for binary classification of glass defects is shown.

[0020] Fig.14 Shown are exemplary accuracy levels of a target machine learning model for binary classification of glass defects when the classification layer is trained based on transfer learning.

[0021] Fig.15 An example visualization of the activation functions of a CNN for binary classification of glass defects when using transfer learning is shown.

[0022] Fig.16 Example accuracy and loss of a target machine learning model trained for multi-class classification are shown.

[0023] Fig.17 An example of a computing system is shown. DETAILED DESCRIPTION

[0024] System Overview

[0025] Figure 3 An exemplary automated inspection system 300 is shown. Figure 3, the container of the drug product includes a vial. It can be seen that the workflow of the inspection system 300 may include: image acquisition of the vial; classification of the vial using a computer vision model; and then passing the qualified vial, while the defective vial may be returned for further inspection. During image acquisition, the inspection system 300 may use one or more optical camera sensors to obtain one or more query images. The one or more optical camera sensors may capture one or more query images for the drug product container from one or more angles, respectively. Then, the inspection system 300 may receive one or more query images associated with the drug product container. Each of the one or more query images may be based on a specific viewpoint of the drug product container. During vial classification, the inspection system 300 may perform two steps. First, the inspection system 300 may calculate one or more confidence scores associated with one or more defect indications, respectively, for the drug product container by processing the one or more query images using a target machine learning model. Second, the inspection system 300 may determine defect indications from the one or more defect indications, respectively, for the drug product container, based on a comparison between the one or more confidence scores and one or more predefined threshold scores.

[0026] Computer Vision Models

[0027] The computer vision model in the inspection system 300 may be based on a convolutional neural network. Convolutional neural networks are better suited for image classification than conventional artificial neural networks (ANNs). ANNs are made up of simple nodes (artificial neurons) that collectively learn complex nonlinear functions. Each node computes a weighted sum of its inputs and passes the result through a nonlinear "activation" function (e.g., a rectified linear function (f(z) = max(0, z))). Nodes are grouped into layers that do not share connections and can therefore be computed simultaneously. In a fully connected ANN, each node in a layer (l) includes all nodes in the previous layer (l-1) as input, and each node in a layer is an input to every node in the next layer (l+1). In contrast, in a convolutional neural network (CNN), each node is only locally connected and only learns local topics. Locally connected designs are naturally well suited for image classification because local groups of pixels in an image are often highly correlated, forming unique patterns that are easy to detect. Nodes share weights so that the same pattern is detected in different parts of the input image, effectively performing discrete convolutions, from which CNNs derive their name.

[0028] Figure 4 An exemplary conventional CNN architecture 400 for image classification is shown. Figure 4As shown, convolutional neural networks (CNNs) can automatically generate features for specific classification tasks with minimal human intervention. The resulting features are typically much more complex than manually generated features, giving CNNs powerful classification capabilities. When many convolutional layers are connected together to extract multiple layers of image features, CNNs can be additionally denoted as "deep." A typical CNN model architecture may involve pooling layers between convolutional layers. Pooling layers compress the feature representation of the previous layer by grouping pixels in neighborhoods of pre-specified size. The combined neighborhood can be represented by the maximum or average value of the related pixels. Although they reduce model dimensionality, pooling layers semantically merge features into one feature, thereby coarsening the location of each feature without losing too much detection ability. After an alternating sequence of convolutional layers (weighted sum and activation function) and pooling layers, the extracted features are passed to a fully connected ANN sub-model for image classification. As an example and not a limitation, Figure 4 The image classification architecture 400 shown in FIG. 4 may include two convolutional layers for feature generation and a fully connected layer for classification.

[0029] Defect detection using a conventional image classification architecture 400 may be ineffective. Therefore, one solution may be to use multiple images of each product vial 400 to detect defects at all possible locations. Automated inspection machines typically use multiple camera stations to take pictures to isolate the heel, body, shoulder, and neck of the vial. Many images may be collected from each camera station while the vial is rotated. Applying the conventional single image classification method described above would involve collecting these images from defective and non-defective vials. Each image would then need to be labeled for use as training data. However, the label should correspond to whether a defect can be seen in a particular image, regardless of whether the vial is defective. The higher level of classification accuracy of CNNs is attributed to the lack of manual feature engineering, but bias in manually labeling defective images can propagate to suboptimal features and model accuracy. As an example and not limitation, two similar images may be given two different labels (e.g., scratches that are barely visible from a particular angle), and the modeling process may attempt to distinguish the two images based on very subtle cues, a process that is prone to overfitting. To avoid the problem of overfitting, the embodiments disclosed herein use a new CNN architecture to train a computer vision model for defect detection. For more information, see " Model structure ” section.

[0030] Vial and through-hole defects

[0031] In certain embodiments, the container may be made of one or more materials. The one or more materials may include one or more of glass, plastic, waxed cardboard, biodegradable material, textile material, crystalline material, any suitable material, or any combination thereof. The container may be transparent, but need not be completely transparent so that the inspection system can detect visible defects in the container and / or the drug product (such as lyophilized protein or antibody). The container may include one or more of a lid, a seal, a stopper, a neck, a shoulder, a body, or a bottom. As an example and not limitation, the container may include a vial. Figure 5 An exemplary container (such as a glass vial 500) containing a lyophilized protein therapeutic (such as an antibody) is shown. Figure 5 As shown in , vial 500 includes a cap, seal, stopper, neck, shoulder, body and bottom, and is optionally filled with a lyophilized drug product as shown.

[0032] A vial 500 (also called a medicine bottle or a narrow-necked bottle) is a small glass or plastic container or bottle, typically used to store medication in liquid, powder, or capsule form. They are also used as scientific sample containers; for example, in automated sampling equipment in analytical chromatography. Glass containers similar to vials date back to ancient times; modern vials 500 are typically made of plastics such as polypropylene. There are different types of vials 500, such as single-dose vials 500 and multi-dose vials 500, which are often used for medication. Single-dose vials 500 are used only once, while multi-dose vials 500 can be used multiple times. The CDC sets specific guidelines for multi-dose vials 500. The vial 500 may be tubular or may have a bottle-like shape with a neck. The volume defined by the neck is called the headspace.

[0033] Modern vials 500 are usually made of plastic or sometimes glass. In medical or molecular biology applications, they are usually used as storage devices for storing small amounts of liquid. There are several different types of commonly used closure systems. For glass vials 500, options include screw vials 500 (closed with a screw cap or dropper / pipette), lipped vials 500 (closed with a cork or plastic stopper), and press-on vials 500 (closed with a rubber stopper and a metal cap). Plastic vials 500 that can be molded from plastic may have other closure systems, such as "hinged lids" that can be quickly closed when pressed. These are sometimes called flip or snap lids. Unlike test tubes that usually have a round bottom, the bottom of the vial 500 is usually flat, but this is not the case for small hinged or flip-top vials 500. The vial-shaped vials 500 commonly used in laboratories are also called bijou or McCartney bottles. Bijou bottles tend to be smaller, usually with a capacity of about 10 ml.

[0034] In a particular embodiment, the defect indication may include one or more of a critical defect, a major defect, or a minor defect. Each of the one or more predefined threshold scores may be determined based on a reception quality limit associated with the defect indication. As an example and not limitation, the reception quality limit associated with a critical defect may be 0.1, which may determine a specific predetermined threshold score for determining whether the defect is a critical defect. As another example and not limitation, the reception quality limit associated with a major defect may be 0.4, which may determine another specific predetermined threshold score for determining whether the defect is a major defect. As another example and not limitation, the reception quality limit associated with a minor defect may be 1.0, which may determine another specific predetermined threshold score for determining whether the defect is a minor defect.

[0035] In a particular embodiment, the inspection system 300 may train different target machine learning models corresponding to different types of defects. The target machine learning model may be a binary classification model or a multi-class classification model. As an example and not limitation, the inspection system 300 may train a target machine learning model to detect critical defects, which may be a binary classification model. For this model, the inspection system 300 may train the target machine learning model using training images labeled as critical defects and non-critical defects. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect major defects, which may be a binary classification model. For this model, the inspection system 300 may train the target machine learning model using training images labeled as major defects and non-major defects. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect minor defects, which may be a binary classification model. For this model, the inspection system 300 may train the target machine learning model using training images labeled as minor defects and non-minor defects. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect one or more of critical defects, major defects, minor defects, or any combination thereof. When the target machine learning model detects one of two types of defects (e.g., critical defects and minor defects), it can be a binary classification model. When the target machine learning model detects one of more than two types of defects (e.g., critical defects, major defects, and minor defects), it can be a multi-class classification model. For a multi-class classification model, the inspection system 300 can train the target machine learning model using training images labeled with multiple types of defects.

[0036] In certain embodiments, critical defects may include one or more of glass defects, closure defects, stopper defects, fill volume defects, or critical particles. Glass defects may further include one or more of cracks, neck cracks, bottle head gaps, or other impact cracks. As an example and not limitation, a glass crack defect may indicate a complete crack or discontinuity on the surface of the vial 500. As another example and not limitation, a neck crack may indicate a refractive fracture that penetrates the glass wall of the neck of the glass vial 500. As another example and not limitation, a bottle head gap may be a gap in the bottle head extending from the outside of the vial 500 to the inside of the vial 500. Closure defects may further include one or more of missing seals, non-crimping, stopper exposure (seal folding), or sealed edges. As an example and not limitation, non-crimping may indicate that there is a seal, but it is not crimped or fixed along the lip / edge circumference of the entire vial 500, and can be completely lifted from the vial 500. As another example and not limitation, a seal edge may indicate a deep cut / crack in the side of the seal edge causing the cap to be visibly loose, or any deep cut / crack in the side of the seal edge accompanied by any visible glass damage. A fill volume defect may include an underfill indicating a fill volume that is significantly outside of range. Critical particles may further include one or more of specks, fibers, or loose glass that are visible to the naked eye.

[0037] Based on the different types of critical defects as described above, the inspection system 300 may train different target machine learning models. The target machine learning model may be a binary classification model or a multi-class classification model. As an example and not limitation, the inspection system 300 may train a target machine learning model to detect glass defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as glass defects and non-glass defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect plug defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as plug defects and non-plug defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect glass break defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as glass break defects and non-glass break defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect one or more of: glass defects, closure defects, stopper defects, fill volume defects, critical particles, cracks, neck cracks, bottle head nicks, other cracks, missing seals, uncrimped connections, stopper exposure (seal folds), seal edges, low fill, spots, fibers, loose glass, or any combination thereof. When the target machine learning model detects one of two types of defects (e.g., glass defects and stopper defects), it may be a binary classification model. When the target machine learning model detects one of more than two types of defects (e.g., closure defects, fill volume defects, and critical particles), it may be a multi-class classification model. For a multi-class classification model, the inspection system 300 may train the target machine learning model using training images labeled with multiple types of defects.

[0038] In certain embodiments, the primary defect may include one or more of a glass defect, a closure defect, or a fill volume defect. Glass defects may further include one or more of bubbles / pores, internal sintering / spiticules, or gaps. As an example and not limitation, bubbles / pores may contain single or multiple gaseous (embedded) inclusions (i.e., greater than 1.5 mm), which are generally spherical unless deformed during forming. Bubbles may be completely enclosed in the glass, while pores may be open to the inner or outer surface of the vial 500. As another example and not limitation, internal sintering / spiticules may represent glass fragments (e.g., beads or threads) attached to the surface of the vial interior 500. As another example and not limitation, a gap may represent a vial 500 with a disconnected portion or fragment, wherein the defect does not fully extend between the exterior of the vial 500 and the interior of the vial 500 (it does not expose the interior of the vial 500 to the external environment). Closure defects may also include one or more of cap flipping, partial crimping, or primary sealing edges. As an example and not limitation, a cap flip may indicate a cap is missing, i.e., completely separated from the vial 500. As another example and not limitation, a partial crimp may indicate an incomplete crimp that allows the seal to rotate or loosen. As another example and not limitation, a primary seal edge may indicate a deep cut / crack on the side of the seal edge that does not cause the cap to loosen significantly and does not exhibit any associated visible glass damage. A fill volume defect may include an empty vial 500.

[0039] Based on the different types of major defects as described above, the inspection system 300 may train different target machine learning models. The target machine learning model may be a binary classification model or a multi-class classification model. As an example and not limitation, the inspection system 300 may train a target machine learning model to detect closed defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as closed defects and non-closed defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect filling volume, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as filling volume defects and non-filling volume defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect bubbles / pores, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as bubbles / pores and non-bubbles / pores to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect one or more of: glass defects, closure defects, fill volume defects, bubbles / pores, internal frit / beading, nicks, cap flips, partial crimps, primary seal edges, empty vials, or any combination thereof. When the target machine learning model detects one of two types of defects (e.g., glass defects and closure defects), it may be a binary classification model. When the target machine learning model detects one of more than two types of defects (e.g., glass defects, closure defects, and fill volume defects), it may be a multi-class classification model. For a multi-class classification model, the inspection system 300 may train the target machine learning model using training images labeled with multiple types of defects.

[0040] In certain embodiments, minor defects may include one or more of glass defects, closure defects, or stopper defects. Glass defects may further include one or more of the following: impact cracks, scratches / abrasion, surface contamination (e.g., foreign body vial 500 surface), stones / inclusions, bubble lines, cracks / thermal cracks (e.g., surface microcracks), deformation, sintering / bottom adhesion / wrinkles, or bubbles / pores. As an example and not limitation, surface contamination may indicate the presence of unknown substances on the outside of the vial 500 surface. As another example and not limitation, stones / inclusions may indicate opaque or transparent inclusions in the glass greater than 1 mm, which may be partially unmelted raw materials, furnace refractory materials, or microcrystalline glass. As another example and not limitation, bubble lines may indicate elongated gaseous inclusions that appear as vertical lines greater than 0.25 mm wide. As another example and not limitation, cracks / thermal cracks may indicate discontinuities in the glass surface or vertical cracks in the bottle head or neck. As another example and not limitation, frit / bottom adhesion / wrinkles may indicate glass fragments, threads, folds or overlaps of glass attached to the outer surface of the vial 500, the head area, the neck, the heel or the bottom. Closure defects may further include one or more of bend / dent defects, discoloration, seal / crimp appearance defects (e.g., stress marks on the seal), or a damaged cap. As an example and not limitation, bend / dent defects may indicate that the seal is bent or deformed from its straight or uniform state. Stopper defects may further include one or more of deformation / running glue / sag defects, discoloration, or particulate matter. As an example and not limitation, deformation / running glue / sag defects may indicate a deformed or out-of-shape state, for example, rubber crumbs hanging from the stopper. As another example and not limitation, particulate matter may indicate that the stopper has any embedded particles that appear to be three-dimensional, protruding, or on the surface of the stopper.

[0041] Based on the different types of minor defects as described above, the inspection system 300 may train different target machine learning models. The target machine learning model may be a binary classification model or a multi-class classification model. As an example and not limitation, the inspection system 300 may train a target machine learning model to detect glass defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as glass defects and non-glass defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect plug defects, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as plug defects and non-plug defects to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect impact cracks, which may be a binary classification model. For this model, the inspection system 300 may use training images labeled as impact cracks and no impact cracks to train the target machine learning model. As another example and not limitation, the inspection system 300 may train a target machine learning model to detect glass defects, closure defects, plug defects, impact cracks, scratches / abrasion, surface contamination, stones / inclusions, bubble lines, cracks / thermal cracks, deformation, fusion / bottom adhesion / wrinkles, bubbles / pores, bend / dent defects, discoloration, seal / crimp appearance defects, damaged caps, deformation / bleeding glue / sag defects, discoloration, particulate matter, or any combination thereof. When the target machine learning model detects one of two types of defects (e.g., impact cracks and surface contamination), it may be a binary classification model. When the target machine learning model detects one of more than two types of defects (e.g., bubbles / pores, bend / dent defects, and discoloration), it may be a multi-class classification model. For a multi-class classification model, the inspection system 300 may train the target machine learning model using training images labeled with multiple types of defects.

[0042] Exemplary product in vial

[0043] In a particular embodiment, the drug product may include a lyophilized product. The lyophilized product may be associated with one or more product attributes. Each product attribute may be a physical form factor, color, transparency, viscosity, or fill volume. As an example and not limitation, the physical form factor may include a cake form factor, a powder form factor, a concentrated liquid / syrup form factor, any suitable form factor, or any combination thereof. The critical defect of the lyophilized product may include one or more of a cake appearance defect or a fill volume defect. The cake appearance defect may further include one or more of a melt-back, an extremely shrunken cake, an unfreeze-dried cake, or a discoloration. As an example and not limitation, melt-back may indicate that the product cake is partially dissolved in the trapped water, resulting in a hollow bag that is usually seen at the bottom center of the vial 500. As another example and not limitation, an extremely shrunken cake may indicate that the cake may be completely dissolved, leaving a visual appearance of a viscous (potentially sticky) or glassy substance at the bottom of the vial 500 or in the cake. Fill volume defects may further include one or more of high filling or low filling. The major defects of the lyophilized product may include cake appearance defects, which include one or more of extreme product splashing, tilted cake or shrunken cake. As an example and not limitation, extreme product splashing may indicate that the product has splashed on the stopper before freeze drying and drying. As another example and not limitation, the cake tilt may indicate that the cake surface is angled due to the tilting of the vial 500 during the freeze drying process. As another example and not limitation, the shrunken cake may indicate the formation of atypical cakes pulled out from the wall of the vial 500. The minor defects of the lyophilized product may include cake appearance defects, which include one or more of cake horizontal splitting, broken cake or product splashing. As an example and not limitation, the horizontal splitting of the cake may indicate that the top of the cake is separated / split from the bottom of the cake. As another example and not limitation, product splashing may indicate that there is product splashing (only on the glass) on the neck of the vial 500.

[0044] Overview of target machine learning model

[0045] The inspection system 300 may use a target machine learning model to detect defects. The target machine learning model may be trained offline. As an example and not limitation, the target machine learning model may be based on a convolutional neural network. At runtime, when the inspection system receives one or more query images associated with a container of a pharmaceutical product, the inspection system may pass them to the target machine learning model. The target machine learning model may calculate one or more confidence scores associated with one or more defect indications of the one or more query images. The calculation may include the following steps. A first step may be to generate one or more feature representations of the one or more query images by processing the one or more query images using the target machine learning model. A second step may be to calculate one or more confidence scores associated with the one or more defect indications based on a relationship between feature representations of a plurality of target training images and a plurality of defect indications or one or more of the generated one or more feature representations of the one or more query images. The target machine learning model further provides the calculated confidence scores to the inspection system 300. Based on such confidence scores, the inspection system 300 may classify the query image as a predefined defect (e.g., a glass defect).

[0046] Model structure

[0047] As previously mentioned, defect detection using a conventional CNN architecture may be ineffective. Therefore, the inspection system 300 as disclosed herein may use a CNN architecture based on multiple input images associated with each pharmaceutical product container. First, the inspection system 300 may obtain multiple target training images using one or more optical camera sensors. The one or more optical camera sensors may capture one or more images of the selected product from one or more angles, respectively. Then, the inspection system 300 may divide the multiple target training images into one or more target training image groups. The one or more groups may be associated with one or more camera sensors, respectively. Then, the inspection system 300 may generate one or more feature representation groups for the one or more target training image groups associated with the corresponding camera sensors, respectively. In other words, the same features may be extracted for images collected from the same camera (at different angles). Then, the inspection system 300 may learn one or more sub-models based on the one or more feature representation groups, respectively. The inspection system 300 may further integrate the one or more sub-models to generate a target machine learning model. In a specific embodiment, the target machine learning model may be based on a convolutional neural network including multiple layers. Accordingly, generating one or more feature representation groups for one or more target training image groups associated with the corresponding camera sensors, respectively, may include the following steps. First, the inspection system 300 may divide a plurality of layers into one or more layer groups corresponding to one or more camera sensors, respectively. Then, the inspection system 300 may process one or more target training image groups associated with the corresponding camera sensors through the one or more layer groups. Figure 6 An exemplary convolutional neural network (CNN) model 600 with multiple input images acquired from two camera stations is shown. The inspection system 300 may use a shared convolutional model that includes one or more convolutional layers per camera station. Figure 6 As shown in , images captured from a first camera station may be processed by a first convolutional layer group (e.g., layer 1a and layer 1b). This process may result in feature representations of the images captured by the first camera station, which are further aggregated. The first convolutional layer group may form the basis of a first sub-model of a target machine learning model. Similar observations may be made for images captured by a second camera station, which are processed by a second sub-model comprising a second convolutional layer group. This process may result in feature representations of the images captured by the second camera station, which are further aggregated. The accumulated feature representations from the respective sub-models are then integrated by vectorization. Based on the final vectorized features, a classification model, i.e., a target machine learning model, may be learned.

[0048] Model Training

[0049] Figure 7An exemplary target training image of a vial 500 of the freeze-dried protein therapeutic Herceptin (trastuzumab) is shown. Herceptin may be a representative freeze-dried drug product. Since a typical batch of freeze-dried products exhibits only a few types of defects, it may take years to build a complete defect library from manufacturing defects. Defects can be artificially introduced into drug product vials 500 (such as Herceptin) to create a library of representative defects, including different severity and locations of each defect type. Although this sounds simple, sensitive drug product cakes make the creation of drug defects non-trivial. In the case of glass defects, cracking the vial 500 by temperature shock can cause the freeze-dried cake to melt, while cracking the vial 500 by mechanical force can cause the cake to shrink by exposure to external moisture. In the case of contamination defects, new vials 500 must be filled with the contained contaminants, and the contamination must be visible on the surface of subsequent product cakes.

[0050] Due to the challenges noted above and the expensive nature of products in the biotechnology industry, a limited sample of defective product vials 500 were available. A 15cc Herceptin vial 500 (150 mg) is small and costs approximately $1500 each; a 440 mg Herceptin vial 500 may cost over $4000 each. In total, 57 vials 500 with glass defects (cracks, scratches, and impact cracks) were available, and 39 vials 500 with contamination (particulate matter or surface contamination) were available. 96 non-defective vials 500 were also included in the dataset to provide a total of 192 vials 500, half of which were defective and half were non-defective. For comparison, the vials 500 were inspected by 10 inspectors as part of the routine inspection process.

[0051] The inspection system 300 may use one or more optical camera sensors to obtain a plurality of target training images. The one or more optical camera sensors may capture one or more images of the selected product from one or more angles, respectively. When the selected product is a container of a freeze-dried product, the freeze-dried product may be visible inside the container in at least one target training image. Figure 8 An exemplary image acquisition system 800 is shown. By way of example and not limitation, the image acquisition system 800 may include a benchtop Seidenader V 90-T. Each vial 500 in the data set is loaded into a benchtop Seidenader V 90-T, which facilitates manual visual inspection of the container by rotating the sample using a gear drive motor. Images may be acquired from a variety of angles so that the entire vial 500 may be inspected for defects for image-based inspection. 112 images were taken of each vial 500, including 28 sets of 4 images, 90 degrees apart. The acquired images were cropped around the product vial 400 and compressed to a resolution of 460x160 pixels.

[0052] In certain embodiments, the model architecture may be created based on open source code, and the models may be trained using an open source backend. Training a CNN may represent a supervised machine learning problem, in which a machine attempts to learn rules to classify new images given a set of images and their corresponding labels. In order to train a CNN model to distinguish images of defective vials 500 from images of normal vials 500, the algorithm may be shown many images of defective vials 500 and many images of normal vials 500, with the goal of learning the category that best predicts new images. "Learning a model" may refer to calculating the values ​​of the millions of weights / parameters involved in a CNN for a given classification problem. The weights / parameters may include weights / parameters for convolutional layers and fully connected layers. An objective function or loss function may be defined to quantify the performance of the trained model. Cross entropy may be selected as the loss function for classification. As an example and not limitation, the loss function may be expressed as N may indicate the number of samples. C may indicate the number of possible categories. It can be an indicator function indicating whether sample i is in category c. P(y=c) can be the predicted probability that sample i is in category c. The loss function can be defined to increase as the model error increases, and a gradient-based optimization algorithm can be used to iteratively reduce the loss function. In order to appropriately adjust the model weights at each iteration, the algorithm can calculate the gradient of the loss function for each model weight. The weight vector can then be adjusted in the opposite direction of the gradient vector in a manner different from the algorithm.

[0053] The training of ANNs and CNNs can be based on stochastic gradient descent (SGD). The main principles may include using only a few examples to calculate the loss function, finding the associated gradient (using backpropagation), and adjusting the weights according to the average gradient. To prevent overfitting the training data or a particular batch, regularization may be used to penalize high neuron weights. Additional strategies may include dropout, in which a certain percentage of nodes are randomly excluded from the neural network during training. This exclusion ensures that most of the classification power comes from the aggregation of nodes, rather than being controlled by a few nodes. Importantly, a set of data (called test data) is excluded from the training examples. The final model can be tested on the test data to measure the generalization ability of the learned model.

[0054] As mentioned above, it is difficult to collect enough samples of defective vials 500. Therefore, the inspection system 300 can use transfer learning to address the challenge of lack of training defect data. As disclosed herein, training a target machine learning model based on an auxiliary machine learning model can be referred to as transfer learning. A conventional deep CNN can learn features similar to Gabor filters and color spots in its first layer. Lower-level features such as these tend to be general features applicable to many data sets and tasks, while higher-level features tend to be very specific to the tasks for which they are trained. Due to this property, the use of transfer learning can significantly reduce the size of the data set required to train a CNN with good generalization capabilities. Transfer learning refers to training a "base" / "auxiliary" CNN on a first / auxiliary data set and task, and then migrating the learned features to a second "target" data set and task. It has been shown that this process can train a large CNN on a target data set without overfitting using a significantly larger base / auxiliary data set. In addition, previous studies have reported that even when the base / auxiliary data set and the target data set are very different, the generalization ability of the model is greatly improved by transfer learning (compared to random initialization).

[0055] In certain embodiments, the inspection system 300 can use transfer learning by training a base / auxiliary CNN and using the weights learned from the n bottom layers as the n first layers of the target CNN. Then, a standard optimization process can be applied to learn the remaining layers of the target network starting from random initialization. During the learning process, the weights of the transferred layers can be kept constant or "frozen". By way of example and not limitation, a convolutional model learned from a different task can be used to train Figure 4 After training the high-level features, all model parameters can be further improved, a process called fine-tuning.

[0056] The auxiliary machine learning model may be trained based on a plurality of auxiliary training samples, the plurality of auxiliary training samples respectively comprising a plurality of auxiliary training images and a plurality of content categories associated with the plurality of auxiliary training images. The plurality of content categories associated with the plurality of auxiliary training images may not match a plurality of defect indications associated with the plurality of target training images. As an example and not limitation, the plurality of content categories may include a plurality of handwritten digits. For example, a base / auxiliary machine learning model having the same model architecture may be trained on the MNIST dataset. The MNIST dataset is a public dataset that contains 70,000 handwritten digits belonging to 10 categories. Fig. 9 An exemplary image of the MNIST dataset 900 is shown. Fig. 9 As can be seen, the classification of digits in the MNIST dataset is a very different task from the target task of classifying vials of lyophilized products 500.

[0057] In summary, the inspection system 300 may train a target machine learning model based on transfer learning using the following process. First, the inspection system 300 may access multiple target training samples. The target training samples may include multiple target training images that are respectively associated with containers of pharmaceutical products and multiple defect indications associated with the multiple target training images. Then, the inspection system 300 may select multiple auxiliary training samples based on the target training samples. The auxiliary training samples may respectively include multiple auxiliary training images and multiple content categories associated with the multiple auxiliary training images. Then, the inspection system 300 may train the target machine learning model. The training may include: training the auxiliary machine learning model based on multiple auxiliary training samples; generating feature representations of multiple target training images based on the auxiliary machine learning model; and learning the relationship between the feature representations of multiple target training images and multiple defect indications based on the generated feature representations and multiple defect indications.

[0058] Example inspection of glass defects

[0059] The performance of the inspection system 300 was tested through a binary classification task to investigate the ability of the CNN to detect glass defects with high accuracy even when the target training dataset is small. Fig.10 Examples of glass defects including scratches are shown in Figure 1 compared to fogging on the glass. Fig.10 As shown in , the three vials 500 on the left have scratches, which are circled. In contrast, the two vials 500 on the right have fogging on the glass, which are circled. The comparison shows that scratches are difficult to detect, which may cause the most errors in automatic inspection. As an example and not a limitation, when the glass is fogged, a false rejection rate of up to 90% may occur for other existing automatic inspection methods. The data is divided into multiple samples, each with four images, on which a CNN with multiple inputs is trained. Fig.11 An exemplary CNN architecture 1100 for binary classification of glass defects is shown. Fig.11 As shown in , there may be four input images, each representing an image of a vial 500, which are 90 degrees apart. The target machine learning model may include 1,834,417 trainable parameters. There are 2550 samples (each with four images) used as training data, and there are 300 samples used as validation data. The samples from the validation data are collected from product vials 500 that do not exist in the target training data set, which may better test the generalization ability of the model. Cross entropy is selected as the loss function, and stochastic gradient descent is used to train a CNN with a batch size of 30. The weights of the L1-norm and L2-norm regularization terms are both 0.001.

[0060] Fig.12Figure 2 shows an example loss and accuracy of a target machine learning model trained for binary classification of glass defects from random weights. Fig.12 As shown in Figure 2, the loss and accuracy found when training the model are associated with 40 epochs. Fig.12 The loss is shown to decrease steadily in both the target training and validation data, indicating that adequate hyperparameters were chosen for the optimization process. However, the accuracy levels between the two differ greatly. Specifically, the classification accuracy on the validation data stabilizes at approximately 83%, while the accuracy on the target training data increases to approximately 95%. The difference in the two accuracy levels may indicate that the model is overfitting the target training data and is unable to generalize to new data.

[0061] Fig.13 An exemplary visualization of the activation function of a CNN for binary classification of glass defects is shown. Plotting the output of the activation function for each node can reveal where in the sample image the node has found its learned features. Therefore, such a plot can allow inference of the learned features of each node. Fig.13 As shown in Figure 2, the activation functions come from the 16 first-layer nodes (top) and 32 second-layer nodes (bottom) of the learned model. Fig.13 As can be seen in the figure, there are several obvious "dead" nodes, which are never activated. This is a common phenomenon when training CNNs using stochastic gradient descent, and previous research has shown that up to 50% of the nodes may die. In certain embodiments, most feature extraction may occur in only a few nodes, while most other nodes simply pass the image through unprocessed. This is particularly true in the first layer of nodes ( Fig.13 This is especially evident in the top subgraph of , where the outputs of most nodes are almost identical to the original image.

[0062] Fig.14 An exemplary accuracy level of the target machine learning model for binary classification of glass defects is shown when the classification layer is trained based on transfer learning. The transfer learning is based on the MNIST dataset. The three convolutional layers learned from training on the MNIST dataset are frozen, and the fully connected classification layer is trained. No regularization weights are used, but the same optimization algorithm and batch size are used. The accuracy level is associated with 25 epochs. Fig.14 As can be seen in the figure, even after learning lower-level features from the MNIST dataset, the classification accuracy of the target training data remains relatively unchanged. This may indicate that the lower-level functions are general and can still be used to learn competent classifiers for very different tasks. In addition, with transfer learning, the classification accuracy on the validation data is higher, indicating that the model is able to generalize better.

[0063] Fig.15An exemplary visualization of the activation function of a CNN for binary classification of glass defects when using transfer learning is shown. Specifically, the left portion shows the first layer nodes of the CNN learned using transfer learning, while the right portion shows the second layer nodes of the CNN learned using transfer learning. Fig.15 As can be seen in the figure, the new CNN has fewer "dead" nodes and none in the second layer. Compared with the previous model where many nodes just output the same input image, more features can be extracted. The layers learned on the MNIST dataset and applied to the target task may be reminiscent of the Canny edge detector and other standard image processing techniques. Such basic image themes may be common to all images, which may be the main reason for the improved generalization ability of the model.

[0064] Fig.16 Figure 1 shows an example accuracy and loss of a target machine learning model trained for multi-class classification. The same target machine learning model is trained on a dataset divided into three categories for multi-class classification. The three categories include no defects, glass defects, and contamination. Fig.16 The left side shows the accuracy level of the classification layer after training for 35 epochs. Fig.16 The loss is shown on the right in Figure 1. It can be seen that the loss on the training data decreases, reaches a plateau, and then decreases dramatically again. This behavior may be attributed to the random method used to regress the neural network model parameters. The training accuracy and loss function do not reflect the performance of the model on the validation data. The validation loss stops decreasing after about 6 epochs (about 60% accuracy), after which the model overfits the training data. This may mean that significantly more training data is needed to fit a three-class model that generalizes to new data.

[0065] The rejection rate further verifies the performance of the target machine learning model. According to the experiment, the rejection rate varies according to the threshold set in the classification. More specifically, the result of the binary classification will be the probability of glass defects ranging from 0 to 1. Therefore, a threshold can be used to balance the rejection rate and the rejection rate. According to the current results, assuming that the actual defect rate varies between 0.02% and 0.2%, the rejection rate is less than 8%. Compared with the original number (about 80%), the target machine learning model has made significant improvements.

[0066] System and method

[0067] Fig.17An exemplary computer system 1700 is shown. In particular embodiments, one or more computer systems 1700 perform one or more steps of one or more methods described or illustrated herein. In particular embodiments, one or more computer systems 1700 provide functionality described or illustrated herein. In particular embodiments, software running on one or more computer systems 1700 performs one or more steps of one or more methods described or illustrated herein, or provides functionality described or illustrated herein. Particular embodiments include one or more portions of one or more computer systems 1700. Herein, references to computer systems may include computing devices and vice versa, where appropriate. Furthermore, references to computer systems may include one or more computer systems, where appropriate.

[0068] The present disclosure contemplates any suitable number of computer systems 1700. The present disclosure contemplates computer systems 1700 in any suitable physical form. By way of example and not limitation, computer system 1700 may be an embedded computer system, a system on a chip (SOC), a single board computer system (SBC) (such as, for example, a computer on a module (COM) or a system on a module (SOM)), a desktop computer system, a laptop or notebook computer system, an interactive kiosk, a mainframe, a computer system grid, a mobile phone, a personal digital assistant (PDA), a server, a tablet computer system, or a combination of two or more thereof. Where appropriate, computer system 1700 may include one or more computer systems 1700; may be integrated or distributed; may span multiple locations; may span multiple machines; may span multiple data centers; or may reside in a cloud, which may include one or more cloud components in one or more networks. Where appropriate, one or more computer systems 1700 may perform one or more steps of one or more methods described or illustrated herein without substantial spatial or temporal limitations. As an example and not limitation, one or more computer systems 1700 may perform one or more steps of one or more methods described or illustrated herein in real time or in batch mode. Where appropriate, one or more computer systems 1700 may perform one or more steps of one or more methods described or illustrated herein at different times or at different locations.

[0069] In a particular embodiment, computer system 1700 includes a processor 1702, a memory 1704, a storage device 1706, an input / output (I / O) interface 1708, a communication interface 1710, and a bus 1712. Although this disclosure describes and illustrates a particular computer system having particular numbers of particular components in a particular arrangement, this disclosure contemplates any suitable computer system having any suitable numbers of any suitable components in any suitable arrangement.

[0070] In a particular embodiment, the processor 1702 includes hardware for executing instructions, such as those that constitute a computer program. By way of example and not limitation, to execute instructions, the processor 1702 may retrieve (or fetch) instructions from an internal register, an internal cache, memory 1704, or storage 1706; may decode and execute these instructions; and may then write one or more results to an internal register, an internal cache, memory 1704, or storage 1706. In a particular embodiment, the processor 1702 may include one or more internal caches for data, instructions, or addresses. Where appropriate, the present disclosure contemplates a processor 1702 that includes any suitable number of any suitable internal caches. By way of example and not limitation, the processor 1702 may include one or more instruction caches, one or more data caches, and one or more translation lookaside buffers (TLBs). The instructions in the instruction cache may be copies of the instructions in the memory 1704 or storage 1706, and the instruction cache may speed up the retrieval of those instructions by the processor 1702. The data in the data cache may be: a copy of the data in the memory 1704 or storage device 1706 for operation by instructions executed at the processor 1702; the result of the previous instruction executed at the processor 1702 for access or writing to the memory 1704 or storage device 1706 by subsequent instructions executed at the processor 1702; or other suitable data. The data cache may speed up the read or write operation of the processor 1702. The TLB may speed up the virtual address translation of the processor 1702. In a particular embodiment, the processor 1702 may include one or more internal registers for data, instructions, or addresses. Where appropriate, the present disclosure contemplates a processor 1702 including any suitable number of any suitable internal registers. Where appropriate, the processor 1702 may include one or more arithmetic logic units (ALUs); may be a multi-core processor; or may include one or more processors 1702. Although the present disclosure describes and illustrates a particular processor, the present disclosure contemplates any suitable processor.

[0071] In a particular embodiment, the memory 1704 includes a main memory for storing instructions for the processor 1702 to execute or data for the processor 1702 to operate on. By way of example and not limitation, the computer system 1700 may load instructions from the storage device 1706 or another source (such as, for example, another computer system 1700) into the memory 1704. The processor 1702 may then load the instructions from the memory 1704 into an internal register or an internal cache. To execute the instructions, the processor 1702 may retrieve the instructions from the internal register or the internal cache and decode them. During or after the execution of the instructions, the processor 1702 may write one or more results (which may be intermediate results or final results) to the internal register or the internal cache. The processor 1702 may then write one or more of those results to the memory 1704. In a particular embodiment, the processor 1702 executes only instructions in one or more internal registers or internal caches or in the memory 1704 (rather than the storage device 1706 or elsewhere), and operates only on data in one or more internal registers or internal caches or in the memory 1704 (rather than the storage device 1706 or elsewhere). One or more memory buses (which may each include an address bus and a data bus) may couple the processor 1702 to the memory 1704. The bus 1712 may include one or more memory buses, as described below. In a particular embodiment, one or more memory management units (MMUs) reside between the processor 1702 and the memory 1704 and facilitate access to the memory 1704 requested by the processor 1702. In a particular embodiment, the memory 1704 includes a random access memory (RAM). Where appropriate, the RAM may be a volatile memory. Where appropriate, the RAM may be a dynamic RAM (DRAM) or a static RAM (SRAM). In addition, where appropriate, the RAM may be a single-port or multi-port RAM. The present disclosure contemplates any suitable RAM. Where appropriate, memory 1704 may include one or more memories 1704. Although this disclosure describes and illustrates particular memories, this disclosure contemplates any suitable memories.

[0072] In a particular embodiment, the storage device 1706 includes a mass storage device for data or instructions. By way of example and not limitation, the storage device 1706 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more thereof. Where appropriate, the storage device 1706 may include a removable or non-removable (or fixed) medium. Where appropriate, the storage device 1706 may be inside or outside the computer system 1700. In a particular embodiment, the storage device 1706 is a non-volatile solid-state memory. In a particular embodiment, the storage device 1706 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more thereof. The present disclosure contemplates a mass storage device 1706 in any suitable physical form. Where appropriate, storage 1706 may include one or more memory control units that facilitate communications between processor 1702 and storage 1706. Where appropriate, storage 1706 may include one or more storage devices 1706. Although this disclosure describes and illustrates particular storage devices, this disclosure contemplates any suitable storage devices.

[0073] In a particular embodiment, I / O interface 1708 includes hardware, software, or both, which provides one or more interfaces for communicating between computer system 1700 and one or more I / O devices. Where appropriate, computer system 1700 may include one or more of these I / O devices. One or more of these I / O devices can enable communication between a person and computer system 1700. As an example and not limitation, an I / O device may include a keyboard, a keypad, a microphone, a monitor, a mouse, a printer, a scanner, a speaker, a still camera, a stylus, a tablet computer, a touch screen, a trackball, a camera, another suitable I / O device, or a combination of two or more thereof. An I / O device may include one or more sensors. The present disclosure contemplates any suitable I / O device and any suitable I / O interface 1708 for them. Where appropriate, I / O interface 1708 may include one or more device or software drivers so that processor 1702 can drive one or more of these I / O devices. Where appropriate, I / O interface 1708 may include one or more I / O interfaces 1708. Although this disclosure describes and illustrates a particular I / O interface, this disclosure contemplates any suitable I / O interface.

[0074] In a particular embodiment, the communication interface 1710 includes hardware, software, or both that provides one or more interfaces for communication (such as, for example, packet-based communication) between the computer system 1700 and one or more other computer systems 1700 or one or more networks. By way of example and not limitation, the communication interface 1710 may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or other wire-based network, or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network (such as a WI-FI network). The present disclosure contemplates any suitable network and any suitable communication interface 1710 for it. By way of example and not limitation, the computer system 1700 may communicate with one or more parts of an ad hoc network, a personal area network (PAN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or the Internet, or a combination of two or more thereof. One or more parts of one or more of these networks may be wired or wireless. As an example, the computer system 1700 may be connected to a wireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAX network, a cellular telephone network (such as, for example, a Global System for Mobile Communications (GSM) network), or other suitable wireless networks, or a combination of two or more thereof. Where appropriate, the computer system 1700 may include any suitable communication interface 1710 for any of these networks. Where appropriate, the communication interface 1710 may include one or more communication interfaces 1710. Although the present disclosure describes and illustrates particular communication interfaces, the present disclosure encompasses any suitable communication interface.

[0075] In certain embodiments, bus 1712 includes hardware, software, or two mutually coupled components of computer system 1700. By way of example and not limitation, bus 1712 may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an INFINIBAND interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCIe) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus, or another suitable bus or a combination of two or more thereof. Where appropriate, bus 1712 may include one or more buses 1712. Although this disclosure describes and illustrates a particular bus, this disclosure contemplates any suitable bus.

[0076] Herein, one or more computer-readable non-transitory storage media may include one or more semiconductor-based or other integrated circuits (ICs) (such as, for example, field programmable gate arrays (FPGAs) or application-specific ICs (ASICs)), hard disk drives (HDDs), hybrid hard disk drives (HHDs), optical disks, optical disk drives (ODDs), magneto-optical disks, magneto-optical disk drives, floppy disks, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM drives, SECURE DIGITAL cards or drives, any other suitable computer-readable non-transitory storage media, or any suitable combination of two or more thereof. Where appropriate, the computer-readable non-transitory storage medium may be a volatile storage medium, a non-volatile storage medium, or a combination of a volatile storage medium and a non-volatile storage medium.

[0077] Miscellaneous

[0078] As used herein, "or" is inclusive and not exclusive, unless expressly stated otherwise or the context indicates otherwise. Thus, as used herein, "A or B" means "A, B, or both," unless expressly stated otherwise or the context indicates otherwise. Furthermore, as used herein, "and" means both jointly and severally, unless expressly stated otherwise or the context indicates otherwise. Thus, as used herein, "A and B" means "A and B, jointly or severally," unless expressly stated otherwise or the context indicates otherwise.

[0079] The scope of the present disclosure covers all changes, substitutions, variations, alterations and modifications to the exemplary embodiments described or shown herein that will be understood by those of ordinary skill in the art. The scope of the present disclosure is not limited to the exemplary embodiments described or shown herein. In addition, although the present disclosure describes and illustrates the corresponding embodiments herein as including specific parts, elements, features, functions, operations or steps, any of these embodiments may include any combination or arrangement of any parts, elements, features, functions, operations or steps described or shown anywhere herein that will be understood by those of ordinary skill in the art. In addition, in the appended claims, references to devices or systems or parts of devices or systems adapted to, arranged to, capable of, configured to, enabled to, operable to or operated to perform specific functions, cover the device, system, component, whether or not it or the specific function is activated, turned on or unlocked, as long as the device, system or component is so adapted, arranged, capable of, configured to, enabled to, operable or operated. In addition, although the present disclosure describes or illustrates specific embodiments as providing specific advantages, specific embodiments may not provide these advantages, some advantages or all advantages.

Claims

1. A defect detection method, comprising: receiving one or more query images associated with a pharmaceutical product container, wherein each of the one or more query images is based on a particular angle of the pharmaceutical product container, and wherein the pharmaceutical product comprises a lyophilized product; For the pharmaceutical product container, computing one or more confidence scores associated with one or more defect indications, respectively, by processing the one or more query images using a target machine learning model ; as well as for the pharmaceutical product container, determining a defect indication from the one or more defect indications based on a comparison between the one or more confidence scores and one or more predefined threshold scores, respectively; wherein the freeze-dried product is associated with one or more product attributes, wherein each product attribute is a physical form factor, color, clarity, viscosity, or fill volume; wherein the defect indications include one or more of critical defects, major defects, or minor defects; wherein the critical defects include one or more of cake appearance defects or fill volume defects, wherein the cake appearance defects include one or more of meltback, extremely shrunken cakes, unfreeze-dried cakes, or discoloration; and the major defects include cake appearance defects, wherein the cake appearance defects include one or more of extreme product splash, tilted cakes, or shrunken cakes.

2. The method of claim 1 , wherein the one or more confidence scores associated with the one or more defect indications for the one or more query images are calculated include: generating one or more feature representations of the one or more query images by processing the one or more query images using the target machine learning model; as well as The one or more confidence scores associated with the one or more defect indications are calculated based on one or more of: a relationship between the feature representations of a plurality of target training images and the plurality of defect indications; or The generated one or more feature representations of the one or more query images.

3. The method according to claim 1 or 2, further comprising: include: The one or more query images are obtained using one or more optical camera sensors, wherein the one or more optical camera sensors capture the one or more query images for the pharmaceutical product container from one or more angles, respectively.

4. The method of claim 1 or 2, wherein the container comprises one or more of a lid, a seal, a stopper, a neck, a shoulder, a body, or a bottom.

5. A method according to claim 1 or 2, wherein the target machine learning model is based on a convolutional neural network. 6 . The method according to claim 1 , wherein each of the one or more predefined threshold scores is determined based on a reception quality limit associated with the defect indication.

7. The method according to claim 1 or 2, further comprising: include: accessing a plurality of target training samples, the target training samples comprising a plurality of target training images respectively associated with the pharmaceutical product containers and a plurality of defect indications associated with the plurality of target training images, wherein the pharmaceutical product comprises a lyophilized product and wherein in at least one of the target training images the lyophilized product is visible inside the container; Selecting a plurality of auxiliary training samples based on the target training sample, wherein the auxiliary training samples respectively include a plurality of auxiliary training images and a plurality of content categories associated with the plurality of auxiliary training images; as well as Training the target machine learning model, the training comprising: Training an auxiliary machine learning model based on the multiple auxiliary training samples; generating feature representations of the plurality of target training images based on the auxiliary machine learning model; and Based on the generated feature representation and the plurality of defect indications, relationships between the feature representation and the plurality of defect indications for a plurality of target training images are learned.

8. The method according to claim 7, further comprising: include: The plurality of target training images are obtained using one or more optical camera sensors, wherein the one or more optical camera sensors respectively capture one or more images of the selected product from one or more angles.

9. The method according to claim 8, further comprising: include: dividing the plurality of target training images into one or more target training image groups, the one or more groups being respectively associated with the one or more camera sensors; and Wherein training the target machine learning model further comprises: generating one or more sets of feature representations for the one or more sets of target training images respectively associated with the corresponding camera sensors; learning one or more sub-models based on the one or more feature representation groups, respectively; and The one or more sub-models are integrated to generate the target machine learning model.

10. The method of claim 9, wherein the target machine learning model is based on a convolutional neural network, the convolutional neural network comprising a plurality of layers, and wherein the one or more feature representation sets are generated for the one or more target training image sets respectively associated with the corresponding camera sensors. include: dividing the plurality of layers into one or more layer groups corresponding to the one or more camera sensors, respectively; as well as The one or more target training image sets associated with the respective camera sensors are processed through the one or more layer sets.

11. The method of claim 7, wherein the plurality of content categories associated with the plurality of auxiliary training images and the plurality of defect indications associated with the plurality of target training images do not match. The method of claim 11 , wherein the plurality of content categories comprises a plurality of handwritten digits.

13. One or more non-transitory computer-readable storage media embodying software operable when executed to: receiving one or more query images associated with a pharmaceutical product container, wherein each of the one or more query images is based on a particular viewpoint of the pharmaceutical product container, and wherein the pharmaceutical product comprises a lyophilized product; For the pharmaceutical product container, computing one or more confidence scores associated with one or more defect indications, respectively, by processing the one or more query images using a target machine learning model ; as well as for the pharmaceutical product container, determining a defect indication from the one or more defect indications based on a comparison between the one or more confidence scores and one or more predefined threshold scores, respectively; wherein the freeze-dried product is associated with one or more product attributes, wherein each product attribute is a physical form factor, color, clarity, viscosity, or fill volume; wherein the defect indication comprises one or more of a critical defect, a major defect, or a minor defect; wherein the critical defect comprises one or more of a cake appearance defect or a fill volume defect, wherein the cake appearance defects include one or more of melt back, extremely shrunken cake, unfreeze-dried cake or discoloration; and the major defects include cake appearance defects, wherein the cake appearance defects include one or more of extreme product splashing, tilted cake or shrunken cake.

14. The medium of claim 13, wherein the software, when executed, further performs the following operations: accessing a plurality of target training samples, the target training samples comprising a plurality of target training images respectively associated with the pharmaceutical product containers and a plurality of defect indications associated with the plurality of target training images; Selecting a plurality of auxiliary training samples based on the target training sample, wherein the auxiliary training samples respectively include a plurality of auxiliary training images and a plurality of content categories associated with the plurality of auxiliary training images; as well as Training the target machine learning model, the training comprising: Training an auxiliary machine learning model based on the multiple auxiliary training samples; generating feature representations of the plurality of target training images based on the auxiliary machine learning model; and Based on the generated feature representation and the plurality of defect indications, relationships between the feature representation and the plurality of defect indications for a plurality of target training images are learned.

15. A defect detection device, include: One or more cameras, each camera corresponding to a different viewpoint; one or more sensors; one or more lights; One or more pallets; one or more height controls; one or more processors; as well as A non-transitory memory, the non-transitory memory being coupled to the processor and comprising instructions executable by the processor, and when the instructions are executed, the processor may perform the following operations: receiving one or more query images associated with a pharmaceutical product container, wherein each of the one or more query images is based on a particular viewpoint of the pharmaceutical product container, and wherein the pharmaceutical product comprises a lyophilized product; for the pharmaceutical product container, respectively calculating one or more confidence scores associated with one or more defect indications by processing the one or more query images using a target machine learning model; as well as for the pharmaceutical product container, determining a defect indication from the one or more defect indications based on a comparison between the one or more confidence scores and one or more predefined threshold scores, respectively; wherein the freeze-dried product is associated with one or more product attributes, wherein each product attribute is a physical form factor, color, clarity, viscosity, or fill volume; wherein the defect indications include one or more of critical defects, major defects, or minor defects; wherein the critical defects include one or more of cake appearance defects or fill volume defects, wherein the cake appearance defects include one or more of meltback, extremely shrunken cakes, unfreeze-dried cakes, or discoloration; and the major defects include cake appearance defects, wherein the cake appearance defects include one or more of extreme product splash, tilted cakes, or shrunken cakes.

16. The apparatus according to claim 15, wherein when executing the instruction, the processor can further perform the following operations: accessing a plurality of target training samples, the target training samples comprising a plurality of target training images respectively associated with the pharmaceutical product containers and a plurality of defect indications associated with the plurality of target training images; Selecting a plurality of auxiliary training samples based on the target training sample, wherein the auxiliary training samples respectively include a plurality of auxiliary training images and a plurality of content categories associated with the plurality of auxiliary training images; as well as Training the target machine learning model, the training comprising: Training an auxiliary machine learning model based on the multiple auxiliary training samples; generating feature representations of the plurality of target training images based on the auxiliary machine learning model; and Based on the generated feature representation and the plurality of defect indications, relationships between the feature representation and the plurality of defect indications for a plurality of target training images are learned.

Citation Information

Patent Citations

  • Authenticating physical objects using machine learning from microscopic variations

    CN106462549A

  • Particle product defect detection method based on deep learning

    CN108229561A

  • System, method and computer program product for classification within inspection images

    TW201335588A

  • Method of deep learning - based examination of a semiconductor specimen and system thereof

    TW201732690A

  • Railroad track survey system

    US20170106885A1