**1. Introduction**

With the prosperous development of the railway industry, the mileage, speed and density of operations continue to increase, and the inspection requirements for railways are further improved [1]. When it runs at high speed, the phenomena such as friction, rolling contact and elastic deformation occur between the train and the track surface. With the running time increasing, it will result in rail surface defects, such as rail wear, broken, peeling and cracks, which seriously threaten the safety of the rail transit system [2]. Therefore, it is particularly important to study the detection methods for railway surface defects.

As a traditional method for rail surface detection, manual inspection [3] is characteristic of time-consuming, labor-intensive [4] and low detection efficiency [5]. With the development of defect detection technology, many rail surface defect detection methods have emerged, such as ultrasonic flaw detection [6], eddy current flaw detection [7], threedimensional detection [8], radar detection [9] and so on. The above methods are very effective in detecting internal defects. However, the signals generated by the defects on railway surfaces are very weak, and they are difficult to detect by the above methods. At the same time, the defect signals are easily interfered with by the surrounding environment, leading it difficult to achieve satisfying results. There is still a big margin for improvement in the detection technology of rail surface defects.

With the development of computer technology, the machine vision [10] method is applied to rail surface defect detection.  A Study on Railway Surface Defects Detection Based on Machine Vision. *Entropy* **2021**, *23*, 1437. https://doi.org/10.3390/e23111437

Academic Editors: Yongbo Li, Fengshou Gu and Xihui (Larry) Liang

Received: 1 September 2021 Accepted: 26 October 2021 Published: 30 October 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

required length. Defect data are obtained by manual screening from actual detection images for model training and testing. This method requires an analysis of rail surface defect information, gray information [11] and background information [12]. It needs to use a feature extraction algorithm [13] or to use an operator template and model-based threshold segmentation method [14] to detect rail surface defects. However, these methods are susceptible to defect characteristics that may lead to blind spot detection [15]. This makes it difficult for machine vision methods to obtain good detection performances.

In recent years, with the development of target detection technology and the neural network [16], deep learning frameworks have been proposed for the detection of various railway components. Liu et al. [17] proposed a method based on image fusion features and Bayesian compression image classification and recognition, which detected the status of fasteners by extracting improved edge orientation histograms (IEOH) and macroscopic local binary pattern (MSLBP) features. Cui et al. [18] segmented the fastener image into different parts to avoid the interference of the fastener fragments and tested the segmentation model in a real-time deep learning module.

In the application of a deep learning framework for rail surface defect detection, Xu et al. [19] proposed to improve the Faster R-CNN (Convolutional Neural Networks) for railway subgrade defect recognition. The improved method can obtain good performance, but it has disadvantages such as a slow detection speed and large detection model. Lu et al. [20] proposed to apply the combined U-Net graph segmentation network and damage location method for damage detection of high-speed railways. This method can obtain a high detection accuracy but has the limitations of slow detection speed and large model volume. Yuan et al. [21] proposed the application of MobileNetV2 to detect rail surface defects, which achieved high-speed real-time detection, but the detection accuracy was low. Faghih-Roohi et al. [22] proposed improved deep convolutional neural networks (DCNN) to efficiently extract and recognize image features, and a small batch gradient descent method was used to optimize the network for the automatic detection of track surface defects. This method requires a long time for network training. Song et al. [23] proposed a deep learning method where the YOLOv3 (You Only Look Once, YOLO) algorithm was used to detect rail surface defects. This method has a fast detection speed but low detection accuracy.

In order to solve the above problems, this paper proposes an improved YOLOv4 [24] rail surface detection method. It studies the use of the MobileNetV3 lightweight network as the backbone of YOLOv4. Depthwise separable convolution is applied for the PANet layer in YOLOv4 to further reduce the amounts of the parameters. It treats rail surface defect detection as an end-to-end regression problem and ensures the effectiveness of rail surface defect detection with a simplified network, improving the detection speed and accuracy. It provides a new idea for rail surface defect detection technology.

