Next Article in Journal
How Can a Deep Learning Algorithm Improve Fracture Detection on X-rays in the Emergency Room?
Previous Article in Journal
Restoration and Enhancement of Historical Stereo Photos
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Unsupervised Foreign Object Detection Based on Dual-Energy Absorptiometry in the Food Industry

by
Vladyslav Andriiashen
1,*,
Robert van Liere
1,2,
Tristan van Leeuwen
1,3 and
Kees Joost Batenburg
1,4
1
Centrum Wiskunde & Informatica, Science Park 123, 1098 XG Amsterdam, The Netherlands
2
Faculteit Wiskunde en Informatica, Technical University Eindhoven, Groene Loper 5, 5612 AZ Eindhoven, The Netherlands
3
Mathematical Institute, Utrecht University, Budapestlaan 6, 3584 CD Utrecht, The Netherlands
4
Leiden Institute of Advanced Computer Science, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands
*
Author to whom correspondence should be addressed.
J. Imaging 2021, 7(7), 104; https://doi.org/10.3390/jimaging7070104
Submission received: 21 May 2021 / Revised: 11 June 2021 / Accepted: 21 June 2021 / Published: 24 June 2021

Abstract

:
X-ray imaging is a widely used technique for non-destructive inspection of agricultural food products. One application of X-ray imaging is the autonomous, in-line detection of foreign objects in food samples. Examples of such inclusions are bone fragments in meat products, plastic and metal debris in fish, and fruit infestations. This article presents a processing methodology for unsupervised foreign object detection based on dual-energy X-ray absorptiometry (DEXA). A novel thickness correction model is introduced as a pre-processing technique for DEXA data. The aim of the model is to homogenize regions in the image that belong to the food product and to enhance contrast where the foreign object is present. In this way, the segmentation of the foreign object is more robust to noise and lack of contrast. The proposed methodology was applied to a dataset of 488 samples of meat products acquired from a conveyor belt. Approximately 60% of the samples contain foreign objects of different types and sizes, while the rest of the samples are void of foreign objects. The results show that samples without foreign objects are correctly identified in 97% of cases and that the overall accuracy of foreign object detection reaches 95%.

1. Introduction

Agricultural food products naturally vary in detail regarding their internal structure. Individual samples can be analyzed to assess product quality, to predict maturity state, and to minimize waste. To facilitate early detection of health risks, it is crucial to apply a procedure to inspect the capability to detect foreign object inclusions [1,2,3] and contaminations [4,5]. This task can be performed by a human expert for an individual sample. However, manual inspection cannot provide reasonable speeds for high-throughput cases, such as product processing in a factory.
X-ray imaging is a widely used technique for non-dectructive, in-line inspection of agricultural products [6]. It is commonly applied to food samples while they are processed on a conveyor belt on the factory floor. One of the important applications of X-rays is the automatic detection of foreign object inclusions that might appear in food products. Examples of such objects are bone fragments in a chicken fillet, plastic debris and bones in fish, and infestation in fruits. One of the well-known approaches in foreign object detection is the acquisition of two dual-energy X-ray absorptiometry (DEXA) [7] projections with different values for X-ray tube voltage. This method is commonly used in medical X-ray imaging for contrast agent detection and body composition analysis.
In-line foreign object detection in food samples on a conveyor belt possesses three major challenges for DEXA analysis. First, high-throughput X-ray acquisition leads to a significant noise level that greatly impacts the detection process. Noise reduction methods have to be applied to reduce this effect. Second, typical foreign objects in the food industry have similar X-ray attenuation properties to that of food samples, resulting in low contrast between foreign object and main object. Contrast-enhancing methods have to be applied to mitigate this effect. Third, a variation in the thickness of the main object causes ambiguities when detecting a foreign inclusion in a sample. For example, a thin sample of a chicken fillet with a bone fragment might have similar dual-energy measurements to a thicker sample of a fillet object without a bone. Hence, a thickness correction method should be taken into account to mitigate this effect.
The main contribution of this article is a novel approach to DEXA image pre-processing. For low-contrast foreign objects, it is crucial to analyze how the ratio between two projections acquired with different voltages depends on the thickness of the object. This effect is caused by the polychromatic spectrum of the X-ray tube and the unknown shape of the sample. The correlation between two intensities for different voltages is not the same for the defect and the product sample, and this difference can be utilized to distinguish between them. The goal of DEXA pre-processing is to create an image where the main object has an average intensity of zero whereas the foreign object deviates significantly from zero.
This article presents a three-step data processing methodology that uses the DEXA pre-processing model in combination with an active contour algorithm and parameterizable foreign object detection criteria. The methodology is optimized to achieve high detection rates on samples with foreign object inclusions and, perhaps more importantly for industrial applications, achieves low detection rates on samples without inclusions. Although the results are targeted towards bone fragments in chicken fillets, the processing methodology is generic and can be used to analyze the performance of various industrial scenarios of foreign object detection on a conveyor belt. The DEXA pre-processing is based on general concepts of X-ray measurements and can be applied to other materials. The active contour model is chosen for the segmentation in this work. However, the outcome of the pre-processing step can be used as an input for other segmentation algorithms, including machine learning-based methods.

2. Related Work

