Artificial intelligent identification of apatite fission tracks based on machine learning

Over the past half century, apatite fission track (AFT) thermochronometry has been widely used in the studies of thermal histories of Earth’s uppermost crust. The acquired thermal histories in turn can be used to quantify many geologic processes such as erosion, sedimentary burial, and tectonic deformation. However, the current practice of acquiring AFT data has major limitations due to the use of traditional microscopes by human operators, which is slow and error-prone. This study uses the local binary pattern feature based on the OpenCV cascade classifier and the faster region-based convolutional neural network model based on the TensorFlow Object Detection API, these two methods offer a means for the rapid identification and measurement of apatite fission tracks, leading to significant improvements in the efficiency and accuracy of track counting. We employed a training dataset consisting of 50 spontaneous fission track images and 65 Durango standard samples as training data for both techniques. Subsequently, the performance of these methods was evaluated using additional 10 spontaneous fission track images and 15 Durango standard samples, which resulted in higher Precision, Recall, and F1-Score values. Through these illustrative examples, we have effectively demonstrated the higher accuracy of these newly developed methods in identifying apatite fission tracks. This suggests their potential for widespread applications in future apatite fission track research.


Introduction
The fission track method (Silk and Barnes 1959, Price and Walker 1962, Fleischer et al 1965) has been applied to resolve many geological problems such as determining the thermal history of sedimentary basins (Gleadow et al 1986, Emmel et al 2014), the timing of fault activities (Roden-Tice and Wintsch 2002, Abbey and Niemi 2018), source-sink coupling during mountain building processes (Ruiz et al 2004, Chen et al 2020), uplift histories of orogenic belts (He et al 2018, Bonilla et al 2020, Wang et al 2023), regional tectonic evolution (Grist and Zentilli 2003), and mineralization (Chakurian et al 2003).In the 1980s and 1990s, the apatite fission track dating method has been greatly improved after the introduction of ζ age parameter reference, the performance of annealing experiments, the development of annealing models, and the quantification of apatite multivariate kinetic annealing processes (Hurford and Green 1983, Laslett et al 1987, Green et al 1989, Vrolijk et al 1992).
The fission track dating method is a valuable tool in geology as it provides information not only on the age of a geologic event but also on the thermal history of a sample.For instance, fission track lengths can be used to determine the age and cooling rate of an orogenic uplift event.The thermal history of orogenic development can also be modeled using software like HeFty and QtQt (Vermeesch and Tian 2014).There are several methods for fission track identification and counting including the external-detector method, subtraction method, re-etching method, and re-polishing method.Currently, the external detector method is the most widely used method for fission track thermochronology.This method determines the fission track age by counting the fossil fission tracks in minerals and induced-fission tracks in external detectors.In the present study, fission tracks were obtained using the external detector method.The procedure involved collecting rock samples, isolating apatite crystals, creating thin sections, etching the sections, irradiating the samples with thermal neutrons, processing post-irradiation, and counting the number and distribution of fission tracks.
Determining the number and length of fission tracks may be the final step in the dating procedure, but it is also the most important and challenging step.This work forms the foundation for subsequent studies such as dating and thermal history simulation.Traditionally, fission track statistics were obtained through manual observations using a microscope to count the track lengths.This process can be time-consuming for the operator and prone to counting errors, leading to a low efficiency of fission track identification.To improve efficiency, technology with automatic recognition capabilities is necessary.
The initial investigations into the automatic recognition of fission tracks utilized image morphology analysis (Petford et al 1993, Gleadow et al 2009).This approach entailed the conversion of the transmitted light-reflected light image of fission tracks into a binary image followed by using a threshold segmentation procedure to separate the two images.The overlapping features in the two binary images were then extracted and used for recognition.
In recent years, machine learning has developed rapidly and has applications in many fields that work with large data sets.Many algorithms have been developed for data mining with particular applications to Earth science research (Fleming et al 2021, Recanati et al 2021, Zhang et al 2021), such as rock classification, stratigraphic analysis, earthquake prediction, landslide statistics, and geochemistry (Li et al 2018, Baraboshkin et al 2020, de Lima et al 2020, Xu et al 2021).
Object detection technology is a widely researched area in machine learning.It can be divided into traditional algorithms and deep learning algorithms, with the latter being the current mainstream.Traditional object detection algorithms have been applied in image processing and face recognition, but they suffer from low efficiency and low recognition rates.The advent of regional convolution neural networks has propelled object detection technology into the deep learning era, resulting in a significant improvement in detection accuracy (Girshick 2015).
In recent years, significant advancements have been made in the field of intelligent identification of apatite fission tracks, thanks to the progress in target detection technology.Researchers have achieved notable progress by employing cutting-edge techniques.For instance, Nachtergaele et al successfully developed a deep neural network that demonstrates exceptional capabilities in intelligently identifying apatite fission tracks, yielding highly accurate results (Nachtergaele and Grave 2021).Similarly, Li et al utilized a convolutional neural network (CNN) to extract semi-tracks through image semantic segmentation, thereby contributing to the study of intelligent identification methods for apatite fission tracks (Li et al 2022).These advancements highlight the promising trajectory of research in this area.
This paper employs two novel object detection algorithms.The first is the TensorFlow Object Detection API based on faster region-based convolutional neural network (R-CNN) (Ren et al 2017), which integrates feature extraction, candidate area extraction, object location, and object classification into a single network, thereby enhancing recognition capabilities.We also employed the local binary pattern (LBP) feature-based OpenCV cascade classifier object detection method for comparison (Ojala et al 2000).
After selecting the two approaches, we gathered and filtered the respective experimental data (photographs of apatite fission track samples).We carefully selected clear and representative photos of apatite fission track samples.These sample photos were preprocessed to establish the necessary experimental conditions for running the two methods.Subsequently, each method was individually trained while continuously adjusting the training duration, the amount of training samples, and the model parameters.The experimental results of both methods were calculated, and a comparison and discussion were conducted on their Precision, Recall, and F1-Score.

