Introduction
The reconstruction of the gamma-ray interaction position in thick, monolithic scintillator crystals represents a fundamental challenge in several medical imaging applications. In particular, our interest is for detection systems for dose monitoring in boron neutron capture therapy (BNCT) [1], [2]. In this technique, patients are administered specific pharmaceuticals containing 10B, a stable isotope of boron, which selectively accumulates in tumors. Patients are then irradiated with a beam of thermal neutrons, which interact with 10B through the neutron capture reaction 10B(n,
Despite the favorable characteristics of monolithic detectors, the complexity of position reconstruction methods, the presence of edge effects, and the necessity for time-consuming calibration procedures represent a potential limitation to their use [10]. The reconstruction of 2-D gamma-ray position of interaction in monolithic scintillators can be obtained by estimating the centroid of the light distribution (LD) read out by all photodetector pixels [11], [12]. This is achieved by using methods, such as the center of gravity (CoG). However, a considerable proportion of the scintillation photons may be reflected or absorbed by the crystal lateral sides before detection, which results in a discrepancy between the signal pattern observed by the photodetectors and the light pattern due to direct photons [13]. In the case of thick monolithic crystals, the issue is further complicated by the fact that the width of the LD is influenced by the gamma-ray DOI in the crystal. Another limitation of monolithic crystals is the inaccurate assessment of the interaction positions near the edges [11]. As the crystal thickness increases, the positioning inaccuracy becomes more pronounced, resulting in a spatial resolution degradation closer to the margins of the crystal [14]. Some algorithms, based on nonlinear analytical models [15] and statistical models, such as the maximum-likelihood [16], [17], attempt to implement a pattern-shape analysis of the detector response for all gamma-ray interaction positions in the detector, with a high level of detail. The former require an exact reproduction of the detector’s geometry and they need significant computational time, which may be a limiting factor in real-time applications. The latter, despite their speed, require time-consuming estimations of prior lookup tables to function properly.
The use of artificial intelligence (AI) methods offers a promising solution to address the aforementioned challenges [6], [7], [8], [9]. These methods enable more accurate and faster estimation of gamma-ray interactions, taking into account the system nonidealities. Furthermore, AI techniques can adapt and improve over time by learning from new data. In recent years, numerous studies have been conducted on the application of machine learning (ML) and deep learning (DL) techniques for gamma-ray localization in monolithic scintillators, working as a reference for this work. One of the most frequently employed ML techniques is the k-nearest neighbors (kNNs) algorithm [18], [19], [20]. The kNN model, implemented by Seifert et al. [20] using a 10-mm thick LaBr
In this article, we propose the development of an ANN model for real-time position reconstruction of gamma-ray interactions with a
Materials and Methods
A. Detection Module
The detection module used to acquire gamma-ray events is a commercial LaBr
B. Position Estimation Method Based on ANN
To achieve good spatial resolution, despite the thickness of the scintillator, and real-time reconstruction of the interaction positions, we employed a supervised approach and developed a simple and low-computational-demanding algorithm. The algorithm’s high computational speed allows for the real-time reconstruction of event interaction positions in practical applications, where the detection module is subjected to a high detection rate. Furthermore, the reduced number of model parameters allows for further embedding the reconstruction on the FPGA of the detection system, which is responsible for sending the data packages to a PC where they are processed. In the preliminary development of the module, different methods were explored, such as k-NN, decision tree, random forest, AdaBoost, and ANNs. Among them, the regression ANN models demonstrated to best match our requirements in terms of the number of trainable parameters and processing time. DL models were excluded from consideration due to their significant computational complexity. In the context of this SPECT application, the spatial resolution is predominantly determined by the geometric characteristics of the collimator, which provides a contribution to the final image spatial resolution in the order of 8 mm. Consequently, enhancing the complexity of the reconstruction algorithm would not yield a corresponding improvement in overall performance. A supervised learning approach was employed to develop the predictive model, which was trained on input data comprising
1) Data Acquisition:
In order to acquire the experimental data required for training and testing the ANN model, the detector surface was scanned in 481 positions using a narrow pencil beam of 662keV gamma rays, obtained using a 137Cs point source of eight mCi positioned inside a cylindrical tungsten collimator with an aperture diameter of 1 mm. The irradiation points were uniformly distributed on the crystal surface in order to acquire an optimal dataset for the event position reconstruction task. The experimental setup is shown in Fig. 2.
Experimental setup used to acquire the data to train the network. The detection module is attached to a system made with two stages, used to move the detector in the x and y directions. The system is moving, while the 137Cs source inside the tungsten-alloy collimator with 1 mm aperture, is fixed.
This approach was employed to guarantee a successful learning process and to reduce the risk of biasing the model toward particular patterns. Before starting the acquisitions, the crystal was meticulously aligned with the collimated beam by measuring count rate profiles across the detector edges in both the vertical and horizontal directions. After the alignment procedure between the source and the detector module, the acquisition protocol was implemented. This entailed a uniform scan of the entire crystal surface at 481 positions, intending to produce the most homogeneously distributed dataset possible (Fig. 3). The dual linear guide system, which moved the detector along the x and y axis with respect to the collimated 137Cs source, allowed for accurate scanning of all interaction positions, with 2.21 mm step. The acquisition times were adjusted to guarantee the collection of a minimum number of events per position.
This figure shows the 481 scanning positions with their respective measurement time. The green points have a duration of 30 s while the red one 20 s. The x and y labels at each point are assigned according to the coordinate reference system.
2) Data Preparation:
The processing of the data started with the selection of the events of interest. First, the unprocessed spectrum for each position was smoothed in order to highlight the photopeak of 137Cs. Subsequently, an adaptive window was defined to perform a Gaussian fitting. Once the 662keV peak had been suitably fitted, the distribution center was identified and only those events falling within the interval [mean
Subsequently, a calibration procedure was implemented to render the 64 values associated with each event independent of the baseline and gain of the respective ASIC channels [28]. Initially, the baseline value of the corresponding channel was subtracted from each component of the event vector. Then, the resulting value was normalized by the gain of the channel. Finally, in order to ensure comparable magnitude values, the derived value was multiplied by the gain of a reference channel, which in our case was the gain of channel 1 of ASIC 1. The procedure employed ensured that the neural network received input values from each event that accurately reflected the SiPMs’ signal response to the energy of the incident gamma ray. This correction is necessary to maintain the same calibration in the event that the ASICs need to be replaced, thus ensuring that the neural networks remain unaffected.
Then, the dataset underwent normalization. Each of the 64 values describing an event is divided by the sum of the 64 values of the event itself.
Finally, the dataset was partitioned into training, validation, and test sets. The 10% of the acquired data were used as testing set, while the remaining 90% was further divided as 75% for training and 25% for validation.
3) Model Implementation:
Fig. 4 shows the architecture of the designed ANN. Hidden neurons have hyperbolic activation functions, while linear activation functions characterize output neurons. Due to its low sensitivity to outliers, the mean absolute error (MAE) was chosen as the cost function to be optimized during the training phase. In our case, the majority of the outliers are reasonably due to events that undergo Compton scattering within the crystal, which results in their absorption at a point that is far from the expected interaction position. The MAE metric quantifies prediction error without the amplification that occurs with root mean-squared error (RMSE). Therefore, during the training phase, the network deals with prediction errors of approximately the same magnitude. This aspect is of particular importance because, when faced with prediction errors of different magnitudes, the neural network tends to prioritize the instances with the highest error, thereby focusing on trying to accurately predict the interaction position of the Compton photons, which have LDs not determined only by their first point of interaction and therefore do not improve the network accuracy.
Model architecture is a fully connected regression ANN, comprising 64 input neurons, two hidden layers with 25 neurons each, and two output neurons for the x- and y-coordinate predictions, respectively.
In order to minimize the cost function and thereby tune the parameters of the ANN, we initiated the learning rate (LR) at 0.01 and employed the “Adam” optimizer, which adapts the LR for each parameter based on the gradient history, thus accelerating convergence and reducing memory allocation. The model features a total of 2327 trainable parameters and was trained for 1500 epochs. The batch size was set to 606060, with each training epoch consisting of a single batch. The ANN model was implemented in Python using the TensorFlow library.
4) Model Evaluation:
The RMSE and MAE, were computed on the training, validation, and test sets to assess the model’s performance and to detect potential overfitting [30].
RMSE is defined as follows:
where n is the number of observations in the set,\begin{equation*} \text {RMSE} = \sqrt {\frac {1}{n} \sum _{{i}=1}^{n} \left ({{{y}_{\text {true}, {i}} - {y}_{\text {pred}, {i}}}}\right )^{2}} \tag {1}\end{equation*} View Source\begin{equation*} \text {RMSE} = \sqrt {\frac {1}{n} \sum _{{i}=1}^{n} \left ({{{y}_{\text {true}, {i}} - {y}_{\text {pred}, {i}}}}\right )^{2}} \tag {1}\end{equation*}
is the true irradiation position, and${y}_{\text {true}}$ is the interaction positions predicted by the model. Large errors are magnified as a result of the squaring. Since the RMSE metric penalizes models more severely for larger errors, it shows greater sensitivity to outliers.${y}_{\text {pred}}$ MAE is defined as follows:
\begin{equation*} \text {MAE} = \frac {1}{n} \sum _{{i}=1}^{n} |{y}_{\text {true}, {i}} - {y}_{\text {pred}, {i}}|. \tag {2}\end{equation*} View Source\begin{equation*} \text {MAE} = \frac {1}{n} \sum _{{i}=1}^{n} |{y}_{\text {true}, {i}} - {y}_{\text {pred}, {i}}|. \tag {2}\end{equation*}
The MAE metric is less sensitive to outliers than the RMSE. Large errors are not further amplified since the difference between the true and the predicted values is not squared.
In order to evaluate more accurately the spatial resolution of the model, we divided the crystal’s surface into six regions, as illustrated in Fig. 5. Given that the spatial resolution of monolithic scintillator detectors varies based on the interaction position and frequently deteriorates toward the crystal’s edges [14], [18], we examined the prediction error distribution across the different regions. The test set was divided into smaller sets according to the irradiation coordinates (x and y). For each area, two 1-D histograms were generated, one for the x-coordinate and one for the y-coordinate. The histograms plot the discrepancies between test events’ actual and estimated interaction positions within the specified region. Given the non-Gaussian error distributions, several metrics were considered in order to achieve a more comprehensive evaluation of the model’s x and y spatial resolution. First, the FWHM and full width at tenth maximum (FWTM) values of the prediction error distributions over the entire crystal surface and in the different regions were calculated. A Gaussian fitting was deemed inappropriate to calculate these values due to the non-Gaussian nature of the error curves. Therefore, linear interpolation was employed to determine the FWHM and FWTM values from the experimental error distributions of the total and individual regions. Without applying any smoothing to linearly interpolated the error distribution, we found the bin corresponding to the maximum height of the interpolated curve, then we calculated half of the maximum height and measured the width of the curve in this point to evaluate the FWHM. In the same way, by taking one-tenth of the maximum height, we measured the width to obtain the FWTM. Furthermore, the MAE and bias values were calculated for the x and y error distributions of each region. In particular, the bias was defined as the difference between the mean error value and the zero value, which denotes an unbiased prediction by the model. The objective was to identify whether the model tended to overestimate or underestimate the predictions with respect to the true values of the x and y interaction coordinates, in the presence of a positive or negative bias, respectively.
Six different regions were defined to evaluate the spatial resolution and the model’s bias across the crystal surface. The dimensions of each region are reported in relation to the
C. Experimental Measurements
In order to assess the performance of the new ANN model in a more realistic setting with the collimator, imaging measurements were also acquired using a 137Cs point source with an active diameter of 1 mm and an activity of 7.8
Experimental setup used to acquire the measurements with
A 32-by-32-pixel image was reconstructed for each source position using the x- and y-coordinate of the 137Cs events estimated by the NN. In each image, the image of the background was subtracted on a pixel-by-pixel basis, after rescaling it to have a statistic equivalent to the duration of the other measurements. The 1-D (1D) histograms used to calculate the point-source position were extracted from each reconstructed image by selecting the region having the y coordinate comprised in the interval
Results and Discussion
A. Model Performance Analysis
Table I reports the regression metrics values obtained for the training, validation, and test sets. For each metric, the average value resulting from the x- and y-coordinate reconstruction is shown.
After optimizing the model based on MAE during training to reduce sensitivity to outliers, this metric was considered the most relevant for evaluating performance. RMSE, however, was also regarded as a reliable metric. The model exhibits consistent performance across all the datasets, as evidenced by the uniformity of metric values. Consequently, there is no evidence of overfitting.
Concerning the model’s spatial resolution, the FWHM and FWTM values of the prediction error distributions over the entire crystal surface and across the different regions are presented in Table II. The corresponding MAE and bias values are provided in Table III.
The model exhibits an FWHM of 2.9 mm and an FWTM of 9.2 mm across the entire crystal surface. Fig. 7 illustrates the 1-D histograms of the prediction error distributions in the x and y direction for the total test set, which have been linearly interpolated. The MAE associated with events occurring over the entire crystal surface is found to be consistent between the x and y-coordinate reconstructions. Furthermore, the zero-biased error distributions indicate that the model-predicted values are, on average, equally distributed around the true values.
1-D histograms of the prediction error distribution for the total test set along the x and y axis, calculated as the difference between the true and estimated interaction coordinate of all test events. The average FWHM values, calculated following the application of linear interpolation, are presented for both the (a) x and (b) y coordinates.
The relatively low FWHM values of approximately 2.6 mm in the central and intermediate regions indicate a narrow spread of the prediction error distributions. The bias values are found to be approximately zero, which suggests that predictions of the events interacting in both the central and intermediate regions are not biased.
In the upper and lower regions, we observed a degradation in spatial resolution along the y-axis. In fact, the FWHM value for the x-coordinate remains relatively consistent with the previous results obtained for the other regions, indicating that the model’s spatial resolution is not significantly affected along this axis. Conversely, the model demonstrates suboptimal performance in reconstructing the interaction points along the y-axis, as evidenced by the elevated FWHM values. A similar pattern is observed in the MAE associated with the reconstruction of the y-coordinate, which is greater than that for the x-coordinate. This can be attributed to the truncation of the LD along the y-axis for interacting events in the lower and upper regions, as well as to internal reflection phenomena occurring at the edges of the crystal. In both the upper and lower regions, the FWHM deteriorates by 50% or more, whereas the MAE increases by a maximum of 30%. This can be explained by the fact that the FWHM is highly sensitive to the shape of the distribution, whose peak significantly decreases in the lateral regions. Consequently, the MAE can be considered a more representative value of the entire distribution. Furthermore, in the lower region, the negative bias indicates that the model tends to overestimate the value of the y-coordinate, with
Similarly to the upper and lower regions, the left and right ones exhibit a deterioration in spatial resolution along the x-axis, as indicated by the larger FWHM values. This can be attributed to the truncation of the LD along the x-axis, which involves events occurring at the lateral areas of the crystal. The MAE associated with the reconstruction of the x-coordinate is higher than that for the y-coordinate. The same variation in the FWHM with respect to the MAE that is observed in the upper and lower regions is also evident in both the left and right regions. In the left region, the model tends to overestimate the value of the x-coordinate, as evidenced by the negative bias. Conversely, the positive bias observed in the right region indicates that the model has a tendency to underestimate the value of the x-coordinate. Therefore, the x-coordinate of interacting events in the left and right regions is also reconstructed closer to the crystal center. Fig. 8 shows the linearity diagram for the 31 scanned positions along the crystal diagonal (Fig. 3). For each scanned point, the average of the reconstructed x and y coordinate for all events is compared with the true position. The linearity deteriorates near the edges, resulting in an effective FOV around 4 cm, defined as the region of the crystal where the linearity remains monotonically increasing [23], [31].
Linearity diagram along the crystal diagonal, obtained by comparing the true scanning position with the average reconstructed x and y coordinates.
B. Experimental Measurement Analysis
Fig. 9 shows the images obtained with the collimator moving the 137Cs point source in nine different positions. The images are the 2-D histograms of the x and y coordinates of the 137Cs events estimated by the ANN. In Fig. 9, for each image is also reported the corresponding 1-D histogram fitted with a Gaussian distribution used to compute the FWHM of the image. The negative values observed in the histograms result from the background subtraction and represent statistical noise fluctuations. The average FWHM of the nine reconstructed positions was approximately 8 mm. This result is consistent with the dominant contribution of the 8 mm geometric resolution of the collimator. The reconstructed images and the measured centroids of the corresponding distributions are consistent with the displacement of the source with a 3 mm step. This represents a significant achievement, as it illustrates the model’s ability to track the positional changes of the source. The comparison between the expected and measured values of FWHM and centroids is shown in Fig. 10. The theoretical and measured centroid values demonstrate an inverse relationship with the source position, which is due to the pinhole geometry of the collimator. The results reported indicate that the model can accurately reconstruct the 137Cs radiation source position, achieving a mean error with respect to the theoretical expected value of FWHM of about 0.48 mm. Additionally, the model demonstrates an accuracy of 0.7 mm in tracking the source position based on the MAE between the measured and theoretical centroid values.
Comparison between the measured and theoretical FWHM (a) and centroid (b) values for the nine reconstructed source positions. The theoretical values are obtained with the formulas reported in the Appendix, while the measured values are determined by a Gaussian fit of the 1-D histograms (Fig. 9).
C. Comparison With Literature Benchmark
Following the comprehensive evaluation of the model using the metrics outlined in Section II-B4, we now focus on the FWHM parameter, which is commonly used in the literature to estimate the spatial resolution of the implemented models. The FWHM values considered, are the one reported in Table II, and were obtained by fitting the network prediction error distribution for the test dataset. All data in the test set were acquired with 137Cs source inside a tungsten collimator with 1 mm aperture diameter. This allows us to compare the performance of the model implemented in the present study with that of the state-of-the-art. Results from different studies are summarized in Table IV.
The positioning algorithm we developed is based on a supervised ANN regression model. With a system based on a LaBr3 square monolithic scintillator crystal, measuring
The obtained results are encouraging when considering the ANN models developed by Ulyanov et al. [24]. Their system consists of a LaBr3 scintillator with a reflector housing, with dimensions of
Conclusion
A positioning algorithm for the reconstruction of
Appendix Analythical Determination of The Collimator Resolution
We conduct analytical calculations to assess the theoretical geometric resolution of our collimator, aiming to compare it with the results obtained from experimental measurements. This method revolves around evaluating the area that a point
CHX = 5 mm, is the width of the hole in the x direction.
CHY = 5 mm, is the dimension of the hole in the y direction.
CHZ = 48 mm, represents the depth of the channel along the z-axis.
This figure reports the schematic for the first case, where the point x coordinate is between
For simplicity, in accordance with the experimental measurement setup, we will consider the straightforward case of a point moving solely in the x direction with its y coordinate set to zero. To perform these calculations, we need to divide the problem into three parts depending on the point position. We report in Table V with the obtained results of the theoretical resolution and centroids calculated with the formulas reported below, considering a point source moving along the x axis, with fixed y = 0. To take into account penetration effects we used ANTS2 simulations from a previous work [29], [32], to simulate the geometric resolution \begin{equation*} d_{\mathrm { eff}} = \frac {R_{\mathrm { sim}}}{\sqrt {\frac {x+f}{x+{\mathrm { CHZ}}/2}}}. \tag {3}\end{equation*}
The resolution at the object was then evaluated with the following equation:\begin{equation*} R_{o} = \sqrt {R_{\mathrm { thx}}^{2} + R_{d}^{2}} \tag {4}\end{equation*}
A. First Case:$-\textrm {CHX}/\textit {2}\,\lt \,Vx\,\lt \textrm {CHX}/\textit {2}$
First we evaluate the distance VH refers to the distance from the point V to the point H, Considering Vy=0 and x and f are the distances from the source plane and the detection plane to the hole center h and are fixed to 30 cm\begin{align*} \textrm {VH}=& \sqrt {(Vx-Hx)^{2}+(Vy-Hy)^{2}+(Vz-Hz)^{2}} \tag {5}\\ \textrm {VH}=& \sqrt {(Vx)^{2}+(x+\textrm {CHZ}/2)^{2}}. \tag {6}\end{align*}
\begin{equation*} {\mathrm { CDP}}x = -Vx*\frac {x-\textrm {CHZ}/2}{x+\textrm {CHZ}/2}. \tag {7}\end{equation*}
\begin{equation*} \textrm {VD} = \sqrt {(Vx-{\mathrm { CDP}}x)^{2}+(2x)^{2}}. \tag {8}\end{equation*}
For a knife-edge pinhole collimator [34], the point h is coincident with the point H, so if the point V is at the FOV center (\begin{align*} R_{\mathrm { th}}^{2}=& d^{2} * \frac {x+f}{x} \tag {9}\\ R_{\mathrm { th}}=& d * \sqrt {\frac {x+f}{x}}. \tag {10}\end{align*}
For a channel-edge collimator, the projections onto the detection plane of the hole, CHDx and CHDy, are not the same. Therefore, the resolution has two components\begin{align*} R_{\mathrm { thx}}=& {\mathrm { CHD}}x = \textrm {CHX} * \sqrt {\frac {\textrm {VD}}{\textrm {VH}}} \tag {11}\\ R_{thy}=& {\mathrm { CHD}}y = \textrm {CHY} * \sqrt {\frac {\textrm {VD}}{\textrm {VH}}}. \tag {12}\end{align*}
For this work, considering all the measurements points with Vy=0, the resolution on the y direction is calculated as\begin{equation*} R_{thy} = \textrm {CHY} * \sqrt {\frac {x+f}{x+\textrm {CHZ}/2}}. \tag {13}\end{equation*}
B. Second Case: $Vx\,\lt \,-\textrm {CHX}/\textit {2}$
(Ref. To Fig. 12)
\begin{align*} dx=& \frac {|Vx+\textrm {CHX}/2|*\textrm {CHZ}}{x-\textrm {CHZ}/2} \tag {14}\\ Hx=& \frac {dx}{2} \tag {15}\\ \textrm {VH}=& \sqrt {(Vx-Hx)^{2}+(Vy-Hy)^{2}+(Vz-Hz)^{2}} \tag {16}\\ \textrm {VH}=& \sqrt {(Vx-Hx)^{2}+(x+\textrm {CHZ}/2)^{2}} \tag {17}\\ {\mathrm { CDP}}x=& \frac {-(Vx-Hx)*(x-\textrm {CHZ}/2)}{x+\textrm {CHZ}/2} + Hx \tag {18}\\ \textrm {VD}=& \sqrt {(Vx-{\mathrm { CDP}}x)^{2}+(Vz-{\mathrm { CDP}}z)^{2}} \tag {19}\\ \textrm {VD}=& \sqrt {(Vx-{\mathrm { CDP}}x)^{2}+(2x)^{2}} \tag {20}\\ R_{\mathrm { thx}}=& {\mathrm { CHD}}x = (\textrm {CHX}-dx) * \sqrt {\frac {\textrm {VD}}{\textrm {VH}}}. \tag {21}\end{align*}
This figure reports the schematic for the second case, where the point x coordinate is minor than
C. Third Case: $Vx\,\gt \textrm {CHX}/\textit {2}$
(Ref. To Fig. 13)
\begin{align*} dx=& \frac {|Vx-\textrm {CHX}/2|*\textrm {CHZ}}{x-\textrm {CHZ}/2} \tag {22}\\ Hx=& -\frac {dx}{2} \tag {23}\\ \textrm {VH}=& \sqrt {(Vx-Hx)^{2}+(Vy-Hy)^{2}+(Vz-Hz)^{2}} \tag {24}\\ \textrm {VH}=& \sqrt {(Vx-Hx)^{2}+(x+\textrm {CHZ}/2)^{2}} \tag {25}\\ {\mathrm { CDP}}x=& \frac {-(Vx-Hx)*(x-\textrm {CHZ}/2)}{x+\textrm {CHZ}/2} + Hx \tag {26}\\ \textrm {VD}=& \sqrt {(Vx-{\mathrm { CDP}}x)^{2}+(Vz-{\mathrm { CDP}}z)^{2}} \tag {27}\\ \textrm {VD}=& \sqrt {(Vx-{\mathrm { CDP}}x)^{2}+(2x)^{2}} \tag {28}\\ R_{\mathrm { thx}}=& {\mathrm { CHD}}x = (\textrm {CHX}-dx) * \sqrt {\frac {\textrm {VD}}{\textrm {VH}}}. \tag {29}\end{align*}
This figure reports the schematic for the Third case, where the point x coordinate is greater than
ACKNOWLEDGMENT
All authors declare that they have no known conflicts of interest in terms of competing financial interests or personal relationships that could have an influence or are relevant to the work reported in this article.
NOTE
Open Access provided by 'Politecnico di Milano' within the CRUI CARE Agreement