<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>AI-based optical inspection solutions for glass containers improving defect detection and reducing false positives</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessandro Liani</string-name>
          <email>a.liani@videosystems.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mattia Di Giusto</string-name>
          <email>m.digiusto@videosystems.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mauro Fabrizioli</string-name>
          <email>m.fabrizioli@videosystems.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gianni Valle</string-name>
          <email>g.valle@videosystems.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Video Systems Srl</institution>
          ,
          <addr-line>33033 Codroipo</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Glass containers inspection processes have been characterized in last decades by human manpower and optical inspection technologies. The ability to identify many types of defects has been increased in this period thanks to innovations on electronic and optical devices. Today's systems also perform well in identifying small defects but sometimes this capability is affected by phenomena of increased false positives. Maximization of production and optimal defects identification is the desired glass manufacturers condition and the desired goal for a green production. Being able to optimize the production will have the effect of reducing pollution generation per tons of products delivered on the market. In this article we propose an artificial intelligence approach for optimization of standard glass containers inspection methods. Thanks to AI-based methodology, we have observed an important reduction of false positives phenomena and an increased ability of the systems to identify specific hard-to-detect defects.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Non-Destructive Inspection Technology</kwd>
        <kwd>AI quality inspection</kwd>
        <kwd>Computer Vision</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The quality control in industrial hollow glass production is more stringent than in other industrial
sectors because the final product (bottles, tableware, containers) is intended for pharmaceutical, food
and beverage markets. For many years the inspection has been entrusted to workers who take the
article in hand, look at it and check if there are any defects. All non-conforming containers are
removed from the production chain and used as recycled glass (scrap). While people can be very
experienced in the control task, they can’t guarantee continued reliability and reach the speed
required by current production cycles. For this reason, automated systems for the quality control of
glass containers have been introduced in the production lines during the past years. The purpose of
every hollow glass maker is to produce more containers with best quality and lowest cost.</p>
      <p>
        In this paper we analyse how to use artificial intelligence to reach the goals requested by the