The non-destructive study of products is an important topic for the food industry. It is applied to a variety of food samples [8], and every type of object has different details and typical defects to detect. X-ray imaging can be used for the detection of grain infection, fruit infestation, and bone detection in the fish and poultry industry. X-ray CT is of great interest since it enables volume reconstruction and detection of defects based on the internal structure of the product. However, this approach requires a significant time for data acquisition and reconstruction. Discrete tomography based on limited-angle data [9] can be introduced to balance acquisition time and reconstruction quality. This paper concentrates on the radiography approach since it can provide the fastest inspection.
Foreign object detection based on a single projection has been studied for different types of food, such as poultry and apples. Multiple algorithms for fruit inspection rely on the shape knowledge that can be estimated with a certain accuracy [10]. However, knowledge of the shape of the product is not necessary if the foreign object has significantly different X-ray absorption properties. Several algorithms can be applied to enhance foreign object detection by utilizing conventional filtering [11], local contrast enhancement [1], and local adaptive thresholding [12]. These methods do not require DEXA data and can be applied to a single projection. However, they rely on the assumption that an absorption gradient on the border of the defect can be distinguished from gradients in the main object.
The addition of the second projection with a different tube voltage for better defect detection is a concept that is widely used in medicine. It is applied to body fat measurements [13] that determine the percentages of different tissues in the human body based on their absorption rates corresponding to different tube voltages. This problem may be similar to some types of food inspection (assessment of fat level), but defect detection focuses on small inclusions of different objects. Furthermore, in many applications, material identification is performed using dual-energy CT [14]. This approach is more accurate than DEXA because attenuation properties are analyzed for a small region of the internal structure of the object. If the data are limited to a single projection, the measured attenuation distribution depends on both material properties and the unknown shape of the object (thickness along the ray trajectory). In [15], this effect was explained by beam hardening and corrected with a system calibration.
In the poultry industry, the addition of a laser was considered to obtain a thickness profile of the studied object [16,17]. Knowledge of the exact thickness profile helps to predict an absorption distribution for the main object if it is homogeneous. Thus, the presence of the defect can be detected by simple thresholding after subtracting the expected distribution from the measured absorption signal. In this study, only X-ray equipment is used to perform detection, and no additional sources of information is used.
Active contours methods can be used for foreign object detection if there is a visible boundary separating a defect and the main object. The level-set methods of Osher and Sethian were used for a fan bone location in the chicken samples [18] based on the combination of X-ray and color images. The main downside of many active contour models is that they rely on the edges to perform segmentation. With a high noise level, any edge information becomes unreliable since noise deviations are bigger than a natural absorption gradient that would be observed on a noiseless image. The Chan–Vese energy equation [19] was used to partition an image into two phases without relying on edge detection. This algorithm is unsupervised and does not require any prior knowledge or machine learning to work.
In this work, the inspection procedure is evaluated based on the detection rate and not segmentation accuracy. Typical studies of the algorithms concentrate on the images with a defect and estimate the accuracy of segmentation. However, the detection rate is more important for most industry applications since the majority of the samples is expected to be without a defect. Such a study was performed, for example, in [20] for pear fruit inspection. Methods to distinguish between bones and no bones for different patches of fish images were proposed in [11]. An algorithm with a good detection rate might show suboptimal segmentation accuracy for samples with a foreign object. However, a good inspection procedure requires a balance in performance on normal and defected samples.

3. Materials and Methods

3.1. General Methodology

The product inspection procedure proposed in this paper consists of several stages. The corresponding flowchart is shown on Figure 1. First, two X-ray images of the studied sample are obtained using two different voltages of the X-ray tube. These projections should be aligned, and darkfield and flatfield corrected. The images are divided to produce a combined image distribution for the ratio of two absorption rates corresponding to different voltages. This image is further processed using thickness correction procedure. The goal of this step is to create an image where pixels of the main object have close to zero values and a foreign object presence leads to a sufficiently large nonzero intensity. Segmentation is performed on this image to divide it into two phases with different mean intensities. This leads to a set of clusters corresponding to the regions of the foreign object inclusion. Properties of these clusters are used to decide if the sample should be marked as containing a defect.

3.2. Dual-Energy Projection Pre-Processing

X-ray imaging can be used to create a projection of the studied sample. The value of every pixel in such resulting projections depends on the integral absorption of the object’s matter across the corresponding trajectory. The main object and a foreign object absorb radiation differently, and this leads to differences in pixel intensities. However, the shape of the studied sample is not known in advance. Thus, the pixels in the object region do not have constant pixel intensities, as their values depend on the sample thickness. Two images acquired under different voltages provide additional information since material absorption depends on the X-ray photon energy.
A dual-energy projection of a sample with a defect can be segmented as a two-channel image. The X-ray absorption rate in a pixel depends on both material attenuation properties and the thickness of the object. The absorption rate is given by
M ( x ) = ln P ( x ) F ( x ) = ln I 0 ( E ) e κ ( E ) L ( x ) d E I 0 ( E ) d E ,
where M ( x ) is the absorption rate computed for the detector pixel x, P and F are projection and flatfield pixel intensities, I 0 ( E ) is a spectrum of the X-ray tube, κ ( E ) is a material absorption curve, and L ( x ) is a profile of thickness along the ray. The argument x refers to a detector pixel, and every pixel has a corresponding X-ray beam trajectory from the source to this pixel. The absorption curve κ does not depend on x since the material is assumed to be homogeneous. If scattering is not considered, attenuation properties of the material are defined by X-ray absorption, and the attenuation rate can be calculated according to Equation (1).
If the tube spectrum is monochromatic, then I 0 ( E ) = I 0 δ ( E E 0 ) , where δ ( x ) is a Dirac delta function. Equation (1) can be simplified:
M ( x ) = ln I 0 e κ ( E 0 ) L ( x ) I 0 = κ ( E 0 ) L ( x ) .
In this case, the two channels of the dual-energy image are linearly correlated. If a homogeneous material is scanned with two monochromatic beams of energies E 1 and E 2 , the corresponding absorption rates are M 1 ( x ) = κ ( E 1 ) L ( x ) and M 2 ( x ) = κ ( E 2 ) L ( x ) . The ratio between M 1 and M 2 is constant, does not depend on the thickness, and is defined by the ratio of attenuation coefficients for two X-ray energies. As a result, two different materials can be easily separated using a dual-energy projection.
In most CT applications, a beam is usually polychromatic since it is produced by conventional X-ray tubes. In this case, the attenuation rate depends on material thickness according to Equation (1). If the thickness L ( x ) is small, an effective attenuation coefficient κ eff can be computed as a first-order approximation [21]:
κ eff = I 0 ( E ) κ ( E ) d E I 0 ( E ) d E
However, the attenuation rate does not linearly depend on L ( x ) in general. Thus, a ratio of attenuation rates is no longer a material characteristic and it depends on the thickness L ( x ) .
A nonlinear dependency of attenuation rate on material thickness is visible in the simulated data. For the simulation, the main object is assumed to be a skeletal muscle with an attenuation curve taken from the NIST database (ICRU-44 report [22]). The tungsten tube spectrum for the voltages of 40 and 90 kV is computed according to the TASMIP data [23]. Figure 2a shows how attenuation rates for two different voltages of the tube correspond to each other. On this plot, thickness changes from 0.1 mm to 20 cm, and the attenuation rates are calculated according to Equation (1). The correlation between the two values is almost linear as if both of them depend linearly on thickness. However, the ratio of two attenuation rates changes with thickness, as shown in Figure 2b. This change is not significant; therefore, it is not visible on a correlation plot between two intensities for different voltages. The ratio dependency on thickness can be calculated as follows:
M 1 ( x ) M 2 ( x ) = ln I 1 ( E ) e κ ( E ) L ( x ) d E + ln I 1 ( E ) d E ln I 2 ( E ) e κ ( E ) L ( x ) d E + ln I 2 ( E ) d E ,
where M 1 ( x ) is the attenuation rate computed for the voltage of 40 keV, M 2 ( x ) corresponds to 90 kV, and I 1 ( E ) and I 2 ( E ) are the tube spectra for voltages of 40 and 90 kV
In the real scan, the nonlinear dependency is further complicated by the noise presence. A mass attenuation function is usually unknown for many food industry materials. Therefore, the thickness dependency of the ratio values cannot be predicted beforehand and should be extracted from the data. Experimental measurement produces distributions of M 1 ( x ) and M 2 ( x ) for two different tube voltages. The quotient distribution R ( x ) can be computed as follows:
R ( x ) = M 1 ( x ) M 2 ( x ) ,
The thickness profile L ( x ) is unknown. As shown in Figure 2a, attenuation rate M ( x ) is almost proportional to L ( x ) . Thus, in a data-driven approach, the dependency of quotient values on thickness can be studied as a dependency of R ( x ) on either M 1 ( x )   or   M 2 ( x ) . Values of M 2 ( x ) are lower than M 1 ( x ) for the same x since the voltage of M 2 is higher. Therefore, M 2 ( x ) has a lower absolute value of the error and is used as an argument in the function R ( M 2 ) . The function R ( M 1 ) can be studied as well. The dependency R ( M 2 ) is further replaced by a polynomial approximation since a high noise level makes it impossible to recover true function from the data without any additional information.
The order of the polynomial chosen for a function approximation depends on the data quality. In the experimental data used in this work, a linear approximation of R ( M 2 ) is not sufficient and leads to significant discrepancies between the acquired data and the fit. High orders of the polynomial are prone to noise, and the fit does not always converge as a result. The quadratic approximation was chosen as a middle ground since it provides a sufficiently good representation of the data and has a low noise sensitivity. This approximation is given by
R ( x ) = M 1 ( x ) M 2 ( x ) a M 2 2 ( x ) + b M 2 ( x ) + c ,
where M 1 ( x ) and M 2 ( x ) are pixel values in the respective channels of the experimentally acquired projection and where a, b, and c are fit coefficients. The polynomial regression is performed for all pixels of the object simultaneously.
When the dependency of R ( x ) on M 2 ( x ) is extracted from the data in the form of polynomial approximation, the effect of thickness dependency can be reduced. After a polynomial fit, the distribution of R ( x ) can be computed as follows:
R ( x ) = R ( x ) a M 2 2 ( x ) b M 2 ( x ) c .
where R ( x ) is a corrected quotient distribution. If the sample consists of a homogeneous material, R ( x ) is close to zero regardless of the thickness. However, inclusion of a defect with different absorption properties affects both R ( x ) and R ( x ) . R ( x ) is easier to use for defect detection since the form variation of the object does not significantly influence this distribution.