The main contributions of this paper are as follows: (1) The MobileNetV3 network is proposed to optimize the YOLOv4 model for rail surface defect detection, using depthwise separable convolution for the PANet layer in YOLOv4. This method optimizes the parameter quantity and model size and improves the detection speed. (2) Field tests are conducted on the track to collect data, a dataset is created with Gaussian noise added, and finally, a rail surface defect detection model is established. The test results show that the method used in the study can effectively detect rail surface defects.

The rest of this article is organized as follows. The second part discusses the theoretical background of YOLOv4 and depth separable convolution. The third part gives the technical route of the proposed method. The fourth part verifies the effectiveness of the method through practical application. Finally, the conclusion is drawn in Section 5.

#### **2. Theoretical Background**

The deep learning and machine vision-based object detection methods are widely used in the current research. For the application of these methods, firstly, a large number of images is collected to establish the image datasets, and secondly, image annotation is performed on the object to be detected in the dataset to obtain the object information; then, a training dataset and the object information are trained by the deep network to obtain a deep network model, and finally, the trained model is used for the object detection test. Among them, the most important part is the training of the deep network model. At this stage, the target detector is mainly composed of four parts: input, backbone, neck and head. As shown in Figure 1, the structure of the one-stage network is simpler than the two-stage one, in which a sparse prediction is added.

**Figure 1.** Object detector framework.

Before the YOLO [25] algorithm was proposed, the R-CNN [26] algorithm was one of the most popular algorithms in the two-stage field. CNN has been applied to target detection and formed a relationship with R-CNN [27], the algorithm region. First, the selective search [28] or edge box of the algorithm is used to generate candidate regions [29], and then, each region is trained and classified in the CNN. Compared with the onestage algorithms, the detection speed of the two-stage ones is slower. Therefore, a YOLO algorithm with the characteristics of the one-stage network structure is proposed. Its core concept is to convert the target detection into a regression problem, and the target map is used as the input of the network. Only through a neural network can the position of the bounding box and the target category be obtained. A fast detection speed and high precision can be realized through the feature information.

The YOLOv4 algorithm is improved from the basis of YOLOv3. As a powerful target detection algorithm, a fast and accurate target detector can be trained by YOLOv4. As shown in Figure 1, the network structure is mainly composed of a backbone network, a neck network and a head network. CSPDarknet53 is applied in the backbone network, an SPP add-on module and PANet path aggregation is performed in the neck network and the YOLOv3 head network is used as the head network.

The PANet layer uses an instance segmentation algorithm. The network structure is shown in the neck part of Figure 2. Compared with the feature pyramid networks (FPN) network, the DownSample operation is added in PANet after UpSample to repeatedly improve the features. Parameter aggregation is carried out on the different backbone layers. It further improves the ability of feature extraction. In YOLOv4, the PANet structure is mainly used in the three effective feature layers.

**Figure 2.** YOLOv4 structure diagram.


**3. Conductive Ag-glass composite powder**

Ag has very high conductivity, and thus, it has been used as an electrode for solar cells and various electric circuits [18–20].

The electrode layer formed is mixed with glass frit and an inorganic binder in addition to the conductive powder and organic binder to form a paste through heat treatment after printing. The glass frit plays an important role when sintering power by acting as a pool of liquid sintering agent, as well as in densification by helping to form an electrode layer without pores between the powders. Since a small amount (The mixing ratio of the conductive powder of the electrode and the glass frit is generally at least 8–20 times different) is added compared to the conductive powder, it is very difficult to evenly disperse it throughout. In addition, when a large amount is added to evenly disperse the entire electrode layer, the content of the conductive powder must be relatively low due to the density of the paste, which causes a problem of lowering the conductivity. In order to overcome this problem, the electrode powder synthesis technology in which glass and Ag powder are composited into a core-shell

**Figure 1.**

*Formation mechanism of silver-glass composite powder [21].*


**2. Morphogenesis and Development**