market. Machine learning methods group together techniques that were originally employed to
implement software capable of simulating and reproducing the most complex object in the whole
universe: the human brain. Thanks to these algorithms, computers can reproduce human capabilities
or assist humans in many cognition tasks. Artificial intelligence has nowadays left academia and
spread out to several applications, such as stocks and finance markets, email filtering, optical
character recognition. Computer vision is currently the main research interest of Video Systems
company, which is developing with expertise and enthusiasm many revolutionary applications of
artificial intelligence in several fields, such as glass container optical inspection. As in the case of
cancer diagnosis, images of glass products are processed by artificial intelligence for automatic and
very accurate detection of defects in glass structure. One common feature of all of these applications
is that, in contrast to more traditional uses of computers, in these cases, due to the complexity of the
patterns that need to be detected, a human programmer cannot provide an explicit, fine-detailed
specification of how such tasks should be executed. When do we need machine learning rather than
directly program our computers to carry out the task at hand? Two aspects of a given problem may
call for the use of programs that learn and improve on the basis of their “experience”: the problem’s
complexity and the need for adaptivity.[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Typical defects in hollow glass industry</title>
      <p>
        In this paper we are considering some of most frequent defects present on hollow glass
containers,[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] focusing on shoulder and bottom areas. The paper intentionally doesn’t include defects
on other areas, like the finish and neck of a bottle or the body of container, but these can also be
detected with the inspection technologies described; also, the geometrical defects that are identifiable
with dimensional measures are kept out of the contents.
      </p>
      <p>Surface cracks on the shoulder of the containers - see Figure 1 (I) - are usually generated by
incorrect glass temperature, which can be either too hot or too cold. This type of defect is a critical
one because produces damage of containers during delivery or during container filling.</p>
      <p>Different types of bottom defects are also shown in Figure 1 (II, III); each might need a different
approach to solve the problem of its identification, and so different kinds of analysis have to be
considered.
(a) (b) (c)</p>
      <p>Figure 1: (I) Shoulder defects: (a) a small crack close to mould seam, (b) standard crack, (c) crack
with logo shadows on background. (II) Bottom defects on bottles: (a) bottom crack, (b) bottom marks,
(c) not uniform glass distribution. (III) Bottom defects on tableware products: (a) stuck glass particles,
(b) bottom marks (c) dirty bottom.</p>
      <p>3. Classic image
identification
processing
methods
for
automatic
defect</p>
      <p>The standard methods to identify defects in glass containers are based on light systems and
cameras. The camera acquires pictures of the containers, and a computer executes image processing
algorithms that are able to spot out glass defects in the source images.</p>
      <p>Classical approaches make use of threshold-based algorithms which find the glass defects
depending on the brightness of the images: all pixels that exceed the brightness threshold are labelled
as defects. Nevertheless, these methods are not accurate enough when the containers density is not
fixed, since they report too many defects which are not real flaws. For this reason, in order to filter
out real defects, further analysis based on shape or other characteristics, like contrast, must be
performed. Thus, the operator needs to set different parameters in order to be able to spot out the
defects and neglect possible reflexes or spots that can be confused with actual defects.</p>
      <p>Latest algorithms use statistical methods to learn from the first analysed samples. They
consist of two phases: in a preliminary phase the algorithm maps the average brightness of the bottle
images. In a second phase, the system detects the defects as outliers from the average brightness of
the background.</p>
    </sec>
    <sec id="sec-3">
      <title>4. New approach for automatic defects identification based on AI</title>
      <p>In this paragraph the advantages due to Artificial Intelligence engine versus standard and
statistical algorithms are shown. The analysis explains benefits and results achieved by the inspection
tests done for every kind of defects presented in the previous paragraphs.</p>
      <p>A typical architecture adopted for this type of analysis, keeping in mind the goal to reduce the
detection of false positives, is represented in Figure 2.</p>
      <p>The two inputs are Icnd and Ictx
Feature extraction is done with a Convolutional Neural Network (CNN) customized in terms
of layers, size, normalization, and activation functions. The same architecture is used for Icnd
and Ictx. CNNs are one of the most significant networks in the Machine Vision field.
Features of the images are linearized, concatenated and processed by a Fully Connected
Network (FCN) for classification.</p>
      <p>On a dataset containing 9865 images for candidate defects, with a ratio between real and
nondefects of 1 to 4, and with an associated context image for each candidate, a training was carried out
for 35 epochs, using Cross Entropy as loss and ADAM as optimizer. Results are validated using
Accuracy metric, defined as the sum of true positives and true negatives, divided by the number of
candidate images.</p>
      <p>Context</p>
      <p>Figure 3 shows the accuracy on training and validation set, where both lines stabilize at a very
high value, close to 100% for training and above 97% for validation; no overfitting problems (good
accuracy in training but poor in validation) are observed.</p>
      <sec id="sec-3-1">
        <title>Shoulder checks</title>
        <p>In this case the AI engine adds the possibility to develop a system able to check and intercept all
cracks present in the analysis area without the demanding operation of light-emitter and receiver
alignment.</p>
        <p>In standard carousel machines, in order to identify a crack, the operator needs to setup light
emitter and receiver to be perfectly aligned with reflection angle, this means that if the crack is
different the machine needs a new alignment.</p>
        <p>The disadvantages of this approach are:
• need of samples of defects
• new defect means new setup
• long-time setup</p>
        <p>Thanks to AI engine the machine identifies automatically every new crack that is present on the
ROI (Region of Interest) with a capability of identification close to 100% of defects; in this sense,
operators only need to select the ROI of analysis and some other parameters like minimum size of
defect.</p>
        <sec id="sec-3-1-1">
          <title>Benefits of this solution are: • very fast setup • no needs of defective samples • thanks to contactless solution non-round containers can be inspected</title>
          <p>On following images some examples:
(a)
(b)</p>
          <p>(c)</p>
          <p>Regarding false positive statistics, during many years of data acquired from the production plants,
a false positives reduction compared to traditional threshold-based algorithms has been achieved,
decreasing from 2.5-3% down to 0.5%.</p>
          <p>
            Today better results can be achieved thanks to a new AI engine that was introduced on 2022 series
machines. Based on the initial statistical results, the new engine has an identification performance
improvement, decreasing the false positives rate down to about 0.1% compared to its predecessor.[
            <xref ref-type="bibr" rid="ref3">3</xref>
            ]
          </p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Bottom defects</title>
        <p>In the case of bottom analysis, we are working on a new approach based on CNN with the goal of
reducing the false positives under 1%, for example to be able to reject cracks or glass particles but
allow dirty on the bottom.</p>
        <p>Figure 6 reports the comparison between the original AI engine (left) and the new AI engine (right)
solving the problem of identifying stuck glass particles.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. Conclusions and outcomes</title>
      <p>The quality control of articles is an increasingly important requirement for hollow glass producers
due to the rising demand for quality by the final market for such products.</p>
      <p>For many years the glass inspection task has been performed by handwork without the reliability
and speed required by current production cycles. Nowadays almost all production lines provide
automated systems for the quality control of glass containers. These controls use vision systems that
can identify defective bottles, making use of classic algorithms to detect defects, which requires to set
a high number of parameters. Some of these methods also need a defective sample in order to prepare
the recipe for analysis.</p>
      <p>This article proposes an artificial intelligence approach for optimization of standard glass
containers inspection methods. This approach allows developing intelligent algorithms that can
classify defects and distinguish them from false reports without the tuning of parameters or the
availability of defective examples. The algorithms are based on a preliminary learning phase made on
images previously classified as defective or not. Artificial intelligence algorithms can also be used in
conjunction with classical algorithms to increase their potentiality or eliminate problems.</p>
      <p>In this paper the results achieved by an AI engine-based vision system in identifying defects on
glass containers are reported. Increasing performance in detecting different types of defects on
various parts of the glass containers was demonstrated, with a significative reduction of the false
positive rate to below 0.4%.</p>
      <p>The presented methods are also applicable to different types of hollow glass containers and at the
same time they can be used for flat glass control. Further studies have been carried out on plates and
glass containers for use in household appliances.</p>
      <p>New developments for defect detection in glass industrial sector will be investigated in the area of
integration of new techniques such as GAN (Generative Adversarial Networks) and other Generative
AI approaches, to obtain vision inspection systems more flexible to changing context (bottle shape,
lighting, etc.)</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledges</title>
      <p>We would also like to thank customers and partners who have been using Video Systems solutions
for over 30 years, and who bring us new challenges and opportunities to grow and apply our
technologies for real-world applications. The ZDZW project has received funding from the European
Union’s Horizon Europe program under grant agreement No 101057404. Views and opinions
expressed are, however, those of the author(s) only and do not necessarily reflect those of the
European Union. Neither the European Union nor the granting authority can be held responsible for
them</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <sec id="sec-6-1">
        <title>The author(s) have not employed any Generative AI tools.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Shai</given-names>
            <surname>Shalev-Shwartz</surname>
          </string-name>
          and
          <article-title>Shai Ben-David, Understanding Machine Learning</article-title>
          , 1st ed., Cambridge University Press,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>“GLASS CONTAINER</surname>
            <given-names>DEFECTS</given-names>
          </string-name>
          ,
          <article-title>Causes &amp; remedies”, Emhart Glass website</article-title>
          , URL: https://emhartglass.com/sites/default/files/publications/2020-09/BR0060%
          <fpage>20</fpage>
          - %
          <source>20Container%20defect%20causes%20and%20remedies.pdf</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Emiliano</given-names>
            <surname>Versini</surname>
          </string-name>
          , Lauro Snidaro, Alessandro Liani,
          <article-title>SCL-Segmentation-Classification combined Loss for surface defect detection</article-title>
          ,
          <source>Expert Systems with Applications</source>
          , Volume
          <volume>198</volume>
          ,
          <year>2022</year>
          , doi:10.1016/j.eswa.
          <year>2022</year>
          .
          <volume>116710</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>