3.3. Pre-Processing of the Experimental Data

A sample of a chicken fillet containing a fan bone was scanned using a CMOS detector with a CsI(Tl) scintillator (Dexela1512NDT) [24]. The X-ray source was a microfocus X-ray tube with voltages of 40 and 90 kV. The piece of fillet was wrapped in a plastic bag and placed on a holder. This experimental setup imitates a top view similar to the typical data from a conveyor belt.
The same sample was measured with different exposure times to illustrate the impact of the detector noise. Figure 3a shows a combined image computed according to the Equation (5) with two projections acquired with the exposure time of 0.5 s. Figure 3b is a plot of thickness dependency of quotient values based on the experimental data corresponding to Figure 2b for the simulated data. Values of M 2 ( x ) are used instead of L ( x ) since the thickness profile of the object is unknown. Pixels of the defect are marked with a different color to highlight that the noise variance is bigger than a difference between the sample and defect in spectral properties. Nevertheless, the bone can be located by a human expert based on the R ( x ) distribution since the defect pixels are located near each other and form a region. If the same product is scanned with a higher exposure time, the level of statistical noise becomes lower and the foreign object is easier to locate. Figure 4a,b shows the quotient image and quotient plot for the measurement with an exposure time of 5 s. The high noise case is more difficult, and it is the main focus of the next subsections.
Even if the foreign object is visible to a human expert, its detection might still be non-trivial for a classical algorithm. Thickness dependency of the ratio values leads to natural gradients in the R ( x ) . The introduction of the corrected quotient R ( x ) helps to reduce this effect and makes the image easier to segment. The thickness correction is shown in Figure 5a,b, which represent R ( x ) and R ( x ) distributions. After this procedure, R ( x ) is close to zero in most pixels corresponding to the main object. A deviation from zero might be caused by detector noise, systematic errors of the experimental setup, and different defects. The presence of a foreign object changes a pixel value, and the difference depends on its thickness. The main task of the segmentation algorithm applied to Figure 5b is to locate big clusters of nonzero pixels excluding noisy outliers. With a significant noise influence, foreign object location is difficult to perform on a pixel level. Thus, it is important to use spatial information.
The largest noise level in the R ( x ) distribution is usually found near the edges of the main object. In those regions, a quotient intensity is calculated as a ratio between two small numbers that leads to the high relative error. This effect can be reduced to improve detection accuracy. It can be assumed that the variance of the image values is mainly defined by the statistical noise and depends on the thickness. Therefore, a standard deviation for different thickness values should be computed from the data. The simplest approach to solve this problem is to divide the image into regions with similar M 2 intensity and to compute mean value and standard deviation for every subset. Each region is defined as a set of image points with the intensity values M 2 ( x ) belonging to a certain closed interval of values. If values of M 2 ( x ) start from a threshold value M 0 and size of the interval is Δ , the intensity interval corresponding to ith region can be written as [ M 0 + i Δ , M 0 + ( i + 1 ) Δ ] . Therefore, the region is a set of points x where M 2 ( x ) [ M 0 + i Δ , M 0 + ( i + 1 ) Δ ] . Then, the normalized corrected quotient N ( x ) can be calculated as follows:
N ( x ) = R ( x ) R i ¯ σ i , x : M 2 ( x ) [ M 0 + i Δ , M 0 + ( i + 1 ) Δ ] ,
where R i and σ i are mean value and standard deviation of intensity values M 2 ( x ) computed for ith region.
Figure 5c shows a normalized quotient based on the corrected image Figure 5b.

3.4. Segmentation of the Combined Image