GAGs, as essential constituents of the human glycome, play pivotal roles in a multitude of biological processes during embryonic development and in the maintenance of homeostasis. Such roles can be observed throughout the structural mold of aggregan and the diversity of its decoration by GAGs. The development of vertebrates from a single cell to the generation of various cell types and organs is carried out throughout a synchronized developmental program consisting of the spatial and temporal coordination of specific signaling molecules, including morphogens and growth factors. The importance of specific arrangements of GAG chains on aggrecan in all of its forms is also a primary morphogenetic functional determinant. It provides aggrecan with unique tissue-context-dependent regulatory properties. The versatility displayed by aggrecan in biodiverse contexts is a function of its GAG side chains [7].

The article by Colin-Pierre et al. [8] describes the evolution of heparan sulfate proteoglycans in hair follicles. The heparan sulfate proteoglycan distribution in hair follicles has traditionally been done by conventional histology, biochemical analysis, and immunohistochemistry. The authors use the absorption region that is relevant to sulfation as a spectral marker. This is performed using infrared spectral imaging (IRSI), which has been used intensively for cell (spectral cytology) and tissue (spectral histology) characterization. Supported by Western blot and immunohistochemistry analysis, infrared spectral imaging specifically shows the qualitative and/or quantitative evolution of the GAGs expression pattern between the anagen, catagen, and telogen phases. Moreover, this demonstrates that IRSI could be utilized for GAG cytology and tissue characterization.


**5. Conclusions**

The current investigation has described the advantage of serving in padel by comparing points won by servers and receiving players after a di fferent number of shots within rallies. Given the server has a significant advantage, the aim of the return is to avoid the serving pair winning the rally quickly. This could be best achieved by good depth on lobs, regardless of the direction, and pace on straight shots, predominately aimed toward the server [16]. Statistical di fferences according to gender and court side were found. Female players execute more backhand and cross-court returns and use more lobs than men. On the right court, serves are more frequently aimed at the "T" and more down the line returns are executed when compared to the left side. Such knowledge may have implications for accuracy and the quality of training drills based on specific technical–tactical demands.

**Author Contributions:** Conceptualization, B.J.S.-A., D.M. and J.C.; methodology, B.J.S.-A., J.R.-L., F.P., A.S.-P. and D.M.; software, B.J.S.-A. and F.P.; validation, B.J.S.-A., F.P., J.R.-L. and D.M.; formal analysis, B.J.S.-A., J.C. and A.S.-P.; investigation, B.J.S.-A., J.C., J.R.-L., D.M. and A.S.-P.; resources, B.J.S.-A., J.R.-L., A.S.-P. and D.M.; data curation, B.J.S.-A., J.R.-L., A.S.-P. and D.M.; writing—original draft preparation, B.J.S.-A., J.C. and D.M.; writing—review and editing, B.J.S.-A., F.P., J.R.-L., A.S.-P. and D.M.; visualization, B.J.S.-A., J.C., F.P., J.R.-L., A.S.-P. and D.M.; supervision, B.J.S.-A., F.P., J.R.-L., A.S.-P. and D.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.


2.2.4. Thermal Range of High Photosynthesis (ΔT90)

The ΔT90 is the extent of the temperature range where assimilation rates are ≥90% of their seasonal maximum value calculated above, Anet,max. Considering the previously computed Anet,max and, at each time step, the average Anet over the whole canopy, we identified the maximum and minimum TL for which Anet is equal to 90% of Anet,max. ΔT90 corresponds to the difference between those maximum and minimum TL. We interpreted ΔT90 as a proxy of leaf thermotolerance: broad ΔT90 ranges mean that the CO2 assimilation rate is close to its maximum under a wide range of thermal conditions, while narrow ΔT90 range necessarily implies a higher likelihood to experience sub-optimal thermal conditions for assimilation.

#### *2.3. Plant Traits Selection and Determination of Their Role*

#### 2.3.1. Selection of Plant Traits

Only traits expected to have a direct most notable effect on leaf thermoregulation and C-fixation in APES were included in the analyses. Under set environmental conditions, TL is strongly affected by leaf size and shape [8], albedo [9] and traits related to stomatal conductance and hence regulation of transpiration [10]. These traits also affect the net CO2 assimilation rate, directly via its maximum rate, and indirectly, via the stomatal opening and the effects of temperature on leaf metabolic rates. Consequently, in the analyses below, we focused on the primary plant traits regulating the CO2 assimilation rate, the boundary layer and stomatal conductances (gb and gs, respectively), the absorption of solar radiation.

