X-ray inspection plays a pivotal role in the food and nondestructive testing industries, ensuring optimal quality and safety. To improve contaminants and defects detection, it is crucial to reduce the amount of noise in the acquired images. Addressing this, Hamamatsu Photonics has developed a new de-noising technology based on deep learning algorithms and an innovative X-ray simulation method.

  1. General X-ray noise reduction via deep learning
    Deep learning is a method of artificial intelligence (AI) that mimics how humans think and learn, allowing computers to learn by example. At its core are ‘artificial neural networks’, computational models based on neural interconnections of the human brain. Deep learning is constructed upon several hidden layers of neural networks that perform complex operations: each layer calculates the values given as input to the next layer, elaborating the information more and more exhaustively.

    In deep learning, a computer model can master classification tasks, when provided with sufficient data, directly receiving images as input, i.e. recognizing cats in animal photos. Nonetheless, it can learn how to discriminate noise from structural parts of an X-ray image.

    Training the AI is the most challenging part of deep learning: a large amount of computational power is required, together with a vast data set. In the specific case of X-ray image de-noising, when learning from measured images, over tens of thousands of images can be necessary to reach the required performance, which is a significant drawback when using this method.

    Delving into the X-ray image de-noising deep-learning process, images with as little noise as possible are typically captured as a first step. Various types of noise parts are artificially added to these low-noise images to create expected measured images, comprising of both noise and structural components.

    By using this structure plus noise images as input data to the AI, and the noise images as the teacher data set to be identified, the neural network learns how to discriminate noise. Ultimately, a deep learning algorithm that can predict noise from images acquired in actual measurements can be obtained. In the following sections, we will assume that, for this process, convolutional neural networks (CNN) are employed. See Figure 1 for a schematic representation of the AI training process.

    Another disadvantage of using deep learning alone to perform de-noising on X-ray images is that this technique can be employed only if the actual inspection parameters and settings (i.e. inspected product, X-ray energy, X-ray current, X-ray camera) are the same as the ones used for training the AI.

To address this limitation and enhance generalization across various X-ray inspection parameters, a potential solution involves integrating deep learning with X-ray image simulations, thus mitigating the need for an extensive training dataset.

 

image 1 1 Advancing X-ray Inspection with Deep Learning De-noising Technology

 

 

Figure 1: Schematic representation of deep-learning algorithms training to obtain X-ray image de-noising.

  1. X-ray image simulation
    The proprietary X-ray simulation technique developed by Hamamatsu Photonics is based on the simulation of four main components at the basis of X-ray inspection processes here:
    1. X-ray emission spectrum
    2. X-ray transmission through the object
    3. Scintillator response (scintillator converts X-rays into visible light)
    4. Sensor response (sensor detects visible light emitted by the scintillator)

    The simulation process incorporates essential inputs, including a 3D model representing the object under inspection, specific position settings such as the spatial coordinates of the X-ray camera and the X-ray emission point and inspection settings, encompassing X-ray voltage, X-ray current, scintillator material, and sensor pixel size.

    Figure 1: Schematic representation of deep-learning algorithms training to obtain X-ray image de-noising. Target teacher AI training Input Measured image’s structure + noise Measured images Structure part Noise part However, reproducing the precise geometry and density during simulation becomes challenging when dealing with objects of unknown shape or structure, such as raw materials or packaged items. To overcome this issue, test phantoms like step charts with various thicknesses are usually employed.

    The performance of the simulation in terms of its adherence to real images is verified by comparing simulated images with empirically measured ones. An example of an X-ray image simulation is given in Figure 2. Specific parameters obtained from simulation, such as contrast, noise level, and resolution, are then meticulously compared with their empirically measured counterparts. These parameters are expected to be in line with real ones to validate simulation results (see right side of Figure 2).

    The applications of Hamamatsu X-ray simulations are diverse, offering support to customers in defining optimal inspection parameters and serving as a valuable tool for the development of new cameras. Furthermore, as highlighted earlier, the integration of X-ray image simulations with deep-learning techniques allows for noise reduction without the need for an extensive dataset of real images to train the AI. This versatile approach can be extended to every type of object and inspection conditions.

 

 

image 2 1 Advancing X-ray Inspection with Deep Learning De-noising Technology

 

 

Figure 2: Example of X-ray image simulation of an acrylic block with Al spheres (virtual foreign object) and subsequent comparison with measured images. Details on the comparison between contrast, noise level, and resolution are shown.

  1. De-noising through integration of X-ray simulation and deep learning

    During the training phase of deep learning algorithms, the conventional training images, consisting of measured structure plus noise images used as input and noise as teacher data set, can be replaced with simulated ones. In fact, with the X-ray simulation software, training images can be generated under various conditions, structures, and noise levels (see Figure 3).

 

 

image 3 1 Advancing X-ray Inspection with Deep Learning De-noising Technology

 

 

Figure 3: Examples of simulated images obtained with the X-ray simulation software with different structures, X-ray conditions and noise levels. The corresponding simulated noise for each image is reported below.

After learning how to recognize the noise under any condition, a neural network that extracts noise from real captured images is obtained. Figure 4 shows a schematic representation of the combination of X-ray simulations and deep learning (with CNN) to achieve this goal.

 

image 4 2 Advancing X-ray Inspection with Deep Learning De-noising Technology

 

Figure 4: Combination of X-ray simulations and deep learning algorithms with CNN. Simulated images (structure + noise) are given as input to the neural networks, while simulated noise is used as a teacher image to train the algorithm.

A significant advantage of this approach is its selective subtraction of only the noise component from real measured images, without any artificial removal of structural details. Furthermore, an improvement in contaminants detection via simple thresholding techniques can be directly observed due to the noise subtraction. Figure 5 presents the results of the detection of contaminants in X-ray images of raw pork meat: a comparison between non-processed 5(A) and AI de-noised 5(B) images is shown. Regarding the identification of foreign objects (highlighted in red), better results are observed with the application of the AI de-noising technique.

 

 

 

image 5 1 Advancing X-ray Inspection with Deep Learning De-noising Technology

 

 

Figure 5: Comparison between raw (A) and AI de-noised (B) X-ray images of raw pork meat. By applying a simple threshold to the image grey levels, in the AI de-noised image better results are obtained in the identification of contaminants (red dots).

On a final note, the simulation-plus-AI de-noising tool is suitable for real-time image processing during inline inspection. Initially, the software release will be available for X-ray line scan cameras. However, future developments aim to extend its compatibility to flat panel sensors.

To find out more, please schedule a meeting with us at PPMA 2024 HERE or visit our website. We look forward to discussing how our solutions can enhance your inspection processes.

Website: www.hamamatsu.co.uk

Phone: 01707 294 888

Email: info@hamamatsu.co.uk