Thickness correction pre-processing described in the previous section transforms two-channel dual-energy projections into a single image. In this work, an active contour model without edges is used to achieve good segmentation quality with a high noise level. The Chan–Vese method [19] is a variational segmentation algorithm inspired by the Mumford–Shah model [25]. It separates two homogeneous phases in the image by minimizing the energy functional over the phase boundary and their average values:
F = λ 1 Ω 1 ( N ( x ) c 1 ) 2 d x + λ 2 Ω 2 ( N ( x ) c 2 ) 2 d x + μ | Ω 1 | + ν | Ω 1 | ,
where Ω 1 and Ω 2 are regions segmented as an object and backgound, c 1 and c 2 are average pixel values in these regions, | Ω 1 | is the boundary length of Ω 1 , and | Ω 1 | is the area of Ω 1 . In the case of a foreign object location problem, the background refers to the main object and the object refers to the foreign object. The minimization problem is solved by applying the level-set technique: phase boundary is defined as a zero-level of a level-set function. The values of c 1 and c 2 are recalculated on every step depending on the current phase boundary.
The segmentation outcome is implicitly controlled by the ratios between λ 1 , λ 2 , μ , and ν . The first two terms favor a similarity between pixel value and region average intensity regardless of the spatial properties. The last two terms mitigate the effect of noisy pixels on the segmentation. Low values of μ and ν transform the segmentation into thresholding with minimal removal of outliers (Figure 6a). Different values of penalty weights lead to different boundary detections, noise sensitivities, and overall accuracies of the algorithm. Examples of such effects are shown on Figure 6b,c. The biggest strength of the active contour approach is that parameters have an interpretation and can be related to the image properties, such as object intensities and noise distribution.
As a variational algorithm, the Chan–Vese method has a few implicit parameters that influence the iterative process. The initial state of the level-set function in the described implementation is defined by a simple thresholding
ϕ ( x ) = 1 if N ( x ) T i n i t 0 if N ( x ) < T i n i t .
where T i n i t corresponds to a significant deviation from zero. Thus, pixels with values higher than the threshold are likely to be part of the defect region. On every iteration of the segmentation algorithm, the level-set is recalculated to better minimize the segmentation energy. If the increment norm is smaller than a certain tolerance value, the algorithm converged. The iterative process is also stopped if it takes more iterations than a certain maximal number. These parameters mainly influence the speed and convergence of the method and define the final segmentation in case there are multiple local minima.
Accuracy of the segmentation can be evaluated if a ground truth (correct segmentation of the input) is known for every sample. In this paper, F1-score is chosen as an accuracy metrics and is calculated according to the following formula:
F 1-score = TP TP + 0.5 ( FP + FN ) ,
where TP is the number of True Positive pixels (pixels of the defect that were correctly identified), FP—False Positive (pixels of the main object that were falsely classified as a defect), and FN—False Negative (pixels of the defect which were missed). This metric is commonly used in papers about foreign object segmentation. However, it does not evaluate performance on the samples without a foreign object.

3.5. Post-Processing and Foreign Object Detection

The main challenge for the active contour segmentation lies in images without defects. The neighborhood of a noisy pixel with a significant deviation from zero can be considered part of the defect region, even if there is no foreign object in the sample. This problem can be solved by adjusting penalty weighting coefficients μ and ν . If a region Ω n o i s y with mean intensity N n o i s y is considered part of the main object, the energy is increased by ( N n o i s y c m a i n ) | Ω n o i s y | since the mean intensities are different. This energy increment can be avoided if this region is classified as a foreign object. In this case, the energy is modified by penalty terms μ | Ω n o i s y |   +   ν | Ω n o i s y | . The decision about including or excluding the region Ω n o i s y is based on the ratio between these two terms. It is important to note that the Chan–Vese algorithm is an iterative method. Therefore, the result depends not only on energy terms but on the initial level-set, regularization parameters, and convergence speed, among other things. Nevertheless, penalty weights should be raised to a certain level to exclude noisy clusters in most cases.
If a noise level is sufficiently high, fine-tuning parameters for all types of inputs is a challenging problem. Significant noise fluctuations in the samples without foreign objects require penalty weights to be high. On the other hand, the accuracy of defect segmentation becomes worse since many pixels on the foreign object boundary are included in the main object. A post-processing procedure is introduced as an additional way to exclude noisy pixels from the foreign object region and to make the algorithm more robust. A segmented defect region can be divided into clusters of neighboring pixels. For each cluster, the mean intensity and size can be computed. Segmentation quality can be enhanced if a certain threshold on the cluster size is set and small clusters are ignored. The main reason for employing this strategy is the existence of noisy pixels with an intensity that is several times higher than the average defect intensity. If penalty weights are adjusted to exclude such pixels, small foreign objects might be excluded as well.
In the proposed methodology, post-processing is the removal of segmented clusters with a size lower than a certain number of pixels. If there are no clusters after pre-processing, the sample is marked as normal. Otherwise, it is considered that the sample contains a defect. For every sample in the experimental dataset, it is known whether it contains a foreign object or not. Thus, it is possible to compute a confusion matrix and F1-score for the inspection procedure. In this case, accuracy is measured on a sample level, unlike segmentation precision. These metrics are more important for algorithm performance evaluation since they include all possible cases. If the segmentation is fine-tuned to achieve the best segmentation accuracy, it might become too sensitive to noise. Therefore, due to noise fluctuations, it classifies normal samples as containing a defect.

4. Results

4.1. Dataset Description

The thickness correction procedure was tested on the scans of chicken fillets on a conveyor belt. The images were acquired with a line detector since these are commonly used in industrial setups. The majority of fillet samples contained a bone that should be detected as a foreign object. Every sample was scanned four times with different positions on a belt. There are 100 images with a fan bone, 100 images with a large rib bone, and 96 images with a small rib bone. In 192 scans, the chicken fillets did not contain a foreign object. These types of bone differ by average size, form, and typical position in a fillet. The dataset was semi-manually segmented to create an approximate ground truth for accuracy estimation.
The biggest challenge of the dataset is the small difference in attenuation curves between the chicken fillet and bone. Both are organic materials and do not contain a signicant concentration of heavy metals with a visible K-edge. Therefore, the attenuation curves do not have spectral features that can be easily detected, such as K-edges in contrast agent detection. However, bones contain a significant amount of calcium that is not present in meat. This leads to a difference in spectral properties that might be of the same order of magnitude as noise if the foreign object is small enough.
The ground truth for the dataset was used to calculate the average properties of different bone types. Table 1 shows the comparison between pixel values after thickness correction and normalization.Bone size refers to the average area of a bone of the corresponding class measured in pixels.

4.2. Thickness Correction

The described pre-processing was applied to the dataset to compute N ( x ) distributions. A thickness dependency for every sample was interpolated by a polynomial of the second degree. If an absorption rate was lower than a certain threshold equal to 0.2, a pixel was ignored both in interpolation and division. The size of the intensity bin Δ was set to 0.1. Figure 7 shows projections of different samples from the experimental dataset, the corresponding N ( x ) , the ground truth, and the thickness dependency plot.
The dataset contains a variety of examples with different types and sizes of bone fragments and normal samples without defects. Cases (a)–(d) show the effect of thickness correction on samples with a foreign object. The defect might be visible on a single projection, even if it has a small size, such as a shattered rib bone in sample (d). However, the contrast on a single projection significantly depends on the exact location of the foreign object. If the main object form causes intensity gradients near the defect, it might be missed without additional information. The main benefit of thickness correction lies in removing intensity changes corresponding to the main object and highlighting the defect location. The thickness dependency plot shows that quotient values corresponding to the foreign object often have a similar deviation from zero as noisy outliers. This corresponds to the low exposure scanning procedure discussed previously.
Example (e) illustrates the main advantage of using thickness correction for DEXA data. Both projections contain a region with a well-visible border that is not a foreign object. However, the correlation between images does not correspond to a material with attenuation properties different from the main object. In the corrected quotient, this region is the same as other parts of the sample. The thickness dependency plot does not contain any significant outliers as well. Such intensity changes might appear on samples with and without foreign objects. Therefore, it is crucial to remove them in order to prevent a high false positive rate.
Some projections in the dataset contain systematic experimental effects that can look simialr to a foreign object after thickness correction. In sample (f), a set of pixels near the border has a high N ( x ) . However, no bone is present in the object in this case. Automatic data acquisition might lead to misalignment artifacts, small movements of the object between scans, and a change of shape. These artifacts have N ( x ) values similar to the real foreign objects and might be recognized as such.