A total of six traits were selected: the maximum carboxylation rate at 25 ◦C, VCMAX,25; the two parameters of the stomatal model, i.e., stomatal model slope in well-watered conditions g1 and a parameter describing the sensitivity of g1 to soil water potential β [33]; the effective leaf thickness, lt, and PAR and NIR albedos, αPAR and αNIR. This selection was based on the following considerations. Assuming leaves as flat plates, the effective leaf thickness, lt, controls the boundary layer conductance gb [36,37]. Conversely, the stomatal conductance, gs, is mostly dependent on hydraulic and photosynthetic traits: in the stomatal model employed in APES [33], these aspects are summarized by the parameters g1 and β. Leaf temperature and photosynthesis also depend on the absorbed radiation, and hence on the leaf albedo for both photosynthetically active and near infrared radiation (αPAR and αNIR respectively). Finally, according to the Farquhar model, the net CO2 assimilation rate depends on the maximum carboxylation rate, VCMAX, the maximum electron transport rate, JMAX, and the day respiration rates, Rd. These rates are functions of the corresponding rates at 25 ◦C (VCMAX,25, JMAX,25 and Rd,25) and their response to temperature [31]. JMAX,25 and Rd,25 are often well correlated with VCMAX,25, following Medlyn et al. [38] and Launiainen et al. [29], respectively, thus allowing to consider only VCMAX,25 as a key parameter of photosynthesis. Further details on trait selection and their role in leaf temperature regulation are given in the Supplementary Materials.

For each of these six traits, we considered realistic ranges, based on a literature search. These ranges were maintained intentionally broad, beyond those typical of current dominant coniferous and deciduous tree species in boreal forests (Table 1). Conversely, the understory and forest floor features were fixed in the model. Concretely, the understory consists of seedlings of Norway spruce, Silver birch and other deciduous species (LAI ∼0.5 m2 m−2), as specified in [29].

**Table 1.** Summary of the traits considered in the General Sensitivity Analysis (GSA), their ranges of variation emerging from the literature globally and for mid-to-high latitudes and corresponding supporting references.

\* No specific values for mid-to-high latitude have been reported. However, boreal forests are dominated by species with needles. \*\* No specific values for mid-to-high latitude have been reported.

#### 2.3.2. General Sensitivity Analysis (GSA) and Determination of Dominant Traits

A General Sensitivity Analysis (GSA) was run on APES to identify which of the focal traits are most important to maximize both instantaneous and cumulative Anet and regulate TL, reducing the risk of high temperature damage. To this aim, 100 trait sets were randomly generated from uniform distributions of each trait over the ranges specified in Table 1. The traits were sampled independently. The model was run using each trait set for current growing conditions (Section 2.4.1). The obtained simulated time series of Anet and TL allowed the computation of the four metrics described in Section 2.2 for each trait set (maximum leaf temperature, TL,max; the thermal range of high photosynthesis, ΔT90, cumulated and maximum net assimilation, Anet,cum and Anet,max).

The model results were then grouped based on whether the metrics exceeded pre-set thresholds. Specifically, a threshold was set for each metric in order to split the 100 trait sets into two groups: one containing the m trait sets for which metric is above the threshold (Group 1) and the others *n* = (100 – *m*) (Group 2). Then, for each trait, the cumulative probability distribution for the *m* trait values in Group 1 and *n* trait values in Group 2 were obtained. The higher the distance between the cumulative distribution functions, the more important the role of the trait value in defining the outcome. To measure the distance between the two empirical functions, the Kolmogorov–Smirnov (KS) two-sample test was used. This nonparametric method allows comparing two samples and quantifying the distance between the empirical distributions of the two samples [51]; thus, it can be used to rank the traits according to how dominant they are in determining the final outcome [52–54].