Data and methods
Tracks that have not undergone chemical etching are referred to as latent tracks, while fission tracks that have been etched become linear grooves with defined lengths.Usually, these tracks lack a preferred orientation.However, in some cases, 'noise' on the etched surface of apatite, such as defects and scratches, can interfere with track identification.These challenges make the identification of fission tracks difficult.To overcome these issues, we use two newly developed methods for removing these effects.

Experimental method 2.1.1. OpenCV processing image recognition
OpenCV stands for open source computer vision library, which primarily uses image processing and machine learning algorithms to address related problems.Compared to other computer vision recognition libraries, OpenCV boasts several advantages, such as multiple language interfaces, cross-platform compatibility, robust development, and a plentiful API.
In this paper, we use the OpenCV cascade classifier based on LBP features for our method.LBP is a tool for capturing the local texture features of an image, primarily utilized for texture feature extraction (Ojala et al 1996).It operates within a 3 × 3 window where the center pixel is used as a threshold and the grayscale values of the eight surrounding pixels are compared to it.If the peripheral pixel value is greater than the center pixel value, the pixel's position is marked as 1; otherwise, it is marked as 0. By comparing the 8 points in the 3 × 3 neighborhood, 8-bit binary numbers are generated, which represent the LBP value of the center pixel and depict the texture information of the area (figure 1, Ojala et al 2000).
The process is described by the equation: In the equation, g p is the gray value of the pixel on the circle with the center pixel and R as the radius, g a is the gray value of the center pixel in the corresponding local neighborhood, and P is the number of surrounding pixels points.
The experiment employs the use of the cascade classifier, which is based on the LBP algorithm and provided by OpenCV.This classifier comprises many weak classifiers that are designed to classify different features of detection targets.The classifiers at each level are more complex than those at the previous level.Multiple weak classifiers work together, and different features are extracted from each window, which are then fed into different weak classifiers for judgment.If all the labels judged by the weak classifiers are positive samples, the target is detected in the smoothing window.The classifier at each layer of the cascade is trained and optimized based on the results of the previous layer.This enables negative samples to be quickly eliminated and reduces the number of misclassified samples, improving the overall classification performance without increasing the computational complexity.