4.3. Segmentation Accuracy

N ( x ) images were used as an input for the Chan–Vese segmentation algorithm. The method implementation was based on the C++ code by Pascal Getreuer [26]. Furthermore, a Python wrapper was written and used as an interface. In the results, the default algorithm parameters are fit weights λ 1 = λ 2 = 1 , time step d t = 1 , convergence tolerance t o l = 10 4 , maximal number of iterations N m a x = 200 , heavyside regularization ϵ = 1 , curvature regularization η = 10 8 , and initial level-set threshold T i n i t = 5 . The accuracy of the algorithm is studied for different values of μ and ν since they significantly influence the outcome and have a geometrical interpretation. The post-processing pixel count threshold is set to 30 pixels. This means that defect clusters containing fewer than 30 neighboring pixels were removed from the final segmentation.
In this subsection, the segmentation accuracy is estimated on a pixel level for the samples containing a foreign object. For every object, the resulting segmentation is compared with ground truth to count the number of true positive, false positive, and false negative pixels. F1-score is calculated according to Equation (11). The values of the F1-score are shown on Figure 8a for different combinations of penalty weights. The value of the metric is averaged over all images with foreign objects. The best segmentation accuracy is achieved with μ = 14 and ν = 2 .
As explained in Section 4, the dataset contains different types of bone as a defect. The values in Figure 8a are averaged over all defect types. Thus, it does not show how defect class affects segmentation accuracy. The corresponding figures for every type of bone are shown on Figure 9. The dependencies of the F1-score on penalty weights are similar for all defects. Every bone class has a combination of Chan–Vese parameters that achieves the best segmentation accuracy for that defect type, and these parameters might be different from each other. However, the best instances for a single defect class also perform well for the whole dataset, as shown in Table 2. Thus, all types of defects can be segmented with the same algorithm settings. Different ratios of bone types in the dataset would affect the algorithm performance but not significantly.

4.4. Detection Results

As highlighted previously, the detection procedure should be evaluated on the samples without a foreign object. The decision-making based on the segmentation and post-processing was tested on the whole dataset: 296 images with different types of bone and 192 images without a defect. The test results contain the number of images with a bone where a presence of defect was detected and the number of boneless images that were correctly identified as empty. These values correspond to the true positive and true negative cases. The algorithm accuracy was evaluated using the F1-score.
Figure 8b shows the dependency of F1-score on Chan–Vese energy equation penalties μ and ν . High accuracy (more than 90%) can be obtained with multiple combinations of parameters, and the best value of F1-score was achieved with μ = 4 and ν = 2 . The confusion matrix for this instance of the inspection procedure is shown in Table 3. The algorithm correctly marks 97% of the normal samples as not containing a foreign object. Chicken fillets with a bone were successfully identified in 92% of cases.

5. Discussion

5.1. Thickness Correction

The thickness correction pre-processing was performed on the experimental data and does not rely on prior knowledge about the samples. The dependency of the quotient value on the thickness of the main object material is estimated as an average function for pixels of the projection. The theoretical foundation of the pre-processing implies that this function can be predicted with sufficient knowledge of the inspection system. As a result, it can be used to construct more precise measurement systems and to achieve better contrast between the main and foreign objects. However, in the scope of this article, a heuristic approach was chosen to show the applicability of this method to a wide range of data.
One of the major downsides of R ( x ) i m a g e s is the resulting significant level of noise. If noise in single-energy projections follows a Gaussian distribution, the R ( x ) noise has a ratio distribution. Thus, significant outliers from the mean value are more likely than with the Gaussian. The exact properties of the resulting distribution depend on the mean value and variance for both original distributions. In practice, this means that high noise appears frequently, especially in the boundary regions of the image.
Several approaches were considered to mitigate a high noise level. First, normalization is applied to the corrected quotient R ( x ) . On the boundary, large deviations from the zero level are divided by the significant variance value. A downside of this procedure is that variances are computed under the assumption that the distribution is Gaussian. Second, not all boundary regions are used for the N ( x ) computations. If a pixel value (absorption rate corresponding to the pixel that can be computed after darkfield and flatfield corrections) is less than a certain threshold, a pixel is considered part of the background and ignored. This boundary cut might remove some parts of the bone from the image if it is located near the main object border. Nevertheless, a smaller number of noise outliers leads to a better segmentation in general.
In this work, the N ( x ) images were used as an input for a segmentation algorithm. However, it does not mean that other derivatives of two projection channels should not be considered. In the data-driven approach, the quotient is used as a simple combination of two channels that has an additional meaning for a monochromatic beam. With more knowledge about the inspection system and product materials, a better combination of the two channels might be constructed. The main focus of the pre-processing procedure is to remove thickness dependency, additional steps can be considered to improve defect contrast. Normalization of the R ( x ) can be viewed as an implicit introduction of the Gaussian noise to the active contour model.

5.2. Active Contour Segmentation

The Chan–Vese method operates well even with noisy data, and a high noise level is common for the conveyor belt product inspection. The energy that is minimized over two phases in the image is a formal way of defining a connected cluster of points in the presence of high noise. Thus, the segmentation algorithm determines bone borders consistently based on the objective criteria. At the same time, the ground truth made by a human operator might be more subjective. When a discrepancy between the segmentation and ground truth occurs, it can be caused by many factors. On one hand, the Chan–Vese method might not converge or reach a local minimum, and thickness correction might produce a very noisy input. On the other hand, the ground truth in a single sample can be inconsistent with other data.
The active contour models contain several parameters that do not have a physical meaning. The maximal number of iterations, convergence tolerance, and time step influence the speed of the method and resulting segmentation. The optimal choices of these parameters balance computational speed and algorithm accuracy. For the detection procedure, it is crucial to obtain the result as fast as possible. Therefore, a large time step and low tolerance can be considered.
Figure 8 shows that good accuracy can be achieved with a range of algorithm parameters. The best penalty weight pair does not lead to a significantly better F1-score than its neighborhood in the parameter space. Thus, a search for the optimal inspection settings converges quickly. In these plots, the grid step for μ and ν was set to 2. A smaller step was not chosen to prevent overfitting to the experimental data. The form of the F1-score dependency on μ and ν implies that a similar result can be achieved with a broader dataset.

5.3. Defect Detection