The thresholds for the grouping were selected to be the highest ones that allowed the greatest number of trait sets in the Group 1 while the number of dominant traits remained unchanged [53]. Indeed, choosing an excessively low threshold leads to (almost) no distinction between Group 1 and Group 2 so that the separation between the two distribution functions is negligible for all traits (i.e., no trait emerges as dominant). Conversely, choosing an excessively high threshold reduces substantially the number of trait sets for which the metric is above the threshold: in this case, Group 1 might not be representative except for a minority of trait sets, leading to a substantial separation between the two distribution functions for all traits (i.e., all traits are considered dominant). This approach was followed for each metric except TL,max. For the latter, we used TCRIT—i.e., the temperature at which first symptoms of thermal damage appears. Following O'Sullivan et al. [3], based on the latitude of the reference study site (Section 2.4.1), TCRIT was set at 44.0 ◦C. This threshold also allowed a balanced partitioning of the 100 parameter sets into Group 1 and Group 2, i.e., the approach delineated above

would have led to a similar value for the threshold. The resulting thresholds were: TL,max = 44.0 ◦C, Anet,cum = 1,274 μmol m−2, Anet,max = 0.466 μmol m−2s−1 and ΔT90 =6.3 ◦C.

#### 2.3.3. Selection of Focal Trait Combinations

Once the dominant traits were identified via Kolmogorov–Smirnov test, four sets of parameters were chosen to represent widely different outcomes in terms of thermotolerance and C fixation (Table 2). Given the focus on boreal forests, the focal trait combinations were chosen among those including trait values within the ranges typically observed in mid-to-high latitude forests (Table 1). We selected four trait combinations that showed contrasting thermal and productivity responses under identical growing conditions (2005 growing season). Specifically, trait combination 1 corresponds to the set of traits with the lowest performance (lowest Anet,cum and TL,MAX exceeding TCRIT in 2005): it is representative of those trait combinations with low productivity and high risk of thermal damage, at least under the current conditions (Low Productivity-High Risk; hereafter, LP-HR). Combination 2 was instead the best performing combination, leading to high assimilation rates while preventing thermal damage, i.e., it is representative of individuals with high productivity and low risk of thermal damage (High Productivity-Low Risk; HP-LR). Combination 3 led to high assimilation rates but also to TL,MAX on par with that of combination 1, thus representing trait sets leading to high productivity but also high risk of thermal damage (High Productivity-High Risk; HP-HR). Finally, combination 4 resulted in assimilation rates similar to combination 1 but it did prevent the occurrence of thermal damage; thus, it corresponds to low productivity but also low risk of thermal damage (Low Productivity-Low Risk). These differences in assimilation and thermal metrics are the result of the following differences between the trait values. Combinations 1 (LP-HR) and 4 (LP-LR) have similar and low VCMAX,25; combinations 2 (HP-LR) and 3 (HP-HR) have a similar VCMAX,25, but these are higher than combinations 1 and 4. Conversely, lt values in combinations 1 (LP-LR) and 3 (HP-HR) are similar and higher than the ones in combinations 2 (HP-LR) and 4 (LP-LR), the latter of which also have similar values. No patterns emerged relatively to the other traits, which were indeed not dominant as shown by the sensitivity analysis (see results in Section 3.1). These four combinations of traits together with their corresponding assimilation and thermal metrics are listed in Table 2.

**Table 2.** Combination of traits used to perform the climate scenarios analyses and the resulting values of the assimilation and thermal metrics for the growing season 2005. LP-HR: Low Productivity-High Risk of thermal damage; HP-LR: High Productivity-Low Risk of thermal damage; HP-HR: High Productivity-High Risk of thermal damage; LP-LR: Low Productivity-Low Risk of thermal damage.

## *2.4. Growing Conditions*

The GSA was performed under current climatic conditions, corresponding to selected years in a study site in Finland (Section 2.4.1). Conversely, the focal combinations of traits were tested under both current and future warmer and/or drier growing conditions, as defined in Section 2.4.2. This approach allowed us to determine whether thermal damage and suboptimal photosynthetic rates would occur given certain temperature increase and intensity of the water stress, thus allowing the quantification of potential effects of climate change and the importance of trait selection in the future.