TensorFlow object detection API processing image recognition
The TensorFlow Object Detection API is a programming interface that utilizes TensorFlow to tackle object recognition issues such as real-time object identification.It boasts a reliable API, a streamlined workflow, excellent system compatibility, and highly efficient recognition capabilities.The API comprises object detection frameworks, including single shot multibox detector (SSD), region with CNN feature (R-CNN), and region-based fully convolutional network (R-FCN).For these models, integrated experiments can also be conducted by combining different feature extraction networks.Typical feature extraction networks include VGG, Inception v3, ResNet-101, Inception ResNet, etc (Al-Azzo et al 2018).
The Faster R-CNN algorithm is the method employed in this study.As a typical two-stage object detection model, Faster R-CNN builds on the R-CNN and Fast R-CNN algorithms.The key difference is the use of a region proposal network (RPN) to generate candidate proposal windows.The Faster R-CNN detection process is composed of four major components: (1) a feature extraction network, which extracts features from the input image and outputs a feature map for use by the RPN and fully connected layer; (2) a When training RPN, the Anchor is divided into two categories.An anchor with a target in the box is labeled as a positive sample.An anchor without a target in the box is labeled as a negative sample.The loss function of the RPN network consists of two components, which are classification loss (L cls ) and boundary regression loss (L reg ).The equations are as follows (Ren et al 2017): where p i represents the probability that the ith Anchor predicted by the network is the target, p * i represents the true value corresponding to p i .If the Anchor is positive, p * i is 1, and if the Anchor is negative, it is 0, t i is a vector representing the 4 parameterized coordinates of the prediction bounding box, indicating the offset between the prediction box and the Anchor box, t * i represents the true value corresponding to t i , indicating the offset between the true value and the Anchor box.N cls is set to the size of the batch, and N reg is set to the total number of Anchors, λ is the balance parameter used for the two loss functions.
The faster_rcnn_inception_v2 model uses the Inception V2 network as its base network.This network is a pretrained CNN that has been trained on large-scale image data and has good feature extraction capabilities.It consists of multiple convolutional layers, pooling layers, and fully connected layers.In the Inception V2 network, advanced features of the image are gradually extracted through multiple convolution operations.Each convolutional layer slides a convolutional kernel over the input image to extract features and obtain an output feature map.As the number of layers increases, the receptive field gradually increases, allowing the model to model a larger range of image information (Ioffe and Szegedy 2015).

Data construction
In this study, we utilized apatite fission tracks obtained through the external detector method.We employed two Durango samples, which are recognized as the standard in apatite fission track dating.The ages of the two samples are 31.4± 0.5 Ma (Wang et al 2018) and 31.02± 1.01 Ma (Mcdowell et al 2005), respectively.Our sample collection consisted of 20 images of Dur1 (Durango sample 1) and 60 images of Dur2 (Durango sample 2).A Zeiss microscope equipped with the Autoscan TrackWorks software, with a magnification setting of 1000, was used to generate sample images.The images of spontaneous fission tracks, with dimensions of 2048 px × 1536 px, were taken and numbered Qi (60 in total).These images were sourced from granite samples of the Qimen Tagh Range located on the northeastern margins of the Tibetan Plateau.The apatite fission tracks from these images dated from 58.7 ± 3.6 Ma to 239.5 ± 29.8 Ma.A total number of 50 images of Qi, 15 images of Dur1, and 50 images of Dur2 were selected as the training data images.Meanwhile, ten images of Qi, five images of Dur1, and ten images of Dur2 were used as test data images.These test samples were manually counted and compared against machine learning methods (table 1).

Experimental design
Object detection is a subcategory of image recognition.In image recognition, the goal is to identify different objects present in an image, while in object detection, not only do the objects need to be recognized but also their specific location must be identified.Conducting experiments on object detection requires image labeling of the experimental data, where the objects to be recognized are assigned specific labels to distinguish them from other objects in the image.In this experiment, two methods were used, and the same training sample was used for both methods.However, the data processing methods were different.In the first method, which used OpenCV's cascade classifier, the entire training image was cut into positive and negative samples, and this was used for data processing.In contrast, for the second method, which used TensorFlow Object Detection API, Labelimg software was used to label the entire image, and the fission track was divided into two labels: opaque and transparent.