The active contour model in the described methodology is defined for two homogeneous phases according to Equation (9). This means that the method is well-suited for the cases when a single defect is present in the main object. Two foreign objects of significantly different classes (i.e., bone and a plastic piece) might be segmented incorrectly since they should be marked as a defect phase, but their average intensities vary significantly. This problem can be solved with a change of the active contour energy and the introduction of several level-set functions. However, in practice, it is unlikely that multiple defects appear on the sample since a single foreign object is expected to appear rarely. At the same time, the introduction of more defect types in the energy equation might decrease the detection accuracy even more since the majority of samples contains no foreign objects. In the experimental dataset, some images contain a shattered bone, and both pieces are segmented properly since they correspond to the same defect class.
The Chan–Vese algorithm was chosen as a segmentation method in this paper because it performed better than other well-known techniques, such as thresholding and watershed algorithms. However, supervised machine learning methods [27] can be considered an alternative to classic algorithms. With a relatively small dataset, such as one used in this study, it is possible to train a neural network that achieves comparable and sometimes better accuracy. Nevertheless, unsupervised algorithms provide explainable results and can be used to improve the experimental setup. With the thickness correction pre-processing, every pixel value can be computed using physical properties of materials, tube parameters, and detector model. The penalty weights can be interpreted as a balance between the defect signal and noise level of the image. This information can be used to improve the scanning protocol, to evaluate the cost efficiency of different detectors for a certain task, and to estimate the size limits of the detectable foreign objects. Machine learning lacks this level of result explainability and should be applied to an already optimal experimental setup.
The described methodology is not limited to the food industry. The main novelty of this inspection procedure is the thickness correction procedure. The effect of thickness on quotient values is relevant for any dual-energy single projection measurement. It is not necessary if the defect has significantly different attenuation properties (e.g., detection of metal pieces in the luggage). Nevertheless, the thickness is important to account for if the data contain high noise level and low-contrast foreign objects.
The detection task with optimal parameters achieves 95% accuracy on the experimental dataset. Out of 192 samples, 5 samples were misclassified as containing a bone. Some of them can be attributed to systematic experimental errors, such as misalignment or sample deformation. In other cases, a noisy cluster is not segmented as a defect if the convergence tolerance and the maximal number of iterations are changed. In 25 samples out of 296, a bone was not detected. The main factor leading to false negative cases is detector noise that requires strict length and area penalties for the segmentation. Furthermore, with a high exposure time, some materials present in the factory environment, such as poultry fat, can be recognized as a foreign object.
It is important to note that the best Chan–Vese parameters for defect detection are different from those that provide the best segmentation accuracy. For a binary outcome, it is not important how precisely the bone is located on the image. The segmentation method often marks only a central part of the bone and ignores its boundary. At the same time, the best detection parameters lead to better performance in difficult cases: the presence of small bones that are indistinguishable from noise and significant noise fluctuations that look similar to small bones. Furthermore, the execution time is lower for the detection procedure, which is important in the industrial environment.

6. Conclusions

The thickness correction pre-processing proposed in this work enhances the detection of foreign objects in the dual-energy projections of conveyor belt samples. The described methodology does not rely on a good contrast between a defect and the main object on a single projection. Instead, it utilizes the difference in attenuation properties that can be detected with a dual-energy acquisition. The active contour segmentation algorithm allows for analyzing data with a significant noise level if a proper energy model is chosen. The performance of the inspection was evaluated based on the ability to distinguish samples with and without a foreign object. It was shown that 97% of samples without a defect can be correctly identified while maintaining a 95% accuracy of the foreign object detection on the experimental dataset. The proposed approach does not require prior knowledge about the samples, and necessary material properties were extracted directly from the projections. The methodology was tested on bone detection in chicken fillets. However, the thickness correction procedure does not rely on any specific properties of this problem and can be extended for other foreign object detection tasks. Different reasons for segmentation imperfection and possible ways to improve the current implementation were discussed.

Author Contributions

Conceptualization, V.A., R.v.L., T.v.L., and K.J.B.; methodology, V.A., R.v.L., and T.v.L.; software, V.A.; validation, V.A.; formal analysis, V.A.; investigation, V.A.; resources, T.v.L. and K.J.B.; data curation, R.v.L.; writing—original draft preparation, V.A.; writing—review and editing, R.v.L., T.v.L., and K.J.B.; visualization, V.A.; supervision, R.v.L., T.v.L., and K.J.B.; project administration, K.J.B.; funding acquisition, R.v.L. and K.J.B. All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge financial support from the Netherlands Organisation for Scientific Research (NWO), project number 639.073.506.

Acknowledgments

The authors thank Meyn Food Processing Technology B.V. for providing the experimental dataset and Sophia Bethany Coban for assistance with laboratory data acquisition.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DEXADual-energy X-ray absorptiometry