#### 2.4.1. Current Growing Conditions

Current growing conditions are based on meteorological data observed in the Hyytiälä field station SMEAR II (Station for Measuring Forest Ecosystem-Atmosphere Relations), located in Hyytiälä, Southern Finland (61◦51' N, 24◦17' E). The annual mean temperature is 3 ◦C and total mean annual precipitation is 700 mm. All the meteorological data necessary for APES are routinely measured at this site. A complete description of the site and its measurements can be found in Kolari et al. [55]; Kulmala et al. [56] and Launiainen et al. [29].

The model was applied over selected growing seasons (2005 and 2006), here defined as the period of May 1st to September 30th [29], with the warmer period falling in the first half of July. The growing season 2005 can be considered as a normal one in the region, while 2006 was a dry year [57], slightly warmer than 2005. The two growing seasons were also characterized by a different precipitation timing: in 2005, the rainiest period occurred in late July and early August and the highest precipitation was recorded at the end of the growing season; in 2006, a dry spell occurred in late July and early August while two of the rainiest peaks were recorded in early July. Therefore, 2005 and 2006 present contrasting plant water availability, allowing us to analyze if these difference might lead to significant changes in thermoregulation and net CO2 assimilation.

#### 2.4.2. Scenarios of Future Growing Conditions

Boreal regions are experiencing a rapid warming and an increase in the frequency and intensity of periods with low water availability as a consequence of changes in the timing and magnitude of precipitation, as well as increases in evapotranspiration from longer and warmer growing seasons [15]. Therefore, to generate climate change scenarios, we focused on air temperature (TA) and soil water potential (ΨS).

The future scenarios were developed as follows. We considered two single days within the growing season of year 2005 as baseline: (i) the day where TL reached its maximum value (July 6th) and (ii) an average day with TA close to the median value for the growing season (May 20th). Then, we built scenarios of future growing conditions by shifting upwards the observed TA series of 1 to 10 ◦C combined with decreasing soil water potential ranging from −0.5 to −3 MPa. The soil water potential is considered constant within the day. For each scenario, we computed the instantaneous Anet and TL at midday. While acknowledging their importance, other environmental variables such as wind speed and relative humidity were not modified. Thus, the vapor pressure deficit (VPD) was computed considering the new temperature values and the unchanged relative humidity.

Furthermore, we analyzed how trait combinations might affect soil water availability and how such changes may alter maximum and cumulated net CO2 assimilation. To this aim, the shift in TA series by 1 to 10 ◦C was combined with imposing 5 to 30 day dry spells, with no precipitation. The dry spell was assumed to begin after the last precipitation event before the warmest period registered within the growing season of 2005 (i.e., June 27th). We then computed the corresponding Ψs at the end of the 5–30 day dry period, and the Anet,cum over the dry down.

In all cases, the length of the growing season was maintained unaltered, even though global warming may lead to longer growing seasons in boreal regions [58,59]. This simplifying assumption bears no consequence of the results discussed below, because the aim was to contrast different trait combinations under the same abiotic conditions.

#### **3. Results**

#### *3.1. Dominant Traits Emerging from the General Sensitivity Analysis (GSA)*

The General Sensitivity Analysis (GSA) allowed the identification of the traits most relevant for the four metrics: TL,max, Anet,cum, Anet,max and ΔT90. The results are presented in Figure 1 and summarized next.

**Figure 1.** Results of the Global Sensitivity Analysis. Rows refer to the four metrics; columns to the six traits investigated. In each main plot, the lines are the empirical cumulative function of the trait values: blue solid lines refer to the trait values that lead to metric values below the metric-specific threshold; the red dashed lines refer to trait values that lead to metric values above the threshold. Shaded areas identify ranges of trait typically observed in mid-to-high latitudes. In the insets, the box and whisker plots compare and summarize the trait values leading to metric values above (left box; A–) and below (right box; B-) the threshold. The boxes extend from the first to the third quartile, the end of the whiskers are computed as 1.5 × IQR (Interquantile Range). The median values are indicated by the horizontal red lines.