OpenCV cascade classifier for image processing
The experiment employed OpenCV's cascade classifier to preprocess the images.The primary step in data preprocessing involved uniformly cutting the parts of the large image containing tracks into 40 × 40 pixel images and then converting them to grayscale to be used as positive samples (figure 3).The images without fission tracks were also cropped and utilized as negative samples.The sample size is specified below (table 2).
The objective of creating positive and negative sample description files with corresponding samples is to produce vectorized data.The opencv_createsamples.exe program, which is part of OpenCV, can be used to create a vectorized positive sample set (.vec file) from the positive samples and their description files.The subsequent step involves utilizing OpenCV's training classification tool (opencv_traincascade.exe) for the classification training.Upon completion of the training, a final model (cascade.xml)will be generated.Finally, the trained cascade classifier is employed for detecting the target of apatite fission track images.

TensorFlow object detection API for image processing
The TensorFlow Object Detection API simplifies image preprocessing compared to the OpenCV cascade classifier, as it does not require the preparation of positive and negative samples.Instead, it is necessary to annotate the apatite fission track images.During experiments, the tracks exhibit diverse shapes, so to ease training, we categorize the training samples into two groups based on the transparency of the tracks: transparent and opaque (figure 4).
We calculate the results of the two labels in a unified way in the final result testing stage.The training sample used is based on the data shown in the training set in table 1.The marking data quantity of opaque and opaque labels is shown in the following table (table 3).
Labelimg is a graphical tool for image annotation, which converts label information into XML files for storage and exchange.The datasets were annotated manually using Labelimg by drawing bounding boxes around the targets and labeling them accordingly.Upon completion of the annotation, an XML file is generated automatically.However, to be compatible with TensorFlow's operating environment, it is necessary to convert the XML file to a CSV file and then to a TensorFlow-compatible TFRECORD file.After the conversion is completed, the parameter setting and training of the model can be performed.

Sample name Number
Positive samples 1000 Negative samples 2000

Sample name Number
Opaque samples 5200 Transparent samples 800

Experiment results
The experimental results of different methods are evaluated by the same evaluation method.Evaluation indicators are an important basis for evaluating the goodness of target detection algorithms.There are many kinds of evaluation indicators, among which the more typical ones are Precision (P) and Recall (R), with the following formulas: The true positive (TP) represents correctly identified fission tracks, the false positive (FP) represents the incorrectly identified fission tracks, and the false negative (FN) represents the fission tracks that were not identified.We used two different target detection models, thus it was necessary to choose between the two sets of Precision and Recall.Hence, we used F1-Score (F 1 ) as a measure of the classification problem.It is the average of Precision and Recall, which integrates the results and ranges from 0 to 1, with 1 being the best and 0 the worst output of the model.The formula for the F1-Score is as follows: Tables 5 and 6 show the results of the OpenCV cascade classifier and TensorFlow Object Detection API, in which Image1-Image10 is sample Qi, Image11-Image15 is sample Dur1, and Image16-Image25 is sample Dur2.The number of fission tracks in artificially identified test pictures is Xa, and the number of fission tracks identified by the machine learning method is Xm.The experimental results using the OpenCV cascade classifier method are as follows (table 5).The experimental results using the TensorFlow Object Detection API method are as follows (table 6).
For the validation of the Qi sample (Wang et al 2018), a total of ten images (Image1-Image10) were used, with the manual identifications ranging from 9 to 39.The OpenCV cascade classifier had an average Precision of 78.1%, an average Recall of 74.7%, and an average F1-Score of 76.0%.The TensorFlow Object Detection API based on the Faster R-CNN algorithm had an average Precision of 95.3%, an average Recall of 74.8%, and an average F1-Score of 83.2%.
For the verification of the Dur1 sample (Wang et al 2018), a total of five images (Image11-Image15) were used, with manual identifications ranging from 23 to 31.The OpenCV cascade classifier had an average Precision of 83.7%, an average Recall of 80.6%, and an average F1-Score of 81.7%.The TensorFlow Object Detection API based on the Faster R-CNN algorithm had an average Precision of 99.1%, an average Recall of 91.9%, and an average F1-Score of 95.3%.
For the verification of the Dur2 sample (Mcdowell et al 2005), a total of ten images (Image16-Image25) were used, with manual identifications ranging from 23 to 45.The OpenCV cascade classifier had an average Precision of 69.7%, an average Recall of 76.2%, and an average F1-Score of 72.5%.The TensorFlow Object Detection API based on the Faster R-CNN algorithm had an average Precision of 91.0%, an average Recall of 91.4%, and an average F1-Score of 91.1%.
For the apatite fission tracks tested using the OpenCV cascade classifier, the average Precision was 75.9%, the average Recall was 76.4%, and the average F1-Score was 75.7%.On the other hand, the TensorFlow Object Detection API, based on the Faster R-CNN algorithm, recorded an average Precision of 94.4%, Recall of 84.9%, and F1-Score of 88.8%.
Figures 5 and 6 show the results of the sample OpenCV cascade classifier based on LBP and the TensorFlow Object Detection API based on the Faster R-CNN algorithm, respectively.

Experimental discussion
From the experimental results table (table 5), it can be seen that the average accuracy of Precision, Recall, and F1-Score using the OpenCV cascade classifier based on LBP is above 75%.And it can be found that almost all of the test images show fission track recognition errors, and the number of recognition errors is high compared to that of using the TensorFlow Object Detection API.On the whole, the overall average accuracy rate of the Recall of the verified samples is higher than the overall average accuracy rate.This shows that there are more identified fission tracks than unidentified ones.
In the experimental results (table 6), the TensorFlow Object Detection API based on the Faster R-CNN algorithm achieves an average accuracy of over 84% for Precision, Recall, and F1-Score.It outperforms the OpenCV cascade classifier approach in terms of average Precision, with a value close to 95%.However, the overall average Precision is higher than the overall average Recall, indicating that more fission tracks are not identified compared to the misidentified ones.
From the experimental results table, it can be observed that the average Precision, Recall, and F1-Score accuracy of both methods is higher for the Dur1 sample than for the Qi and Dur2 samples.This is due to the lower background interference in the training images and fewer overlapping fission tracks in the Dur1 sample.The average Precision accuracy of both methods for the Dur1 and Qi samples is higher than the average Recall accuracy, indicating that there are more unidentified fission tracks than misidentified ones.In contrast, for the Dur2 sample, the average Precision accuracy is lower than the average Recall accuracy, meaning that there are more misidentified fission tracks than unidentified ones.The results of Precision, Recall, and F1-Score, depicted in the graphs (figure 7), demonstrate that the TensorFlow Object Detection API, based on the Faster R-CNN algorithm, outperforms the OpenCV cascade classifier based on LBP.The average accuracy of Precision, Recall, and F1-Score for the TensorFlow Object Detection API is higher, proving its superior performance in recognizing apatite fission tracks compared to the OpenCV cascade classifier.
The results of both methods are based on trained data.By drawing Precision-Recall Curve (figure 8), the TensorFlow Object Detection API method has a more comprehensive algorithm and feature analysis, resulting in a higher accuracy rate in recognizing apatite fission tracks with many overlapping tracks, inconspicuous features, and short tracks.
The OpenCV cascade classifier, on the other hand, has a certain accuracy in dealing with scattered, single, and well-defined fission tracks.Both methods can automatically identify apatite fission tracks.The OpenCV cascade classifier has the advantage of being easy to set up and faster in training speed, but its accuracy may be low in complex situations due to its algorithmic limitations.

Advantages and disadvantages
From the data result table and experimental result chart of the two aforementioned experimental methods, it is evident that the average accuracy of Precision, Recall, and F1-Score achieved through the utilization of TensorFlow Object Detection API exceeds 84%.On the other hand, the average accuracy of Precision, Recall, and F1-Score obtained by employing the OpenCV cascade classifier surpasses 75%.While most fission tracks can be successfully identified, the identification efficiency requires enhancement when compared to other studies on intelligent identification of apatite fission tracks.There are still numerous instances of both non-identification and misidentification, indicating a lack of effective handling of overlapping fission tracks.In addition to the aforementioned issues, the two methods employed in this experiment offer certain advantages when compared to other existing studies on apatite fission track.Notably, both methods are characterized by their convenience of use.The TensorFlow Object Detection API boasts a comprehensive framework that allows for the utilization of various target detection models without necessitating extensive parameter adjustments.On the other hand, the OpenCV cascade classifier stands out due to its simple model configuration, short training duration, and minimal environmental requirements, setting it apart from alternative approaches.

Problems encountered in the experiment
Compared to other intelligent research on apatite fission track, the two methods employed in this study exhibit lower recognition efficiency.The specific reasons for this are summarized as follows: (1). the number of training data samples is small compared to the amount of training data in most experiments.(2).Some of the training data samples have poor picture quality and many overlapping fission tracks.(3).The data samples have many background interference, which affects the recognition process.
Firstly, the limited number of training data samples used in this experiment contributes to the insufficient diversity of the objectives.Additionally, the quality of the training data samples, which were captured through microscopy, is partially dependent on the accuracy of the experimental equipment.This can lead to inaccuracies in the pre-processing marking.To address these issues, we recommend increasing the sample size of the training data, improving the quality of the training data, and adjusting the model parameters.
Secondly, during the verification process with fission track images, it is common to come across overlapping tracks, which greatly affects the object identification statistics.Although simple overlapping tracks can still be identified, a large number of overlapping tracks in some samples make some tracks unidentifiable.This presents the biggest challenge so far.Even manual recognition of overlapping track statistics is difficult.However, our study reveals that the overlapping track portion is not predominant.Hence, we suggest combining machine recognition with human recognition, enabling human recognition to correct machine recognition results to improve experiment accuracy.
Finally, background interference in the test sample can also negatively impact the accuracy of fission track recognition.In some cases, 'noise' on the etched surface of apatite, such as defects and scratches, can interfere with track identification (figure 9).This makes it challenging to differentiate and identify fission tracks.Our solution to this issue is to minimize the interference factors in the sample through manual elimination during the pre-processing stage of the training data.

Conclusions
The study presented in this paper employed two machine learning methods for fission track identification, with the following main conclusions: (1) Results from the experiments revealed that the TensorFlow Object Detection API outperforms the OpenCV cascade classifier in terms of fission track recognition.The API had an average Precision of 94.4%, Recall of 84.9%, and F1-Score of 88.8%, while the cascade classifier had an average Precision of 75.9%,Recall of 76.4%, and F1-Score of 75.7%.(2) The experiments encountered three challenges: a small number of training data samples with low quality, high levels of overlapping fission tracks, and high background interference in the samples.The solutions proposed were: increasing the number and quality of training data, combining machine recognition with manual recognition, and manually eliminating background interference factors during sample pre-processing.(3) In terms of ease of operation, the OpenCV cascade classifier environment is simpler and more convenient to build and operate compared to the TensorFlow Object Detection API.However, the API offers better integrity, allowing for monitoring of the entire training session.(4) The two target detection methods explored in this study offer the potential for wider use in the geology field.For instance, in rock research, target detection can aid in identifying rock types.Additionally, in the study of geological structures, utilizing target detection can assist in locating significant geological features such as fracture zones or volcanic craters through remote sensing images.To fully utilize the capabilities of deep learning in traditional geology, it is crucial to adopt a technically savvy approach and effectively integrate multiple methods to maximize their potential in furthering the development of geology.

Figure 2 .
Figure 2. Flow chart of Faster R-CNN detection.

Figure 9 .
Figure 9. Fission track and scratch (1 is scratch and 2 is fission track).

Table 1 .
Fission track data table.

Table 2 .
OpenCV positive and negative sample data table.

Table 3 .
TensorFlow object detection API label sample data table.

Table 4 .
The important hyperparameters of TensorFlow object detection API.The training model used in this experiment is faster_rcnn_inception_v2.Using the TensorFlow-GPU version, compared to the TensorFlow-CPU version, the GPU operation will process graphics and images faster, shortening the training time.The important parameter settings in this training, are the batch size (the number of training samples at a time) is set to 10, and the training steps are set to 100 000.The important hyperparameters settings in this training are as follows (table 4):

Table
OpenCV test result table.

Table 6 .
TensorFlow object detection API test result table.