References

  1. Chen, Z.; Tao, Y.; Chen, X. Multiresolution local contrast enhancement of X-ray images for poultry meat inspection. Appl. Opt. 2001, 40, 1195–1200. [Google Scholar] [CrossRef] [PubMed]
  2. Kwon, J.S.; Lee, J.M.; Kim, W.Y. Real-time detection of foreign objects using X-ray imaging for dry food manufacturing line. In Proceedings of the 2008 IEEE International Symposium on Consumer Electronics, Vilamoura, Portugal, 14–16 April 2008; pp. 1–4. [Google Scholar]
  3. Kotwaliwale, N.; Singh, K.; Kalne, A.; Jha, S.N.; Seth, N.; Kar, A. X-ray imaging methods for internal quality evaluation of agricultural produce. J. Food Sci. Technol. 2014, 51, 1–15. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  4. van Dael, M.; Lebotsa, S.; Herremans, E.; Verboven, P.; Sijbers, J.; Opara, U.; Cronje, P.; Nicolaï, B. A segmentation and classification algorithm for online detection of internal disorders in citrus using X-ray radiographs. Postharvest Biol. Technol. 2016, 112, 205–214. [Google Scholar] [CrossRef]
  5. Chuang, C.L.; Ouyang, C.S.; Lin, T.T.; Yang, M.M.; Yang, E.C.; Huang, T.W.; Kuei, C.F.; Luke, A.; Jiang, J.A. Automatic X-ray quarantine scanner and pest infestation detector for agricultural products. Comput. Electron. Agric. 2011, 77, 41–59. [Google Scholar] [CrossRef]
  6. El-Mesery, H.S.; Mao, H.; Abomohra, A.E.F. Applications of non-destructive technologies for agricultural and food products quality inspection. Sensors 2019, 19, 846. [Google Scholar] [CrossRef] [Green Version]
  7. López-Campos, Ó.; Roberts, J.C.; Larsen, I.L.; Prieto, N.; Juárez, M.; Dugan, M.E.; Aalhus, J.L. Rapid and non-destructive determination of lean fat and bone content in beef using dual energy X-ray absorptiometry. Meat Sci. 2018, 146, 140–146. [Google Scholar] [CrossRef]
  8. Du, Z.; Hu, Y.; Ali Buttar, N.; Mahmood, A. X-ray computed tomography for quality inspection of agricultural products: A review. Food Sci. Nutr. 2019, 7, 3146–3160. [Google Scholar] [CrossRef]
  9. Pereira, L.F.A.; Janssens, E.; Cavalcanti, G.D.; Tsang, R.; Van Dael, M.; Verboven, P.; Nicolai, B.; Sijbers, J. Inline discrete tomography system: Application to agricultural product inspection. Comput. Electron. Agric. 2017, 138, 117–126. [Google Scholar] [CrossRef]
  10. Van Dael, M.; Verboven, P.; Zanella, A.; Sijbers, J.; Nicolai, B. Combination of shape and X-ray inspection for apple internal quality control: In silico analysis of the methodology based on X-ray computed tomography. Postharvest Biol. Technol. 2019, 148, 218–227. [Google Scholar] [CrossRef]
  11. Mery, D.; Lillo, I.; Loebel, H.; Riffo, V.; Soto, A.; Cipriano, A.; Aguilera, J.M. Automated fish bone detection using X-ray imaging. J. Food Eng. 2011, 105, 485–492. [Google Scholar] [CrossRef]
  12. Mathanker, S.; Weckler, P.; Wang, N.; Bowser, T.; Maness, N. Local adaptive thresholding of pecan X-ray images: Reverse water flow method. Trans. ASABE 2010, 53, 961–969. [Google Scholar] [CrossRef]
  13. Vasan, S.K.; Osmond, C.; Canoy, D.; Christodoulides, C.; Neville, M.J.; Di Gravio, C.; Fall, C.H.; Karpe, F. Comparison of regional fat measurements by dual-energy X-ray absorptiometry and conventional anthropometry and their association with markers of diabetes and cardiovascular disease risk. Int. J. Obes. 2018, 42, 850–857. [Google Scholar] [CrossRef] [Green Version]
  14. Martin, L.; Tuysuzoglu, A.; Karl, W.C.; Ishwar, P. Learning-based object identification and segmentation using dual-energy CT images for security. IEEE Trans. Image Process. 2015, 24, 4069–4081. [Google Scholar] [CrossRef]
  15. Dual Energy X-ray Absorptiometry for Bone Mineral Density and Body Composition Assessment; Number 15 in Human Health Series; International Atomic Energy Agency: Vienna, Austria, 2011.
  16. Tao, Y.; Ibarra, J. Thickness-compensated X-ray imaging detection of bone fragments in deboned poultry—Model analysis. Trans. ASAE 2000, 43, 453. [Google Scholar] [CrossRef]
  17. Gleason, S.S.; Paulus, M.J.; Mullens, J.A. Automatic Detection of Bone Fragments in Poultry Using Multi-Energy X-rays. U.S. Patent 6,370,223, 9 April 2002. [Google Scholar]
  18. Vachtsevanos, G.; Daley, W.D.; Heck, B.S.; Yezzi, A.; Ding, Y. Fusion of visible and X-ray sensing modalities for the enhancement of bone detection in poultry products. In Biological Quality and Precision Agriculture II; International Society for Optics and Photonics: Boston, MA, USA, 2000; Volume 4203, pp. 102–110. [Google Scholar]
  19. Chan, T.F.; Vese, L.A. Active contours without edges. IEEE Trans. Image Process. 2001, 10, 266–277. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  20. Van De Looverbosch, T.; Bhuiyan, M.H.R.; Verboven, P.; Dierick, M.; Van Loo, D.; De Beenbouwer, J.; Sijbers, J.; Nicolaï, B. Nondestructive internal quality inspection of pear fruit by X-ray CT using machine learning. Food Control 2020, 113, 107170. [Google Scholar] [CrossRef]
  21. Heismann, B.; Leppert, J.; Stierstorfer, K. Density and atomic number measurements with spectral X-ray attenuation method. J. Appl. Phys. 2003, 94, 2073–2079. [Google Scholar] [CrossRef] [Green Version]
  22. Griffiths, H.J. Tissue Substitutes in Radiation Dosimetry and Measurement. No. 4. Radiology 1989, 173, 202. [Google Scholar] [CrossRef]
  23. Boone, J.M.; Seibert, J.A. An accurate method for computer-generating tungsten anode X-ray spectra from 30 to 140 kV. Med. Phys. 1997, 24, 1661–1670. [Google Scholar] [CrossRef]
  24. Coban, S.B.; Lucka, F.; Palenstijn, W.J.; Van Loo, D.; Batenburg, K.J. Explorative Imaging and Its Implementation at the FleX-ray Laboratory. J. Imaging 2020, 6, 18. [Google Scholar] [CrossRef] [Green Version]
  25. Mumford, D.B.; Shah, J. Optimal approximations by piecewise smooth functions and associated variational problems. Commun. Pure Appl. Math. 1989, 42, 577–685. [Google Scholar] [CrossRef] [Green Version]
  26. Getreuer, P. Chan-vese segmentation. Image Process. Online 2012, 2, 214–224. [Google Scholar] [CrossRef]
  27. Rüger, S.; Firsching, M.; Lucic, J.; Ennen, A.; Uhlmann, N.; Wittenberg, T. Automated detection of bone splinters in DEXA phantoms using deep neural networks. Curr. Dir. Biomed. Eng. 2019, 5, 281–283. [Google Scholar] [CrossRef]
Figure 1. Diagram of the foreign object inspection procedure. The input is two projections of the sample acquired with different voltages of the tube. The blue curve on the images approximately shows the sample boundary. The segmentation image uses green color for pixels that were incorrectly classified as a defect, red for not detected foreign object pixels and yellow for detected pixels of the defect.
Figure 1. Diagram of the foreign object inspection procedure. The input is two projections of the sample acquired with different voltages of the tube. The blue curve on the images approximately shows the sample boundary. The segmentation image uses green color for pixels that were incorrectly classified as a defect, red for not detected foreign object pixels and yellow for detected pixels of the defect.
Jimaging 07 00104 g001
Figure 2. Correlation between the absorption of skeletal muscle for the X-ray tube voltages of 40 and 90 kV (a). The ratio between the attenuation rate is drawn as a function of thickness. The ratio is not constant due to a polychromatic spectrum (b).
Figure 2. Correlation between the absorption of skeletal muscle for the X-ray tube voltages of 40 and 90 kV (a). The ratio between the attenuation rate is drawn as a function of thickness. The ratio is not constant due to a polychromatic spectrum (b).
Jimaging 07 00104 g002
Figure 3. Sample scan with low exposure (0.5 s per projection): combined image computed according to Equation (5) (a) and the dependency of its values on the single projection intensity (b).
Figure 3. Sample scan with low exposure (0.5 s per projection): combined image computed according to Equation (5) (a) and the dependency of its values on the single projection intensity (b).
Jimaging 07 00104 g003
Figure 4. Sample scan with high exposure (5 s per projection): combined image computed according to Equation (5) (a) and the dependency of its values on the single projection intensity (b).
Figure 4. Sample scan with high exposure (5 s per projection): combined image computed according to Equation (5) (a) and the dependency of its values on the single projection intensity (b).
Jimaging 07 00104 g004
Figure 5. Stages of the scan data pre-processing: R ( x ) computed according to Equation (5) (a), R ( x ) defined by Equation (7) (b), combined image after correction and normalization computed according to Equation (8) (c). The sample is a chicken fillet with a fan bone scanned with an exposure time of 0.5 s.
Figure 5. Stages of the scan data pre-processing: R ( x ) computed according to Equation (5) (a), R ( x ) defined by Equation (7) (b), combined image after correction and normalization computed according to Equation (8) (c). The sample is a chicken fillet with a fan bone scanned with an exposure time of 0.5 s.
Jimaging 07 00104 g005
Figure 6. Different examples of the segmentation with different values of penalty weights applied to the N ( x ) image after pre-processing shown on Figure 5c. The panel (a) shows a segmentation with low values of penalty weights μ = 1 ,   ν = 1 , where many noisy outliers are marked as bone fragments. This effect can be reduced by changing the weights as shown on panel (b) corresponding to μ = 5 ,   ν = 1 . High values of penalties, such as μ = 20 ,   ν = 5 on panel (c) might lead to a safe segmentation excluding a significant fraction of the bone.
Figure 6. Different examples of the segmentation with different values of penalty weights applied to the N ( x ) image after pre-processing shown on Figure 5c. The panel (a) shows a segmentation with low values of penalty weights μ = 1 ,   ν = 1 , where many noisy outliers are marked as bone fragments. This effect can be reduced by changing the weights as shown on panel (b) corresponding to μ = 5 ,   ν = 1 . High values of penalties, such as μ = 20 ,   ν = 5 on panel (c) might lead to a safe segmentation excluding a significant fraction of the bone.
Jimaging 07 00104 g006
Figure 7. Different samples from the experimental dataset. For every object, two projections acquired with different voltages, the N ( x ) distribution, the segmented image, and the thickness dependency plot are shown. Sample (a) contains a fan bone, sample (b) has a large rib bone, cases (c,d) show small rib bones, and samples (e,f) do not contain defects. The boundaries of the samples are approximately drawn as blue curves, but they are not used during the inspection procedure. The defect location is marked in orange and corresponds to the ground truth images from the dataset. Ground truth in sample (d) is partially wrong and does not include the second part of the shattered bone.
Figure 7. Different samples from the experimental dataset. For every object, two projections acquired with different voltages, the N ( x ) distribution, the segmented image, and the thickness dependency plot are shown. Sample (a) contains a fan bone, sample (b) has a large rib bone, cases (c,d) show small rib bones, and samples (e,f) do not contain defects. The boundaries of the samples are approximately drawn as blue curves, but they are not used during the inspection procedure. The defect location is marked in orange and corresponds to the ground truth images from the dataset. Ground truth in sample (d) is partially wrong and does not include the second part of the shattered bone.
Jimaging 07 00104 g007
Figure 8. Dependency of F1-score on length penalty μ and area penalty ν for different tasks: image segmentation (a) and foreign object detection (b). For segmentation, the F1-score is computed using a ground truth segmentation known for every sample and averaged over all images from the dataset containing a defect. For detection, the metric is calculated on a sample level for the entire dataset consisting of the objects with and without a bone.
Figure 8. Dependency of F1-score on length penalty μ and area penalty ν for different tasks: image segmentation (a) and foreign object detection (b). For segmentation, the F1-score is computed using a ground truth segmentation known for every sample and averaged over all images from the dataset containing a defect. For detection, the metric is calculated on a sample level for the entire dataset consisting of the objects with and without a bone.
Jimaging 07 00104 g008
Figure 9. Defect segmentation F1-score for every class of defect in the dataset: fan bone, large rib bone, and small rib bone. The F1 value is averaged over all samples with a corresponding defect type.
Figure 9. Defect segmentation F1-score for every class of defect in the dataset: fan bone, large rib bone, and small rib bone. The F1 value is averaged over all samples with a corresponding defect type.
Jimaging 07 00104 g009
Table 1. Comparison of mean pixel intensity and foreign object sizes for different types of bone.
Table 1. Comparison of mean pixel intensity and foreign object sizes for different types of bone.
Bone ClassPixel ValueBone Area, px
Fan bone3.7 ± 2.6370 ± 120
Large rib bone3.1 ± 2.5290 ± 70
Small rib bone3.0 ± 2.6160 ± 35
Table 2. Comparison of the best Chan–Vese parameters for different classes of defects. F1-score is separately calculated for all images with the same bone class and for all samples with a defect.
Table 2. Comparison of the best Chan–Vese parameters for different classes of defects. F1-score is separately calculated for all images with the same bone class and for all samples with a defect.
Defect Class μ ν Single Class F1F1 for All Defect Classes
Fan bone20277%72%
Large rib bone14275%74%
Small rib bone14270%74%
Table 3. Confusion matrix for the inspection procedure with Chan–Vese parameters μ = 4 and ν = 2 .
Table 3. Confusion matrix for the inspection procedure with Chan–Vese parameters μ = 4 and ν = 2 .
Predicted
DefectedNormal
ActualDefected27125
Normal5187
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Andriiashen, V.; van Liere, R.; van Leeuwen, T.; Batenburg, K.J. Unsupervised Foreign Object Detection Based on Dual-Energy Absorptiometry in the Food Industry. J. Imaging 2021, 7, 104. https://doi.org/10.3390/jimaging7070104

AMA Style

Andriiashen V, van Liere R, van Leeuwen T, Batenburg KJ. Unsupervised Foreign Object Detection Based on Dual-Energy Absorptiometry in the Food Industry. Journal of Imaging. 2021; 7(7):104. https://doi.org/10.3390/jimaging7070104

Chicago/Turabian Style

Andriiashen, Vladyslav, Robert van Liere, Tristan van Leeuwen, and Kees Joost Batenburg. 2021. "Unsupervised Foreign Object Detection Based on Dual-Energy Absorptiometry in the Food Industry" Journal of Imaging 7, no. 7: 104. https://doi.org/10.3390/jimaging7070104

APA Style

Andriiashen, V., van Liere, R., van Leeuwen, T., & Batenburg, K. J. (2021). Unsupervised Foreign Object Detection Based on Dual-Energy Absorptiometry in the Food Industry. Journal of Imaging, 7(7), 104. https://doi.org/10.3390/jimaging7070104

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop