A method and system for real-time image detection of rail surface defects
Patent Information
- Application Number
- CN202610919375.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]然而,在检测车高速运行工况下,现有检测技术面临以下技术缺陷:推扫图像中由车体振动引发的运动模糊与由钢轨表面动态混合附着膜引发的镜面反射伪影高度耦合,现有方法缺乏在统一框架下对这两种退化因素分别进行定向处理与联合优化的机制
通过同步采集检测车底部振动加速度时序信号和主动光源经钢轨表面反射后的反射光偏振态信息,在物理先验层面分别构建空间域退化先验和频率域干扰先验,为后续退化因素解耦提供了物理可解释的约束条件;在网络处理层面,采用具有双分支并联结构的所述解耦网络分别在空间域和频率域进行定向处理,最终通过多域特征融合机制实现联合优化。
Smart Images

Figure CN122887784A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway infrastructure safety inspection and machine vision technology, and in particular to a real-time image detection method and system for rail surface defects. Background Technology
[0002] Rail surface defect detection is a crucial aspect of ensuring railway operation and maintenance safety. In recent years, vehicle-mounted rail surface defect detection solutions based on push-broom imaging using linear array cameras have been widely adopted. This solution mounts a linear array camera on the bottom of the inspection vehicle, uses an active light source for illumination, and simultaneously acquires push-broom images of the rail surface during the vehicle's operation, then identifies defects through image analysis.
[0003] However, under high-speed operation of the inspection vehicle, existing inspection technologies face the following technical shortcomings: motion blur caused by vehicle vibration and specular reflection artifacts caused by the dynamic mixed adhesion film on the rail surface are highly coupled in the push-broom image. Existing methods lack a mechanism for targeted processing and joint optimization of these two degradation factors within a unified framework. Specifically, multi-directional vibration of the bottom of the inspection vehicle causes instantaneous positional shift of the line scan camera during scan line exposure, resulting in time-varying non-uniform motion blur in the push-broom image. At the same time, the dynamic mixed adhesion film such as oil stains, water stains, and rust commonly found on the rail surface produces specular reflection under active light source illumination, forming localized high-brightness artifacts that obscure the texture details of the defects. The aforementioned motion blur and specular reflection artifacts are intertwined in the spatial and frequency domains, causing the intrinsic texture features of the defects to be masked by the dual degradation effect.
[0004] Most existing methods only correct for a single degradation factor, making it difficult to target and fuse two highly coupled degradation processes. This results in the difficulty of accurately recovering intrinsic texture information from degraded images, ultimately leading to low defect classification accuracy and large positioning deviation. Summary of the Invention
[0005] This invention provides a real-time image detection method and system for rail surface defects. By constructing spatial domain degradation priors and frequency domain interference priors, and utilizing the decoupled network with a dual-branch parallel structure, deblurring and orientation processing are performed in the spatial domain and artifact removal and orientation processing are performed in the frequency domain, respectively. Finally, joint optimization is achieved through multi-domain feature fusion and decoupling mechanisms, thereby accurately recovering the intrinsic texture information of rail surface defects from the degraded pushbroom image, improving defect classification accuracy and reducing positioning deviation.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: In a first aspect, a real-time image detection method for rail surface defects is provided, the method comprising: Acquire multi-source synchronous data, including push-sweep images collected by the line scan camera on the rail surface, as well as the timing signal of vibration acceleration at the bottom of the detection vehicle and the polarization state information of reflected light after reflection from the rail surface by the active light source, which are collected synchronously with the push-sweep images. Based on the vibration acceleration time-series signal, a point spread function estimation model for time-varying non-uniform motion fuzz is constructed as a spatial domain degradation prior; based on the polarization state information of the reflected light, the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface are separated to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. Based on spatial domain degradation priors and frequency domain interference priors, the pushbroom image is input into the decoupling network; time-varying non-uniform blur kernel parameters are extracted from the point spread function estimation model and used as the spatial domain blur kernel inverse evolution constraint parameters of the decoupling network to obtain spatial domain deblurring intermediate features; the transient optical distortion energy distribution map is used to suppress specular reflection high-frequency artifacts of the decoupling network in the frequency domain to obtain frequency domain artifact removal intermediate features; the spatial domain deblurring intermediate features and frequency domain artifact removal intermediate features are fused and decoupled by the decoupling network to obtain the decoupled intrinsic surface texture feature map; The decoupled intrinsic surface texture feature map is input into a pre-trained defect classification and localization network, and the real-time detection results of rail surface defects are obtained by the defect classification and localization network.
[0007] Secondly, a real-time image detection system for rail surface defects includes: The multi-source synchronous acquisition module is used to acquire multi-source synchronous data, which includes push-sweep images acquired by the line scan camera pushing and sweeping the rail surface, as well as the vibration acceleration timing signal of the bottom of the detection vehicle and the polarization state information of the reflected light after the active light source is reflected by the rail surface, which are acquired synchronously with the push-sweep images. The physical prior construction module is used to construct a point spread function estimation model of time-varying non-uniform motion fuzz based on the vibration acceleration time-series signal as a spatial domain degradation prior, and to separate the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface based on the polarization state information of the reflected light to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. The physical guided feature decoupling module is used to input the pushbroom image into the decoupling network according to the spatial domain degradation prior and the frequency domain interference prior. After spatial domain deblurring, frequency domain artifact removal, and multi-domain feature fusion and decoupling, the decoupled intrinsic surface texture feature map is obtained. The defect classification and localization module is used to input the decoupled intrinsic surface texture feature map into the pre-trained defect classification and localization network, and the defect classification and localization network obtains the real-time detection results of rail surface defects.
[0008] Thirdly, a computing device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0009] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0010] The above-described solution of the present invention has at least the following beneficial effects: By synchronously collecting and detecting the timing signal of vibration acceleration at the bottom of the vehicle and the polarization state information of reflected light from the active light source after reflection from the rail surface, spatial domain degradation priors and frequency domain interference priors are constructed at the physical prior level, providing physically interpretable constraints for subsequent decoupling of degradation factors. At the network processing level, the decoupling network with a dual-branch parallel structure is used to perform directional processing in the spatial and frequency domains, and finally joint optimization is achieved through a multi-domain feature fusion mechanism.
[0011] By employing the decoupled network, the point spread function estimation model applies explicit physical constraints to the inverse evolution process of the fuzzy kernel in the spatial domain, and the transient optical distortion energy distribution map suppresses high-frequency artifacts of specular reflection in the frequency domain. This addresses the shortcomings of existing methods that only independently correct a single degradation factor, and can effectively cope with complex working conditions where two degradation factors are highly coupled.
[0012] By fusing and decoupling the intermediate features of spatial domain deblurring and frequency domain artifact removal, the intrinsic texture information of the rail surface is accurately recovered from the degraded pushbroom image, providing high-quality input features for subsequent defect classification and localization, and improving the classification accuracy and localization accuracy of rail surface defect detection under high-speed operation conditions.
[0013] By organically combining physical prior construction with deep learning networks and using physical quantities collected by sensors as guiding signals to drive the feature decoupling process of the network, the system retains the representational ability of deep learning in feature extraction and incorporates the physical interpretability of imaging degradation models, enabling the overall detection system to have stronger robustness and generalization ability in complex environments. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating a real-time image detection method for rail surface defects provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a real-time image detection system for rail surface defects provided in an embodiment of the present invention; Figure 3 This is an embodiment of the present invention providing a point spread function estimation kernel heatmap for a smooth road segment; Figure 4 This is a nuclear thermogram of point spread function estimation corresponding to a section of track switch with severe vibration, provided by an embodiment of the present invention; Figure 5 This is a comparison diagram of the amplitude spectrum before and after frequency domain artifact removal provided by an embodiment of the present invention. Detailed Implementation
[0015] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0016] like Figure 1 As shown, an embodiment of the present invention proposes a real-time image detection method for rail surface defects, the method comprising the following steps: Step 1: Acquire multi-source synchronous data, including push-sweep images collected by the line scan camera on the rail surface, as well as the timing signal of vibration acceleration at the bottom of the detection vehicle and the polarization state information of reflected light after reflection from the rail surface by the active light source, which are collected synchronously with the push-sweep images. Step 2: Based on the vibration acceleration time-series signal, construct a point spread function estimation model for time-varying non-uniform motion fuzziness as a spatial domain degradation prior; based on the polarization state information of the reflected light, separate the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. Step 3: Based on the spatial domain degradation prior and the frequency domain interference prior, the pushbroom image is input into the decoupling network; the time-varying non-uniform blur kernel parameters are extracted from the point spread function estimation model and used as the blur kernel inverse evolution constraint parameters of the decoupling network in the spatial domain to obtain the spatial domain deblurring intermediate features; the transient optical distortion energy distribution map is used to suppress the specular reflection high-frequency artifacts of the decoupling network in the frequency domain to obtain the frequency domain artifact removal intermediate features; the spatial domain deblurring intermediate features and the frequency domain artifact removal intermediate features are fused and decoupled by the decoupling network to obtain the decoupled intrinsic surface texture feature map; Step 4: Input the decoupled intrinsic surface texture feature map into the pre-trained defect classification and localization network, and obtain the real-time detection results of rail surface defects from the defect classification and localization network.
[0017] In this embodiment of the invention, by synchronously acquiring the vibration acceleration time-series signal and the polarization state information of the reflected light, spatial domain degradation priors and frequency domain interference priors are constructed respectively, providing physically interpretable constraints for the collaborative processing of motion blur and specular reflection artifacts under a unified framework.
[0018] By employing the decoupled network, explicit constraints are imposed on the inverse evolution of the fuzzy kernel in the spatial domain using a point spread function estimation model, and high-frequency artifacts of specular reflection are targeted and suppressed in the frequency domain using a transient optical distortion energy distribution map. This achieves separate targeted processing and joint optimization of two highly coupled degradation factors, overcoming the shortcomings of existing methods that only independently correct a single degradation factor.
[0019] By multi-domain fusion and decoupling of spatial domain deblurring intermediate features and frequency domain artifact removal intermediate features, the intrinsic texture information of defects on the rail surface is accurately recovered from degraded pushbroom images, improving the classification accuracy and positioning accuracy of defect detection under high-speed operation conditions.
[0020] By organically combining physical priors with deep learning networks, and using physical quantities collected by sensors to guide the feature decoupling process, the system retains the deep feature representation capabilities while incorporating the physical interpretability of the imaging degradation model, effectively meeting the real-time detection requirements of vehicles.
[0021] In a preferred embodiment of the present invention, step 1 above may include: Step 1.1: A vibration acceleration sensor and a polarization sensor are deployed at the bottom of the inspection vehicle. The linear array camera and the active light source are also mounted on the bottom of the inspection vehicle to establish a multi-source sensor synchronous trigger acquisition link. Specifically, this includes: A triaxial vibration acceleration sensor and a polarization sensor are rigidly mounted on a structural beam near the bogie at the bottom of the inspection vehicle using rigid connecting brackets. The three sensitive axes of the triaxial vibration acceleration sensor are kept parallel to the direction of travel of the inspection vehicle, the vertical direction perpendicular to the rail plane, and the transverse direction of the rail, respectively. The receiving optical axis of the polarization sensor is aligned with the beam path of the active light source after reflection from the rail surface. Simultaneously, a linear array camera and an active light source are mounted at the center of the bottom of the inspection vehicle along the longitudinal direction of the rail. The line scan camera uses a high-sensitivity complementary metal-oxide-semiconductor line scan image sensor with 4096 pixels. Its pixel size is 7μm×7μm, and its maximum line scan frequency is 80kHz. It is equipped with a fixed-focus lens with a focal length of 35mm. The scan lines of the line scan camera are kept strictly perpendicular to the rail surface through a mechanical adjustment mechanism. The active light source uses a high-brightness green light-emitting diode array line light source with a center wavelength of 530nm. Its luminous power can be continuously adjusted from 50W to 200W. The light source emission end is equipped with a linear polarizer to output linearly polarized light with a polarization direction at a 45-degree angle to the longitudinal direction of the rail. The active light source illuminates the area of the rail surface covered by the scan lines of the line scan camera at a preset incident angle of 30° to 60°.
[0022] The multi-channel synchronous trigger controller consists of a high-precision temperature-compensated crystal clock source, a field-programmable gate array (FPGA) logic control unit, and a four-channel signal distributor. The clock source outputs a 100MHz reference clock signal to the FPGA logic control unit. The FPGA logic control unit generates a rectangular pulse trigger signal according to a preset acquisition frequency. The frequency of this trigger pulse signal is set to 80kHz to match the maximum line scan frequency of the line scan camera. The trigger pulse signal drives the vibration accelerometer and polarization state sensor to perform synchronous sampling, as well as the line scan camera and active light source to perform synchronous exposure and illumination, through the signal distributor. The vibration accelerometer, polarization state sensor, line scan camera, and active light source are connected to the same acquisition link through the four parallel output channels of the signal distributor. The signal distributor ensures that the rise time deviation of the trigger signal of each channel does not exceed 10ns, thereby establishing a multi-source sensor synchronous trigger acquisition link with nanosecond-level synchronization accuracy.
[0023] Step 1.2: According to the synchronous trigger acquisition link, the vibration acceleration sensor is triggered to acquire the vibration acceleration time-series signal, the polarization state sensor is triggered to acquire the polarization state information of the reflected light, and the linear array camera is triggered to perform a push-scan on the rail surface to obtain a push-scan image. Specifically, this includes: during the operation of the inspection vehicle along the rail at a detection speed of 80 km / h to 120 km / h, the field-programmable gate array logic control unit in the synchronous trigger acquisition link continuously sends trigger pulse signals at a preset acquisition frequency of 80 kHz. This trigger pulse signal simultaneously drives the vibration acceleration sensor to acquire 256 acceleration sampling points per trigger. The system collects triaxial vibration acceleration data from the bottom of the vehicle. After the 256 sampling points are processed by on-chip mean filtering and extraction within the sensor, one frame of valid acceleration sampling value is finally output in each trigger cycle. The triaxial vibration acceleration data is converted from analog to digital and output frame by frame in 32-bit floating-point format, forming a vibration acceleration time sequence signal with a sampling rate of 80kHz. At the same time, the trigger pulse signal drives the polarization state sensor to collect the four component parameters of the Stokes vector in the reflected beam after the active light source is reflected from the rail surface through a detection method combining rotating waveplate and beam splitter, and outputs them in 16-bit integer format, forming polarization state information of the reflected light with a sampling rate of 80kHz.
[0024] Meanwhile, this trigger pulse signal drives the line scan camera to expose the rail surface line by line in a push-broom mode with 4096 pixels per line and an exposure time of 10μs to 20μs. The line scan camera acquires one line of image data and outputs it in 12-bit grayscale format each time it receives a trigger pulse. The active light source is synchronously lit by the same trigger pulse signal during each exposure of the line scan camera, thus obtaining a continuous push-broom image with a line sampling rate of 80kHz.
[0025] Step 1.3: Generate a unified timestamp based on the synchronous trigger acquisition link. Based on the unified timestamp, align the push-broom image, vibration acceleration timing signal, and reflected light polarization state information to obtain multi-source synchronous data. Specifically, this includes: the field-programmable gate array (FPGA) logic control unit in the synchronous trigger acquisition link synchronously generates a 64-bit unified timestamp at the rising edge of each trigger pulse signal. The high 32 bits of this unified timestamp record the number of whole seconds elapsed from 00:00:00 on January 1, 1970, to the current trigger time, and the low 32 bits record the sub-second offset counted at a 100MHz clock cycle within the current second, thereby improving the timestamp calibration accuracy to 10ns; the FPGA... The logic control unit embeds the unified timestamp into the fixed field of the frame header of the pushbroom image line data corresponding to the trigger, the fixed field of the packet header of the vibration acceleration timing signal sampling point data, and the fixed field of the packet header of the reflected light polarization state information sampling point data. After the entire acquisition process is completed, the data post-processing unit reads the unified timestamp from the header field of all data packets. Using the same unified timestamp as the alignment reference, the pushbroom image lines, triaxial vibration acceleration sampling values, and illumination polarization state Stokes vector sampling values with the same timestamp are matched frame by frame and grouped into a multi-source data frame. All multi-source data frames are arranged in ascending order according to the unified timestamp, thereby obtaining multi-source synchronized data with strict time synchronization.
[0026] In a preferred embodiment of the present invention, step 2 above may include: Step 2.1: Obtain the vibration acceleration time-series signal from the multi-source synchronous data. Based on the vibration acceleration time-series signal, extract the vibration displacement time-series trajectory of the bottom of the detection vehicle during the sweeping process. Specifically, the vibration acceleration time-series signal includes triaxial vibration acceleration sample values of the bottom of the detection vehicle in three orthogonal directions: the direction of travel, the vertical direction perpendicular to the rail plane, and the transverse direction of the rail. Each sample value is stored in 32-bit floating-point format with a sampling rate of 80kHz. First, the triaxial vibration acceleration time-series signal is processed to remove DC components. A high-pass filter with a cutoff frequency of 0.1Hz is used to remove zero drift and trend terms from the acceleration signal to obtain the DC-free triaxial acceleration sequence, which is denoted as the x-axis acceleration sequence. y-axis acceleration sequence and z-axis acceleration sequence The x-axis corresponds to the direction of travel of the inspection vehicle, the y-axis corresponds to the vertical direction perpendicular to the rail plane, and the z-axis corresponds to the horizontal direction of the rail. From 0 to Values, This represents the total number of sampling points in this acquisition process. Due to the use of a synchronous trigger acquisition mechanism, the total number of vibration acceleration sampling points is [not specified]. It is strictly equal to the total number of scan lines R of the push-broom image.
[0027] Furthermore, a second integration operation is performed on the triaxial acceleration sequence after removing the DC component in the time domain. The first integration uses the discrete trapezoidal integral formula to convert the acceleration sequence into a velocity sequence. Taking the x-axis as an example, its discrete trapezoidal integral expression is: ; in For the first x-axis velocity values at each sampling point For the first The x-axis velocity values at each sampling point, and The initial value is set to 0. The sampling time interval and μs, The sampling rate is 80kHz; the second integration uses the same discrete trapezoidal integral formula to convert the velocity sequence into a displacement sequence, and its discrete trapezoidal integral expression is: ; In the formula For the first x-axis displacement values at each sampling point For the first The x-axis displacement values at each sampling point, and The initial value is set to 0; the y-axis and z-axis are processed using the same quadratic integration process as the x-axis to obtain the y-axis displacement sequence. and z-axis displacement sequence After each integration, a high-pass filter with a cutoff frequency of 0.5Hz was used to filter the integration result to suppress low-frequency drift errors introduced during the integration process; finally, the vibration displacement time-series trajectory of the bottom of the detection vehicle along three orthogonal directions during the push-sweep process was obtained. This vibration displacement time-series trajectory is formed by... , and The data consists of three displacement sequences, with a time resolution consistent with the original vibration acceleration time-series signal, and a time interval of 12.5 μs between adjacent sampling points.
[0028] Step 2.2, based on the vibration displacement time-series trajectory, determine the instantaneous position offset of the line scan camera at the exposure time of each scan line. Specifically, this includes: obtaining the unified timestamp corresponding to the push-broom image of each scan line from the multi-source synchronous data, and using this unified timestamp as an index to determine the three displacement sequences of the vibration displacement time-series trajectory. , and The triaxial vibration displacement values at corresponding times are retrieved. Based on the installation geometry of the line scan camera on the rigid connection bracket at the bottom of the inspection vehicle, the mapping relationship between the vibration displacement components in the three orthogonal directions and the imaging position offset of the line scan camera is determined: specifically, the vibration displacement components at the bottom of the inspection vehicle in the direction of travel are mapped. Directly mapped to the instantaneous position offset of the line scan camera along the longitudinal direction of the rail. The mapping relationship is as follows: ,in This refers to the exposure time of the current scan line; it detects the vertical vibration displacement component of the vehicle's underside. Directly mapped to the change in object distance between the linear array camera and the rail surface. The mapping relationship is as follows The vibration displacement component of the underside of the detection vehicle in the transverse direction of the rail will be measured. Directly mapped to the instantaneous position offset of the line scan camera along the rail laterally. The mapping relationship is as follows .
[0029] Considering the continuous motion effect of the line scan camera during the exposure time, for each scan line, the exposure time window is 10μs to 20μs. The sampling interval of the vibration displacement time trajectory Step size extraction A set of vibration displacement sub-sampling points, where each sub-sampling point corresponds to a different sub-time point within the exposure time window. The three-dimensional instantaneous position offsets corresponding to each sub-time point are denoted as follows: and ;in and The value ranges from 800 to 1600, thereby determining the sequence of three-dimensional instantaneous position offsets of the line scan camera during each scan line exposure time. ,in , and These represent the first exposure within the exposure time window. The instantaneous position offset of the line scan camera at each sampling point along the longitudinal, vertical, and transverse directions of the rail is a complete three-dimensional sequence of instantaneous position offsets that describes the spatial position change of the line scan camera relative to the rail surface during a single exposure.
[0030] Step 2.3: Based on the instantaneous position offset, construct a point spread function estimation model for time-varying non-uniform motion blur as a spatial domain degradation prior. Specifically, this includes: constructing a point spread function estimation model for time-varying non-uniform motion blur based on the three-dimensional instantaneous position offset sequence of the linear scan camera at each scan line exposure time; the point spread function estimation model is constructed based on the ideal rigid body assumption and does not consider secondary factors such as structural elastic deformation, optical distortion, and installation angle deviation; in practical applications, the above errors can be further corrected through system calibration and error compensation without affecting the technical effectiveness of the core inventive concept.
[0031] Its construction process is as follows: For the first Scan line, expose the scan line for the specified time window. Three-dimensional instantaneous position offset sequence Projecting onto the imaging plane of the rail surface, the longitudinal offset is considered during the projection process. and lateral offset According to the pixel size of the line scan camera The μm value is normalized to obtain the coordinates of the instantaneous motion trajectory points on the imaging plane in units of pixels. ,in This indicates the cell column offset corresponding to the vertical offset. This represents the number of pixel position offsets within a row corresponding to the lateral offset; object distance change. During projection, it is used to correct the depth of field of the instantaneous motion trajectory. The correction method is to adjust the change in object distance. focal length of a line scan camera lens mm and nominal object distance Substituting the geometric relationship between mm into the imaging magnification variation factor The corrected coordinates of the instantaneous motion trajectory point are: This correction process compensates for the imaging scaling effect caused by the change in object distance due to the vertical vibration of the vehicle body.
[0032] The instantaneous motion trajectory during the exposure time All inside The spatial distribution of the corrected trajectory points on the imaging plane is the point spread function estimation kernel corresponding to that scan line. The continuous form; to convert it into a discrete form of the point spread function estimation kernel, the entire point spread function is evaluated on the imaging plane using pixel-sized grid cells. Two-dimensional histogram statistics were performed on the corrected trajectory points. After projection correction, a grid coordinate system with pixels as the unit was established. and Let these represent the vertical and horizontal indices within the point spread function kernel, in pixels, and define the indices. This corresponds to the nominal intersection point between the optical axis of the current scanning line array camera and the imaging plane of the rail surface; for the first... The corrected coordinates of the trajectory points Map it to the grid cell index and , where round represents the rounding operation, and increments the count value of the grid cell by 1.
[0033] Complete all After mapping and accumulating the trajectory points, each grid cell The count value of the trajectory points within is denoted as Then the point spread function estimates the kernel The value is Its physical meaning is during the exposure time. The instantaneous motion trajectory of the inner linear array camera pixels passes through this The temporal proportion of the grid cell position is equivalent to the position of an ideal point light source in the push-broom image of that scan line after motion blur degradation in the pixel. Energy diffusion weight at the location; all grid cells The values satisfy the following normalization condition: Because linear scan cameras use single-line scanning imaging, their point spread function estimation kernel... It exhibits a significant fuzzy propagation effect only in the longitudinal direction, while in the transverse direction it is merely a small offset caused by the transverse vibration of the rail. In the vertical The width of the support domain in the directional direction is typically 3 to 15 pixels, while in the lateral direction... The width of the support domain in the direction is usually 1 to 3 pixels, and the specific width of the support domain is determined by the intensity of vibration during the exposure time of the scan line.
[0034] Because different scan lines correspond to different exposure times, and the sequence of three-dimensional instantaneous position offsets at each scan line's exposure time varies due to the time-varying characteristics of vehicle vibration, each scan line... Each corresponds to a unique point spread function estimation kernel. ,all The point spread function estimation kernels corresponding to each scan line together constitute the point spread function estimation model for time-varying non-uniform motion fuzziness.
[0035] like Figure 3 and Figure 4The diagram shows a comparison of the nuclear thermodynamics of the point spread function estimation under different vibration intensities. The horizontal axis represents the lateral pixel position (unit pixel) on the imaging plane, and the vertical axis represents the longitudinal pixel position (unit pixel). The color intensity represents the normalized energy weight (the value range is 0 to 1, and the higher the energy, the brighter the color). It intuitively reflects the time-varying non-uniformity of motion blur and can be used as a row-by-row physical constraint for spatial domain deblurring. Figure 3 For the point spread function estimation kernel corresponding to the stable road section, the root mean square acceleration of the vibration at the bottom of the detection vehicle in this section is about 0.10g to 0.14g (typical value 0.12g). At this time, the energy of the kernel is highly concentrated in the center of the grid, the longitudinal support domain is only 2 to 4 pixels (typical value 3 pixels), and the lateral support domain is 1 to 2 pixels. The overall distribution is approximately point-like, indicating that under stable operating conditions, the displacement change of the line scan camera during single-line exposure is minimal, and the motion blur effect is weak.
[0036] Figure 4 The point spread function estimation kernel is used for the section of the turnout area with severe vibration, where the root mean square acceleration of vibration is approximately 0.42g to 0.51g (typical value 0.47g). Due to the multi-directional coupled vibration of the vehicle body, the energy of the kernel exhibits a significant tail distribution along the longitudinal direction (i.e., the direction of the detection vehicle's travel), with the longitudinal support domain expanding to 9 to 13 pixels (typical value 11 pixels), while the lateral support domain remains within the range of 1 to 3 pixels. This tail shape is highly consistent with the instantaneous position offset trajectory of the line scan camera within the exposure window, accurately characterizing the spatial diffusion characteristics of time-varying non-uniform motion blur. The aforementioned point spread function estimation kernel is stored row by row using the scan row index as the key. In the spatial domain branch of the decoupled network described later, it serves as a constraint parameter for the inverse evolution of the untrainable blur kernel, participating row by row in the modulation of the deformable convolution weights, thereby ensuring that the deblurring process strictly matches the actual physical degradation state of each scan row.
[0037] This model uses a scan row index for data organization. As the key, in a two-dimensional matrix The values are stored in a mapping table structure, and the row index is scanned during retrieval. The corresponding point spread function estimation kernel is directly retrieved; this point spread function estimation model serves as a spatial domain degradation prior describing the spatial domain motion blur degradation process in the pushbroom image. When used in subsequent steps, the spatial domain branch of the decoupled network extracts the corresponding point spread function estimation kernel from this model row by row according to the scan line index. As a constraint parameter for the inverse evolution of the blur kernel, a precise physical constraint is imposed on the spatial domain deblurring process of the push-broom image, thereby ensuring that the deblurring process matches the actual vibration degradation characteristics of each scan line.
[0038] Step 2.4: Obtain the polarization state information of the reflected light from the multi-source synchronous data. Based on the polarization state information, determine the polarization state change characteristics of the active light source on the dynamic hybrid coating film on the rail surface. Specifically, the polarization state information of the reflected light includes four component parameters of the Stokes vector of the reflected beam after reflection from the rail surface. The four components are respectively denoted as... , , and ,in This represents the total intensity component of the reflected beam. This represents the difference in linear polarization intensity components of the reflected beam in the horizontal and vertical directions. This represents the difference in linear polarization intensity between the reflected beam at 45 degrees and 135 degrees. The circular polarization intensity components of the reflected beam are represented, with each component parameter stored in 16-bit integer format at a sampling rate of 80 kHz. For each frame of reflected light polarization state information, the polarization degree parameter of the reflected beam is calculated based on the four components of the Stokes vector. The calculation formula is as follows: ; in This represents the sum of squares of the three polarization components of the Stokes vector. The value range is from 0 to 1. A value of 0 indicates that the reflected beam is completely unpolarized light. A value of 1 indicates that the reflected beam is fully polarized; simultaneously, the polarization angle parameter of the reflected beam is calculated. ;in This represents the arctangent function in the four quadrants, whose return value is in the interval (-π / 2). , The radian value within π; when calculated according to the above formula When the value is negative, perform angle correction on it: = +90°; The value ranges from 0 degrees to 180 degrees, representing the rotation angle of the polarization direction of the linearly polarized component in the reflected beam relative to the incident polarization direction of the active light source; the mathematical basis for the above angle correction is... The range of the function's return value multiplied by 0.5 is (-90°). , Adding 90° to all negative values linearly maps them to (0°). , The standard value range of the polarization ellipse is obtained by boundary processing within the interval [0°, 180°]; the azimuth angle of the polarization ellipse has a periodicity of 180 degrees. θ and θ+180° represents the exact same polarization orientation state. This correction method ensures both the rigor of the mathematical mapping and the physical consistency of the polarization orientation, normalizing the polarization angle values of each scan line to a uniform angle range, which facilitates the line-by-line analysis of subsequent polarization state change characteristics.
[0039] The polarization degree parameter corresponding to each scan line and polarization angle parameters By associating the scan line with a unified timestamp, the continuous variation of polarization degree parameters and polarization angle parameters along the longitudinal direction of the rail is analyzed line by line in the time dimension. This allows for the determination of the polarization state variation characteristics of the active light source on the dynamic mixed adhesion film on the rail surface. These polarization state variation characteristics reflect the differences in polarization response of the dynamic mixed adhesion film on the rail surface in different media composition regions such as oil stains, water stains, and rust.
[0040] Step 2.5: Based on the polarization state change characteristics, separate the specular reflection component and diffuse reflection component generated by the dynamic hybrid adhesion film to obtain the separated specular reflection component and diffuse reflection component. Specifically, this includes: based on the polarization state change characteristics of the active light source on the dynamic hybrid adhesion film on the rail surface, separating the specular reflection component and diffuse reflection component generated by the dynamic hybrid adhesion film row by row; specifically, for the first... Scan line, using the polarization degree parameter corresponding to that scan line. The polarization degree parameter serves as the criterion for distinguishing between specular reflection and diffuse reflection components. With preset polarization threshold Comparison: The preset polarization threshold The parameter is a pre-set empirical parameter, with a value range of 0.3 to 0.5. In this embodiment, it is taken as... The reflected light from the surface of the rail consists of two parts: Specular reflection component: originates from interface reflection of dynamically mixed adhering films (oil stains, water stains, etc.) on the rail surface. The reflected light retains a high degree of polarization. Typically in the range of 0.7 to 0.95; Diffuse reflection component: originates from intrinsic scattering from the metal surface of the rail substrate. This reflection process is a multiple scattering mechanism, and the polarization degree of the reflected light is significantly reduced. It is typically in the range of 0.05 to 0.25.
[0041] Let the degree of polarization of the total reflected light be... The proportion of specular reflection energy to total energy is The energy percentage of the diffuse reflection component is In the actual detection conditions of this invention, to simplify engineering implementation, a linear superposition approximation model of polarization degrees is adopted, namely... The approximate model has sufficient engineering accuracy within the typical incident angle range for rail surface inspection; the analytical expression for the energy proportion of the specular reflection component is obtained by refining the model. Under the actual testing conditions of this invention , Substituting into the above formula, we get: To simplify engineering implementation and ensure numerical stability.
[0042] This invention adopts As a second-level engineering approximation of the above expression, it should be noted that both levels of approximation are engineering simplification schemes and not rigorous derivations of the laws of physical optics; this approximation in Within the typical working range, the maximum relative error does not exceed 15%, meeting the actual detection accuracy requirements; when At this time, it indicates that the specular reflection component dominates in the reflected beam. The corresponding area of this scan line produces significant specular reflection artifacts under active light source illumination. At this point, the energy value of the specular reflection component... Take as the total energy of the reflected beam in that scan row Times, diffuse reflection component energy value Take as the total energy of the reflected beam in that scan row times.
[0043] when When the value of the specular reflection component is at its maximum, it indicates that the diffuse reflection component dominates the reflected beam. The reflected light in the area corresponding to this scan line mainly originates from the diffuse reflection of the intrinsic texture of the rail surface. At this time, the energy value of the specular reflection component is... Take as the total energy of the reflected beam in that scan row Times, diffuse reflection component energy value Take as the total energy of the reflected beam in that scan row Multiples; to avoid the above threshold discrimination in The discontinuous jumps in the estimated specular reflection energy caused by nearby factors can be addressed in practical engineering implementation by setting a threshold. Set a width of on both sides Transition interval (example taken) Within this transition interval, linear interpolation is performed on the two estimated values to smooth the transition, ensuring that the separated specular reflection and diffuse reflection components change continuously with the degree of polarization; wherein the total energy of the reflected beam in this scanning line is determined by the total intensity component of the Stokes vector. mean within the scan line This indicates the specular reflection component energy value obtained based on the above discrimination rule. The diffuse reflection component energy value corresponds to the specular reflection contribution generated by the dynamically mixed attached film. Corresponding to the diffuse reflection contribution of the intrinsic texture of the rail surface, the specular reflection component and diffuse reflection component are obtained after line-by-line separation.
[0044] Step 2.6: Based on the separated specular reflection and diffuse reflection components, construct a transient optical distortion energy distribution map as a priori for frequency domain interference. Specifically, this includes: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] Energy value of specular reflection component of scan line As the specular reflection energy intensity value of the scan line at its longitudinal position on the rail, the specular reflection energy intensity values of all scan lines are organized into a one-dimensional energy distribution sequence according to the spatial arrangement order of the scan lines along the longitudinal direction of the rail. ,in , The total number of scan lines represents the intensity variation of specular reflection artifacts along the longitudinal direction of the rail; simultaneously, for the first... The first line in the scan row Each pixel position, based on the gray value corresponding to that pixel. The average gray value of all pixels in the scan line The proportional relationship between them will determine the energy values of the specular reflection components at the scan row level. Weighted allocation is performed along the cell dimension, and the allocation method is as follows: when... At that time, the transient optical distortion energy value at that pixel location for: ; in All grayscale values within the scan line are greater than or equal to The sum of the gray values of the pixels; when At that time, the transient optical distortion energy value at that pixel location The value is set to 0. Through the above pixel-by-pixel weighted allocation, the one-dimensional energy distribution sequence is extended into a two-dimensional transient optical distortion energy distribution map. The above method of spatial allocation using the gray values of the degraded image is an engineering approximation processing scheme, which has sufficient engineering accuracy under the conventional working condition that the gray value of the specular reflection area is significantly higher than that of the surrounding area. The spatial resolution of this energy distribution map is consistent with the row sampling rate and column pixel number of the pushbroom image. Each pixel value in the map represents the transient optical distortion energy intensity generated by the specular reflection of the dynamically mixed attached film at that spatial location. This transient optical distortion energy distribution map serves as a frequency domain interference prior describing the high-frequency artifact interference of specular reflection in the frequency domain of the pushbroom image, providing pixel-by-pixel artifact suppression parameters for the subsequent frequency domain artifact removal processing of the decoupled network.
[0045] In a preferred embodiment of the present invention, step 3 above may include: Step 3.1: Obtain the pushbroom image from the multi-source synchronous data and input the pushbroom image into the decoupled network. Specifically, this includes: obtaining a complete pushbroom image from the multi-source synchronous data. This pushbroom image is a two-dimensional grayscale image acquired by a linear array camera performing row-by-row pushbroom scanning of the rail surface at an 80kHz row sampling rate. It has R rows and 4096 columns, with each pixel's grayscale value stored in a 12-bit grayscale format. This pushbroom image simultaneously includes the time-varying non-uniform motion blur degradation effect caused by vehicle vibration and the high-frequency specular reflection artifact interference caused by the dynamically mixed adhesive film on the rail surface; the obtained... The acquired pushbroom image is input to the decoupling network in a row-by-row manner. The decoupling network adopts a dual-branch parallel structure, consisting of four sub-networks cascaded sequentially: a spatial domain branch, a frequency domain branch, a multi-domain feature fusion module, and an intrinsic texture decoupling module. The spatial domain branch and the frequency domain branch perform independent physical-guided feature corrections for two degradation effects in the pushbroom image that have different physical causes and different feature manifestations. The multi-domain feature fusion module adaptively fuses the complementary correction results of the two branches. The intrinsic texture decoupling module separates the defect texture features and background texture features from the fused features.
[0046] The training process is as follows: First, a large-scale training dataset containing paired degraded pushbroom images and corresponding intrinsic surface texture ground truth images is constructed; the acquisition of degraded pushbroom images covers multiple mainline railway sections and multiple detection time periods, encompassing different rail types (60kg / m and 75kg / m), different surface conditions (dry, wet, and lightly rusted), and different train speed levels (60km / h to 120km / h) under detection conditions, to ensure that the training data fully covers the detection environment; each frame of the degraded pushbroom image... The number of rows R is 2048 rows and the number of columns is 4096 pixels. The grayscale values are stored in 12-bit format. For each frame of degraded pushbroom image, the corresponding intrinsic surface texture ground value image is obtained through the following process: First, at the same line mileage position of the detection section corresponding to the degraded pushbroom image, the rail surface is repeatedly exposed and acquired multiple times using the same line array camera under the condition of static parking of the inspection vehicle. The multiple frames of static exposure images acquired repeatedly are fused by pixel-by-pixel median filtering to eliminate random noise and obtain a static intrinsic reference image.
[0047] Further, trained annotators used the static intrinsic reference image as a benchmark to perform pixel-by-pixel fine annotation on the contour boundaries of each visible defect region in the degraded pushbroom image, separating the defect region from the background region. Finally, the annotated defect region mask and the static intrinsic reference image were synthesized at the pixel level to generate an intrinsic surface texture ground truth image that is spatially aligned row by row and pixel by pixel with the degraded pushbroom image. In this ground truth image, the defect region retains complete surface texture details without motion blur or specular reflection artifacts. The training dataset contains 50,000 paired annotated samples, covering four types of rail surface defects: cracks, peeling, crushing, and fish scale patterns. The number of samples for each type of defect is approximately 8,000, 12,000, 9,000, and 2,100, respectively. The dataset is randomly divided into training, validation, and test sets in a 7:1:2 ratio, ensuring that the proportion of each type of defect sample remains consistent across the three subsets.
[0048] The decoupled network was trained using an end-to-end supervised learning approach, employing the Adam optimizer with a batch size of 16. The loss function used during training was... It consists of a weighted combination of four loss terms, and its expression is: ; in The spatial domain deblurring loss term is specifically represented by the spatial domain deblurring intermediate feature map. Its corresponding spatial domain clear truth feature map The mean squared error between the two is used as a loss term to constrain the spatial domain deblurred intermediate feature map output by the spatial domain branch. Approximate its corresponding spatial domain clear truth feature map; The loss term for artifact removal in the frequency domain is specifically the intermediate feature map of artifact removal in the frequency domain. Its corresponding frequency domain artifact-free ground truth feature map The mean square error between them, this loss term is used to constrain the intermediate feature map of frequency domain artifact removal in the frequency domain branch output. Approximate the corresponding frequency domain artifact-free true feature map.
[0049] The multi-domain fusion consistency loss term is specifically represented by the fused joint feature map. With fusion of truth feature maps The mean squared error between the two is used as a loss term to constrain the fused joint feature map. Consistency with the fused ground truth feature map; The intrinsic texture decoupling loss term consists of two parts: an orthogonal separation constraint term and a reconstruction consistency constraint term, as follows: ; in This represents the inner product after the feature map has been vectorized. To prevent small constants with denominators of 0 and take , and These are defect texture feature maps. and background texture feature map The reconstructed image components are mapped back to the image domain by the decoder built into the intrinsic texture decoupling module. For input pushbroom images, for The total number of pixels; the orthogonal separation constraint term in this loss term is used to constrain the defect texture feature map. Background texture feature map Maintaining orthogonal separation in the feature space, a reconstruction consistency constraint term is used to constrain the recovery of the intrinsic texture of the input pushbroom image by the sum of the reconstructions of the two decoupled components; the weight coefficients of the four loss terms... , , and During training, the values were set to 1.0, 0.8, 0.6, and 1.2, respectively; the initial learning rate of the network was set to 0.001, and a cosine annealing learning rate decay strategy was adopted. The total number of training iterations was 300 epochs. After training, the intrinsic texture decoupling loss term on the validation set was retained. The model weight with the smallest value is used as the deployment weight.
[0050] Step 3.2: Based on the spatial domain degradation prior, extract the time-varying non-uniform fuzzy kernel parameters from the point spread function estimation model, as the fuzzy kernel inverse evolution constraint parameters of the decoupled network in the spatial domain. Specifically, this includes: for the first... Scan the row, and index it using that scan row. To retrieve the corresponding point spread function estimation kernel from the storage mapping table of the point spread function estimation model, use the key. The point diffusion function estimates the kernel. (wherein, the and The relationship is the relationship between matrix elements and the matrix as a whole, that is... This is the complete functional representation of the point spread function estimation kernel, where As the independent variable; It is an abbreviation for the matrix of the same point spread function estimation kernel, referring to the first... The point spread function estimation kernel matrix corresponding to the scan row (mathematically consistent and unambiguous) is a two-dimensional matrix, where each element... This indicates that during the exposure time, the pixel energy of the scan line caused by vehicle vibration diffuses to adjacent positions. Normalized weights at each location.
[0051] The point spread function estimation kernels corresponding to all R scan rows are organized into a fuzzy kernel parameter sequence according to the scan row order. Each point spread function estimation kernel in this fuzzy kernel parameter sequence is derived from the physical measurement data of the vibration acceleration sensor and constructed through rigid body kinematics projection, rather than being learned by the network, thus possessing definite physical interpretability. This fuzzy kernel parameter sequence is used as the fuzzy kernel inverse evolution constraint parameter of the decoupled network in the spatial domain. This constraint parameter is injected into the convolution kernel weights of the spatial domain defuzzification convolution layer in the form of non-trainable constants during the forward inference process of the spatial domain branch, providing row-by-row accurate physical degradation model guidance for spatial domain defuzzification processing.
[0052] Step 3.3: Based on the inverse evolution constraint parameters of the blur kernel, perform inverse evolution of the blur kernel on the pushbroom image in the spatial domain branch of the decoupled network to obtain spatial domain deblurring intermediate features. Specifically, the spatial domain branch consists of three sequentially stacked spatial domain deblurring feature extraction units. Each spatial domain deblurring feature extraction unit contains a spatial domain deformable convolutional layer, an instance normalization layer, and a linear unit activation layer with leakage correction. The negative slope coefficient of the linear unit activation layer with leakage correction is set to... The instance normalization layer is used to normalize features along the row dimension of a single push-scan image to maintain the consistency of feature distribution between scan rows; the core processing mechanism of the spatial domain deformable convolutional layer lies in the fact that its standard convolutional kernel is estimated by the point spread function of the corresponding scan row from the sequence of constraints of the fuzzy kernel in each forward inference. Modulated.
[0053] This modulation incorporates two physical guidance mechanisms: weight modulation and offset modulation. These two mechanisms work together to effectively aggregate pixel information in reverse along the fuzzy diffusion path described by the point spread function estimation kernel. Weight modulation affects the weight coefficients of the convolution kernel itself, for a standard convolution kernel of size S rows by T columns. It is located in the convolution kernel. Line 1 Column, No. Input channel and the The weighting coefficient at the output channel is , The range of values is to , The range of values is to The geometric center of the convolution kernel is located at... , ; Estimating the kernel of the point spread function Unfold on a grid coordinate system with the nominal intersection point of the optical axis of the scanning linear array camera and the imaging plane of the rail surface as the zero point, where and Vertical and horizontal grid indices, respectively; modulated deformable convolution kernel weight coefficients. The kernel weights of the standard convolution kernel are obtained by multiplying the values of the point spread function estimation kernel at the corresponding spatial offset position element by element. The calculation formula is as follows: ; For exceeding The position of the convolution kernel in the supporting domain. The value is set to 0; the network design ensures that the standard convolutional kernel size matches the typical support domain of the point spread function estimation kernel, avoiding excessive shrinkage of the effective receptive field; the offset modulation is applied to the spatial position of the convolutional kernel sampling points. This deformable convolutional layer is implemented using a deformable convolution mechanism. In addition to weight modulation, each convolutional kernel sampling point also has a sampling position offset guided by the point spread function estimation kernel. Specifically, the point spread function estimation kernel is first normalized, and its centroid position offset vector relative to the grid origin is calculated as a global offset reference. This global offset reflects the motion blur of the scan line. The dominant offset direction of the diffusion path shifts the sampling center of the convolutional kernel towards the direction of blur. Based on this, for each sampling point within the convolutional kernel, a local offset component proportional to the grid position of the sampling point is superimposed according to the value of the sampling point at the corresponding position in the normalized point spread function kernel. The larger the value of the point spread function kernel, the larger the local offset obtained by the sampling point, while the sampling point with a value below a preset threshold does not apply a local offset and only follows the global offset. The actual sampling position after offset obtains the feature value from the input feature map through bilinear interpolation.
[0054] The two modulation mechanisms work as follows: offset modulation determines where to sample, spatially offsetting the sampling points of the convolution kernel from a fixed rectangular grid position along the direction of the blur diffusion path, so that the sampling points fall on the key pixel positions upstream of the blur diffusion path of the scan line; weight modulation determines how to weight the sampled features, scaling the feature values acquired after offset according to the normalized response of the point spread function, so that the path positions with greater blur diffusion contribution obtain higher response gain in feature aggregation; the two work together, within each convolution sliding window, the network no longer samples pixels along a fixed regular rectangular neighborhood, but adaptively offsets the sampling position and adjusts the aggregation weights according to the blur diffusion path described by the point spread function estimation kernel, thereby gradually eliminating the smooth degradation of the texture edges of the rail surface caused by motion blur effect.
[0055] Adjacent spatial domain deblurring feature extraction units pass feature maps through residual connections. The residual connection method involves adding the input feature map of the previous unit to the output feature map processed by that unit element-wise along the channel dimension to maintain the effective propagation of shallow edge information between feature layers of different depths. After row-by-row processing by all three spatial domain deblurring feature extraction units, the time-varying non-uniform motion blur degradation effect in the pushbroom image is significantly suppressed, and the output is the spatial domain deblurring intermediate feature map. The intermediate feature map has 64 channels and the spatial resolution is consistent with the pushbroom image. The feature value of each pixel position represents the texture response intensity of the rail surface after motion blur removal. The intermediate feature map retains the clear texture contour information of the rail surface after motion blur removal, but still has specular reflection high brightness artifact interference.
[0056] Step 3.4: Based on the frequency domain interference prior, extract the frequency domain distribution features of high-frequency specular reflection artifacts from the transient optical distortion energy distribution map, and use them as the artifact suppression parameters of the decoupling network in the frequency domain. Specifically, this includes: extracting the frequency domain distribution features of specular reflection high-frequency artifacts from the transient optical distortion energy distribution map. Get the position of each cell transient optical distortion energy value at the location This energy value directly characterizes the intensity of optical interference caused by specular reflection from the dynamically mixed coating at the pixel location. The larger the value, the more severe the influence of specular reflection bright artifacts at that location. Since specular reflection bright artifacts manifest as localized high-intensity bright spots in the spatial domain, they are concentrated in the frequency domain as mid-to-high frequency energy components along the longitudinal direction of the rail. Furthermore, the amplitude of these mid-to-high frequency energy components is closely related to the transient optical distortion energy value. There is a positive correlation, therefore the transient optical distortion energy distribution map As a physical prior map describing the spatial distribution characteristics of high-frequency artifacts in specular reflection.
[0057] The transient optical distortion energy distribution map is input into a frequency domain mask generator (the frequency domain mask generator takes the transient optical distortion energy distribution map in the spatial domain as input and outputs a frequency domain suppression weight mask expressed in the spatial domain; this mask is then mapped row by row in the subsequent frequency domain branch to be converted into adaptive attenuation coefficients for each frequency component, thereby bridging the gap from spatial domain priors to frequency domain suppression parameters). This frequency domain mask generator consists of two stacked two-dimensional convolutional layers, with the kernel size of the first two-dimensional convolutional layer being [missing information]. The output channel count is 32, followed by a linear unit activation layer with leakage correction. The kernel size of the second 2D convolutional layer is... Furthermore, the output channel has 1 channel followed by a Sigmoid activation function layer, which maps the output value to a range of 0 to 1; the frequency domain mask generator uses a transient optical distortion energy distribution map. As input, output a frequency domain suppression weight mask with the same spatial resolution as the pushbroom image. ,in The value ranges from 0 to 1. The smaller the value, the stronger the specular reflection high-frequency artifacts at that pixel location, thus requiring a greater degree of suppression of the high-frequency components at that location. The larger the value of , the weaker the high-frequency artifacts of specular reflection at that pixel location, thus requiring a greater preservation of the original frequency components at that location.
[0058] This frequency domain suppression weight mask diagram As the artifact suppression parameters in the frequency domain of the decoupled network, they provide pixel-by-pixel adaptive suppression intensity guidance for frequency domain artifact removal processing. These parameters are injected as non-trainable constants during the forward inference process of the frequency domain branch. The learnable parameters (including kernel weights and bias terms) of the two 2D convolutional layers in the frequency domain mask generator are optimized synchronously with the remaining network parameters during the end-to-end training of the decoupled network. During training, these parameters are determined by the frequency domain artifact removal loss term. The gradient signal is transmitted to the frequency domain mask generator through the backpropagation algorithm, guiding it to learn the nonlinear mapping relationship from the transient optical distortion energy distribution to the frequency domain suppression weights.
[0059] Step 3.5: Based on the artifact suppression parameters, specular reflection high-frequency artifact suppression is performed on the pushbroom image in the frequency domain branch of the decoupled network to obtain intermediate artifact-free features in the frequency domain. Specifically, the frequency domain branch consists of three parts in sequence: a frequency domain transformation unit, a frequency domain adaptive filtering unit, and a frequency domain inverse transformation unit. Specifically, the frequency domain transformation unit performs a one-dimensional fast Fourier transform on the pushbroom image row by row. Scan the line, and the scan line's grayscale values in spatial domains As the length is A one-dimensional discrete real sequence, where Equal to 4096, the radix-2 decimation-time fast Fourier transform algorithm is used to convert this one-dimensional discrete real sequence into its corresponding frequency domain complex spectrum sequence. ,in For discrete frequency index and The range of values is to , For a complex number, its modulus is Indicates the first The amplitude value of each discrete frequency component, its argument Indicates the first Phase value of each discrete frequency component, discrete frequency index The corresponding actual spatial frequency is ,in The row sampling rate is 80kHz.
[0060] After completing the vertical one-dimensional Fourier transform and adaptive filtering of all scan lines, the frequency domain transform unit further performs a horizontal one-dimensional fast Fourier transform on each column of the push-broom image. It adopts the same processing mechanism as the vertical filtering to perform adaptive attenuation on the horizontal spectrum, forming a row-column two-dimensional cascaded frequency domain filtering architecture to ensure that the high-frequency energy components of specular reflection artifacts in both the vertical and horizontal dimensions are directionally suppressed. By examining all The above one-dimensional fast Fourier transform is performed sequentially on each scan line to obtain the amplitude spectrum of the pushbroom image in the frequency domain. and phase spectrum Furthermore, the frequency domain adaptive filtering unit applies the frequency domain suppression weight mask map. Mapping row by row to the frequency domain, for the first row... For each scan line, first calculate the row-direction mean of the frequency domain suppression weight mask values within that scan line. Furthermore, for the frequency index in the amplitude spectrum of this scan line, Frequency components, based on row direction mean and frequency index Calculate the adaptive attenuation coefficient for this frequency component. The calculation formula is as follows: ; in Nyquist frequency index and That is, 2048. The frequency-selective attenuation index is given by a value of 1. , This represents the frequency-dependent attenuation factor, which is present at the low-frequency end. When it approaches 0, it approaches one, thus attenuating low-frequency components almost nothing, and at the high-frequency end... near When the value approaches 0, it achieves maximum decay; when A value close to 1 indicates that the scan line is almost unaffected by specular reflection artifacts. It approaches 1 at all frequencies, and the amplitude spectrum remains essentially unchanged; when A value approaching 0 indicates severe specular reflection artifacts in that scan line. The amplitude value is approximately one at the low-frequency end and approaches zero at the high-frequency end, achieving the attenuation characteristic of high-frequency artifact components increasing with frequency; the original amplitude values of each frequency component in the amplitude spectrum are... Multiply by the corresponding adaptive attenuation coefficient Obtain the attenuated amplitude value At the same time, the original phase spectrum is preserved to ensure the integrity of the spatial domain structure information.
[0061] like Figure 5 As shown, this is a comparison of the amplitude spectrum before and after artifact removal in the frequency domain. The horizontal axis represents the normalized frequency, ranging from 0 to 1, corresponding to the actual spatial frequency of 0 to 40 kHz. The vertical axis represents the logarithmic representation of the amplitude spectrum (unit: dB), reflecting the energy intensity of each frequency component. The blue curve represents the amplitude spectrum of the original pushbroom image, with multiple obvious peaks appearing in the normalized frequency range of 0.58 to 0.92. The peak amplitude is usually 8 dB to 15 dB higher than the background. The energy concentration in this frequency band corresponds to the specular reflection high-frequency artifacts generated by the dynamic mixed adhesion film on the rail surface, which is especially obvious in areas where oil and water stains coexist.
[0062] The orange curve represents the amplitude spectrum after artifact removal in the frequency domain. In the high-frequency range of 0.6 to 0.9, the aforementioned peak energy is significantly suppressed, with attenuation typically between 68% and 76% (typically around 72%), effectively reducing the local overexposure and texture masking effects caused by specular reflection. In the low-frequency range of 0 to 0.3, the amplitude retention rate reaches 94% to 98% (typically around 96%), fully preserving the intrinsic texture, crack edges, and rolling marks of the rail surface. This frequency domain suppression strategy is achieved through a line-by-line adaptive attenuation coefficient, which avoids the texture softening problem caused by traditional global filtering and ensures robustness under strong specular reflection interference conditions.
[0063] Finally, the frequency domain inverse transform unit performs a one-dimensional fast Fourier inverse transform on the attenuated amplitude spectrum and the preserved original phase spectrum line by line, resulting in the attenuated complex spectrum. Restored to a spatial domain grayscale signal, where The imaginary unit, The natural exponential function is used. After the above frequency domain branching process, the specular reflection bright artifacts generated by the dynamic mixed adhesion film on the rail surface in the pushbroom image are significantly suppressed, while the low-frequency structural information of the intrinsic texture of the rail surface is completely preserved, and the output is the frequency domain artifact-removed intermediate feature map. The intermediate feature map has 64 channels and its spatial resolution is consistent with that of the pushbroom image.
[0064] In a preferred embodiment of the present invention, step 3 above may further include: Step 3.6: Obtain the spatial domain deblurring intermediate features and the frequency domain artifact removal intermediate features from the decoupled network, specifically including: the spatial domain deblurring intermediate feature map. The dimension is Travel The 64-channel feature map represents the multi-scale texture response intensity of the rail surface after motion blur removal. The intermediate feature map has a clear gradient response at the junction of the defect edge and the normal texture on the rail surface, but there are still local feature anomalies caused by optical interference in the bright areas of specular reflection. Specifically, a few channels in the 64-dimensional feature vector of the specular reflection area have abnormally high activation values.
[0065] Intermediate feature map for artifact removal in the frequency domain Also has Travel Multiplying by 64 channels, the 64-dimensional feature vector at each pixel location represents the multi-scale texture response intensity of the rail surface after specular reflection high-frequency artifact suppression. This intermediate feature map effectively suppresses feature anomalies in the specular reflection highlight area, but in the motion blur degradation area, there is still a weakening of texture details due to blur diffusion. Specifically, the gradient response amplitude of each channel in the 64-dimensional feature vector of the blurred area is generally low. These two intermediate feature maps address the dual degradation effect in the pushbroom image from two complementary perspectives: spatial domain degradation correction and frequency domain interference suppression. The spatial domain branch is good at restoring the clarity of texture edges, while the frequency domain branch is good at eliminating local overexposure artifacts caused by specular reflection. The information carried by the two is complementary rather than redundant, providing complementary feature sources for subsequent multi-domain feature fusion.
[0066] Step 3.7: In the decoupling network, multi-domain feature fusion is performed on the spatial domain deblurred intermediate features and the frequency domain artifact-removed intermediate features to obtain a fused joint feature map. Specifically, this includes: in the multi-domain feature fusion module of the decoupling network, the spatial domain deblurred intermediate feature map is processed... Intermediate feature map for artifact removal in the frequency domain Multi-domain feature fusion is performed to obtain a fused joint feature map. This multi-domain feature fusion module consists of a three-level structure: a feature concatenation layer, a channel compression convolutional layer, and an attention-weighted fusion layer. Specifically, the feature concatenation layer deblurs the intermediate feature map in the spatial domain. Intermediate feature map for artifact removal in the frequency domain The features are stitched together along the channel dimension to form a stitched feature map with 128 channels. The first 64 channels come from The last 64 channels come from .
[0067] Furthermore, the channel compression convolutional layer uses a convolutional kernel with a size of [missing value]. Furthermore, a 2D convolution operation with a stride of 1 and padding of 1 compresses the number of channels in the concatenated feature map from 128 to 64, resulting in a channel-compressed intermediate feature map. This compression operation simultaneously learns the optimal linear combination of two intermediate features along the channel dimension; finally, the attention-weighted fusion layer uses a spatial attention mechanism to process the channel-compressed intermediate feature map. The specific computational process of this spatial attention mechanism for adaptive weighted fusion is as follows: First, ... The inputs are fed into a global average pooling branch and a global max pooling branch, respectively. The global average pooling branch is processed along the channel dimension. The average value across all 64 channels is used to obtain the size. Travel Column-multiplied average pooling feature map of one channel Global max pooling branch along the channel dimension The maximum value obtained by taking the maximum value across all 64 channels is of size . Travel Multiplying a single channel of the max pooling feature map .
[0068] Based on this, and The size obtained by splicing along the channel dimension is... Travel Multiply the pooled feature image of the two channels by a column; input this pooled feature image into a convolution kernel with a size of [size missing]. A shared 2D convolutional layer with a stride of 1 and padding of 3 maps the two-channel pooled feature stitched map to a one-channel attention score map. This attention score map is then input into a sigmoid activation function layer to generate a spatial attention weight map with values between 0 and 1. ,in This indicates that the fusion operation is related to spatial location. The fusion weights are assigned to the channel compression feature vectors at each location; ultimately, the spatial attention weight map is... Intermediate feature map after channel compression Perform channel-wise and element-wise multiplication to obtain the fused joint feature map. Its calculation formula is ;in For channel index and The range of values is Up to 63; This joint feature map combines the advantages of spatial domain deblurring and frequency domain artifact removal, and includes a spatial attention weight map. In spatial regions with clear and reliable texture structures, higher fusion weights are automatically assigned, while in spatial regions with significant degradation residues, lower fusion weights are automatically assigned, thereby effectively suppressing the residual degradation effects in each of the two branches.
[0069] Step 3.8: Based on the fused joint feature map, the defect texture features and the rail surface background texture features are decoupled and separated in the decoupling network to obtain the decoupled intrinsic surface texture feature map. Specifically, this includes: decoupling and separating the defect texture features and the rail surface background texture features in the intrinsic texture decoupling module of the decoupling network to obtain the decoupled intrinsic surface texture feature map; this intrinsic texture decoupling module is composed of a feature decoupling network with an autoencoder structure, which includes an encoder part, a defect texture decoder part, and a background texture decoder part, totaling three components; the encoder part consists of three sequentially downsampled feature coding blocks, each feature coding block containing two convolutional kernels with a size of A 2D convolutional layer with stride of 1 and padding of 1, and a pooling window with stride of 2 and a size of [missing information]. The max pooling layer, where each 2D convolutional layer is followed by an instance normalization layer and a linear unit activation layer with leakage correction, and after stepwise downsampling of three feature encoding blocks, the fused joint feature map is obtained. From the original spatial resolution Travel The column is compressed to Travel The number of feature channels was expanded from 64 to 512, ultimately resulting in a low-resolution, high-semantic latent space representation vector. The latent space represents a vector. The semantic content of all texture information in the pushbroom image is encoded in a compressed form.
[0070] The defect texture decoder consists of three sequentially upsampled feature decoding blocks, each containing a convolutional kernel with a stride of 2 and a kernel size of [missing value]. The transposed convolutional layer and the two convolutional kernels have a size of A two-dimensional convolutional layer with a stride of 1 and padding of 1 is used, where each two-dimensional convolutional layer is followed by an instance normalization layer and a linear unit activation layer with leakage correction. The defect texture decoder part uses a latent space representation vector. As input, the image is upsampled stepwise to restore the same spatial resolution as the pushbroom image, and the final output is a defect texture feature map. This defect texture feature map focuses on the texture details of defect areas on the rail surface, including the morphological features of linear crack textures extending longitudinally or obliquely along the rail, the boundary contour features of irregular block textures from peeling, and the grayscale gradient features of crushed, concave textures, among other unique defect features. The background texture decoder has the exact same network structure as the defect texture decoder but uses independently initialized and trained network parameters, and also uses latent space representation vectors. As input, the image is upsampled stepwise to restore it to the same spatial resolution as the pushbroom image, and the final output is a background texture feature map. The background texture feature map focuses on non-defect background features such as the parallel stripe features of the roll texture regularly distributed along the longitudinal direction of the rail in the normal area of the rail surface, the random spot-like features of the slight rust texture, and the continuous band-like features of the rail surface wear texture.
[0071] During the training of the intrinsic texture decoupling module, an additional orthogonality constraint loss function term is introduced, which forces the defect texture feature map to... Background texture feature map In the corresponding spatial location The feature vectors at each location are kept orthogonal, meaning the inner product of two feature vectors is required to approach 0. This ensures that the two texture features are decoupled and do not interfere with each other in the feature space, preventing background texture information from being mixed into the defect texture feature map or vice versa. After the above spatial domain deblurring, frequency domain artifact removal, multi-domain feature fusion, and intrinsic texture decoupling, the final decoupled intrinsic surface texture feature map is obtained. This intrinsic surface texture feature map is specifically represented as the defect texture feature map after training convergence. It contains only texture information directly related to defects on the rail surface. Motion blur degradation and specular reflection artifacts have been effectively removed, and background texture information has been decoupled and separated. The defect texture edges in the feature map are clear, and the contrast between the defect area and the background area is significantly enhanced. This provides high-quality, low-interference input features for the defect classification and localization network in subsequent steps, which is beneficial to improving the accuracy of defect type identification and the precision of defect boundary localization.
[0072] In a preferred embodiment of the present invention, step 4 above may include: Step 4.1: Obtain the decoupled intrinsic surface texture feature map from the decoupled network, and input the decoupled intrinsic surface texture feature map into the defect classification and localization network. Specifically, this includes: obtaining the trained and converged defect texture feature map from the intrinsic texture decoupling module of the decoupled network as the decoupled intrinsic surface texture feature map (as described in step 3.8, this feature map focuses on defect texture representation). The spatial resolution of the intrinsic surface texture feature map is R rows by C columns and the number of channels is 64. The 64-dimensional feature vector at each pixel position contains only texture information directly related to the defects on the rail surface and does not contain background texture information or degradation interference information. The intrinsic surface texture feature map is input into the feature input layer of the defect classification and localization network in a channel-by-channel manner.
[0073] The defect classification and localization network adopts a two-stage cascaded architecture consisting of a backbone feature extraction network and a detection head network. This two-stage cascaded architecture originates from a two-stage target detection paradigm based on region proposal and has been adaptively improved for rail surface defect detection tasks. The backbone feature extraction network uses a ResNet-50 deep convolutional neural network architecture. This ResNet-50 network has been pre-trained on the ImageNet large-scale natural image dataset. After removing its final fully connected classification layer, five feature extraction stages (conv1 to conv5x) are retained as the feature extraction backbone to give the network general low-level texture perception capabilities. Furthermore, it utilizes texture features of four types of rail surface defects, including cracks, peeling, crushing, and fish scale patterns. This labeled dataset is used for end-to-end joint fine-tuning training of all learnable parameters of the backbone feature extraction network and the detection head network. The initial weights of the backbone feature extraction network are loaded from ImageNet pre-trained weights, while the weights of the detection head network are randomly initialized. The entire network is fine-tuned with an initial learning rate. During training, the total loss function is the weighted sum of the defect category classification loss and the defect bounding box regression loss. The network weight parameters are iteratively updated through the backpropagation algorithm until the total loss function converges. The detection head network consists of two parallel output branches: a classification branch and a localization branch. The classification branch is responsible for classifying the defect texture features in the candidate region, while the localization branch is responsible for regressing the bounding box parameters of the defect spatial location in the candidate region.
[0074] Step 4.2: In the defect classification and localization network, defect candidate region features are extracted from the decoupled intrinsic surface texture feature map to obtain a defect candidate region feature map. Specifically, in the backbone feature extraction network of the defect classification and localization network, multi-scale convolutional feature extraction is performed on the decoupled intrinsic surface texture feature map to obtain a defect candidate region feature map. The backbone feature extraction network (ResNet-50) consists of five sequentially stacked feature extraction stages, corresponding to the conv1, conv2x, conv3x, conv4x, and conv5x modules of ResNet-50, respectively. The conv1 stage contains a two-dimensional convolutional layer with a kernel size of 7×7 and a stride of 2, and a max pooling layer with a stride of 2. The conv2x to conv5x stages are composed of multiple bottleneck residual blocks stacked sequentially. Each bottleneck residual block contains layer-by-layer convolutional operations with kernel sizes of 1×1, 3×3, and 1×1. After the step-by-step downsampling processing of the five feature extraction stages, a set of multi-scale feature map pyramids with different spatial resolutions and different semantic levels is output.
[0075] Shallow feature maps retain more edge and texture details, while deep feature maps contain richer semantic abstraction information. The three highest-resolution feature maps from the multi-scale feature map pyramid are input into a region proposal network. This network generates candidate defect regions at each spatial location in each feature map layer using nine anchor box configurations across three aspect ratios and three scales. The aspect ratios are set to 1:2, 1:1, and 2:1 to accommodate the different proportions of rail surface defects in the push-broom image. For each candidate defect region proposal, a region of interest alignment operation is used to refine the corresponding layer's feature map. Normalized region feature vectors of a fixed size of 7x7 are extracted from the feature map. The region of interest alignment operation uses bilinear interpolation on the feature map grid to calculate the precise feature value of each sampling point, thereby avoiding the introduction of quantization error. All normalized region feature vectors are organized into a defect candidate region feature map according to the channel dimension. Each channel group in the defect candidate region feature map corresponds to a multi-scale texture feature representation of a defect candidate region. This feature representation integrates the edge gradient information, texture direction information, and grayscale contrast information of the defect region, providing a unified feature input format for subsequent classification and location regression.
[0076] Step 4.3: Based on the feature map of the defect candidate region, the defect category is identified in the classification branch of the defect classification and localization network to obtain the defect category identification result. Specifically, the classification branch consists of a fully connected feature compression layer, a fully connected feature mapping layer, and a classification output layer cascaded in sequence. The fully connected feature compression layer compresses the normalized region feature vector of each defect candidate region from the high-dimensional feature space to a 1024-dimensional intermediate feature vector. The fully connected feature mapping layer further maps the compressed intermediate feature vector to a 256-dimensional category discrimination feature vector. The classification output layer takes the category discrimination feature vector as input and maps it to a classification confidence score vector of 5 categories through a parameter matrix. The 5 elements in the classification confidence score vector correspond to the crack defect category, peeling defect category, crushing defect category, fish scale defect category, and background non-defect category, respectively. The 5 classification confidence scores are all floating-point numbers between 0 and 1, and the sum of the 5 scores is always equal to 1.
[0077] The normalization feature is constrained at the output end by the flexible maximum normalization function of the classification output layer to ensure that the confidence scores of each classification have comparable probabilistic semantics. The category with the highest score in the classification confidence score vector is taken as the defect category identification result of the defect candidate region. When the highest score category is the background non-defect category, the defect candidate region is determined to not contain rail surface defects and is discarded. When the highest score category is any one of the four defect categories, the defect candidate region and its corresponding defect category label are retained.
[0078] Step 4.4: Based on the defect candidate region feature map, the defect location is regressed in the localization branch of the defect classification and localization network to obtain the defect location result. Specifically, this includes: based on the defect candidate region feature map, performing precise spatial location regression on each candidate region determined by the classification branch to contain a defect in the localization branch of the defect classification and localization network. The localization branch consists of an independent fully connected layer sequence that shares input with the classification branch. This independent fully connected layer sequence includes a fully connected feature compression layer and a bounding box regression output layer. The fully connected feature compression layer compresses the normalized region feature vector of the defect candidate region to a 1024-dimensional localization feature vector, and the bounding box regression output layer... The layer takes the localization feature vector as input and outputs a 4-dimensional position offset parameter vector through the regression parameter matrix automatically learned during the network training phase. The four elements of this position offset parameter vector represent the vertical coordinate offset of the center point of the defect candidate region proposal box, the horizontal coordinate offset of the center point, the height scaling factor, and the width scaling factor, respectively. The height scaling factor and the width scaling factor are both represented in logarithmic space and typically range from -0.7 to 0.7 after training convergence. This range corresponds to scaling the original anchor frame height and width by about 0.5 to 2 times, which can effectively cover the scale variation range of rail surface defects in the push-broom image relative to the preset size of the anchor frame.
[0079] The center point ordinate offset and center point abscissa offset are adaptively predicted by the network based on the texture feature distribution of the defect candidate region. After correcting the position and scaling the size of the original defect candidate region proposal box using these four position offset parameters, the precise position coordinates of the defect bounding box are obtained. The precise position coordinates of the defect bounding box are represented by four values: the ordinate of the upper left corner, the abscissa of the upper left corner, the ordinate of the lower right corner, and the abscissa of the lower right corner of the defect's circumscribed rectangle. These position coordinates directly correspond to the spatial position of the rail surface defect in the push-broom image coordinate system. The precise position coordinates of the defect bounding box maintain a strict one-to-one correspondence with the row-by-row spatial position relationship of the push-broom image.
[0080] Step 4.5: Based on the defect category identification results and defect location results, the defect classification and localization network generates real-time detection results of rail surface defects. Specifically, this includes: the output integration layer of the defect classification and localization network generates real-time detection results of rail surface defects. The output integration layer first sorts all candidate defect regions retained in Step 4.3 according to their classification confidence scores from high to low to obtain a descending list of candidate regions. Then, it selects the candidate defect region with the highest classification confidence score from the candidate region list as the current reference box and moves it from the list into the final retained result set. Subsequently, it iterates through each remaining candidate defect region in the candidate region list and calculates the intersection-union ratio (IUU) of the defect bounding box overlap area between the candidate region and the current reference box.
[0081] The intersection-union ratio is defined as the ratio of the intersection area to the union area of two defect bounding boxes. Let the current reference box... The four-dimensional position coordinates are the top left ordinate. The top left x-coordinate bottom right ordinate The horizontal coordinate of the lower right corner Let the defect candidate box currently being traversed be in the candidate region list. The four-dimensional position coordinates are the top left ordinate. The top left x-coordinate bottom right ordinate The horizontal coordinate of the lower right corner Then the upper bound of the intersection interval of the two defect bounding boxes is taken as and The larger value in the interval, and the lower bound of the intersection ordinate interval are taken as and The smaller value in the interval, and the left boundary of the intersection x-coordinate interval are taken as... and The larger value in the interval, the right boundary of the intersection x-coordinate interval is taken and The smaller of the two intervals is used to determine the area of intersection. When the upper bound of the intersection's vertical coordinate interval is less than the lower bound of the intersection's vertical coordinate interval and the left bound of the intersection's horizontal coordinate interval is less than the right bound of the intersection's horizontal coordinate interval, the area of intersection is the product of the lengths of the two intervals. Otherwise, the area of intersection is 0.
[0082] The union area is the reference frame Area and candidate box The intersection-union ratio (IUR) is the ratio of the intersection area to the union area, calculated by subtracting the intersection area from the sum of the areas of the two sets. When this IUR exceeds a preset threshold... When two defect bounding boxes are determined to correspond to the same defect target, the defect candidate region is removed from the candidate region list, provided that the intersection-union ratio (IUU) value does not exceed a preset threshold. The defect candidate region is retained in the candidate region list at that time, wherein the preset threshold The cross-union ratio (CURRR) threshold for non-maximum suppression ranges from 0.3 to 0.7. In this embodiment, it is set to... After completing one round of traversal, the candidate region with the highest classification confidence score is selected again from the updated candidate region list as the new reference box, and the above traversal and elimination process is repeated until the candidate region list is empty, at which point the algorithm terminates. After the above non-maximum suppression deduplication and merging process, a set of non-repeating final defect detection results in the current frame push-broom image is obtained. Each detection result in the final defect detection result set contains three fields: defect category label, defect category confidence score, and four-dimensional position coordinates of the defect bounding box. The final defect detection result set of the current frame push-broom image is encapsulated into a structured message according to a predetermined data communication protocol and sent to the upper monitoring terminal of the rail inspection vehicle in real time, thereby completing the real-time online detection and positioning of rail surface defects.
[0083] like Figure 2 As shown, embodiments of the present invention also provide a real-time image detection system for rail surface defects, comprising: The multi-source synchronous acquisition module is used to acquire multi-source synchronous data, which includes push-sweep images acquired by the line scan camera pushing and sweeping the rail surface, as well as the vibration acceleration timing signal of the bottom of the detection vehicle and the polarization state information of the reflected light after the active light source is reflected by the rail surface, which are acquired synchronously with the push-sweep images. The physical prior construction module is used to construct a point spread function estimation model of time-varying non-uniform motion fuzz based on the vibration acceleration time-series signal as a spatial domain degradation prior, and to separate the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface based on the polarization state information of the reflected light to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. The physical guided feature decoupling module is used to input the pushbroom image into the decoupling network according to the spatial domain degradation prior and the frequency domain interference prior. After spatial domain deblurring, frequency domain artifact removal, and multi-domain feature fusion and decoupling, the decoupled intrinsic surface texture feature map is obtained. The defect classification and localization module is used to input the decoupled intrinsic surface texture feature map into the pre-trained defect classification and localization network, and the defect classification and localization network obtains the real-time detection results of rail surface defects.
[0084] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0085] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0086] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0087] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A real-time image detection method for rail surface defects, characterized in that, The method includes: Acquire multi-source synchronous data, including push-sweep images collected by the line scan camera on the rail surface, as well as the timing signal of vibration acceleration at the bottom of the detection vehicle and the polarization state information of reflected light after reflection from the rail surface by the active light source, which are acquired synchronously with the push-sweep images. Based on the vibration acceleration time-series signal, a point spread function estimation model for time-varying non-uniform motion fuzz is constructed as a spatial domain degradation prior; based on the polarization state information of the reflected light, the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface are separated to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. Based on spatial domain degradation priors and frequency domain interference priors, the pushbroom image is input into a pre-trained physical guidance feature decoupling network. Time-varying non-uniform blur kernel parameters are extracted from the point spread function estimation model and used as the spatial domain blur kernel inverse evolution constraint parameters for the decoupling network, resulting in spatial domain deblurring intermediate features. The transient optical distortion energy distribution map is used to suppress specular reflection high-frequency artifacts in the frequency domain of the decoupling network, resulting in frequency domain artifact-free intermediate features. The spatial domain deblurring intermediate features and the frequency domain artifact-free intermediate features are then fused and decoupled by the decoupling network to obtain the decoupled intrinsic surface texture feature map. The decoupled intrinsic surface texture feature map is input into a pre-trained defect classification and localization network, and the real-time detection results of rail surface defects are obtained by the defect classification and localization network.
2. The real-time image detection method for rail surface defects according to claim 1, characterized in that, Acquire multi-source synchronous data, including push-broom images acquired by a linear scan camera sweeping the rail surface, and timing signals of vibration acceleration at the bottom of the detection vehicle and polarization state information of reflected light from the active light source after reflection from the rail surface, acquired synchronously with the push-broom images, including: Vibration acceleration sensors and polarization state sensors are deployed at the bottom of the inspection vehicle, and the linear array camera and the active light source are mounted at the bottom of the inspection vehicle to establish a multi-source sensor synchronous trigger acquisition link; According to the synchronous trigger acquisition link, the vibration acceleration sensor is triggered to acquire the vibration acceleration time sequence signal, the polarization state sensor is triggered to acquire the polarization state information of the reflected light, and the linear array camera is triggered to perform push-scan on the rail surface to obtain a push-scan image. A unified timestamp is generated based on the synchronous trigger acquisition link. Based on the unified timestamp, the push-broom image, vibration acceleration timing signal and reflected light polarization state information are time-stamped to obtain multi-source synchronous data.
3. The real-time image detection method for rail surface defects according to claim 2, characterized in that, Based on the vibration acceleration time-series signal, a point spread function estimation model for time-varying non-uniform motion fuzziness is constructed as a spatial domain degradation prior; based on the polarization state information of the reflected light, the specular reflection component and diffuse reflection component generated by the dynamically mixed adhesive film on the rail surface are separated to obtain a transient optical distortion energy distribution map as a frequency domain interference prior, including: The vibration acceleration time-series signal is obtained from multi-source synchronous data, and the vibration displacement time-series trajectory of the bottom of the detection vehicle during the sweeping process is extracted based on the vibration acceleration time-series signal. Based on the vibration displacement time trajectory, the instantaneous position offset of the line scan camera at each exposure moment of the scanning line is determined; Based on the instantaneous position offset, a point spread function estimation model for time-varying non-uniform motion fuzz is constructed as a spatial domain degradation prior. The polarization state information of the reflected light is obtained from multi-source synchronous data, and the polarization state change characteristics of the active light source on the dynamic hybrid adhesive film on the rail surface are determined based on the polarization state information of the reflected light. Based on the polarization state change characteristics, the specular reflection component and diffuse reflection component generated by the dynamic hybrid attachment film are separated to obtain the separated specular reflection component and diffuse reflection component. Based on the separated specular reflection and diffuse reflection components, a transient optical distortion energy distribution map is constructed as a priori for frequency domain interference.
4. The real-time image detection method for rail surface defects according to claim 3, characterized in that, The decoupled intrinsic surface texture feature map includes: Pushbroom images are obtained from multi-source synchronous data and input into the decoupled network. Based on the spatial domain degradation prior, time-varying non-uniform fuzzy kernel parameters are extracted from the point spread function estimation model and used as fuzzy kernel inverse evolution constraint parameters of the decoupled network in the spatial domain. Based on the fuzzy kernel inverse evolution constraint parameters, the pushbroom image is subjected to fuzzy kernel inverse evolution in the spatial domain branch of the decoupled network to obtain spatial domain defuzzified intermediate features; Based on the frequency domain interference prior, the frequency domain distribution characteristics of high-frequency artifacts of specular reflection are extracted from the transient optical distortion energy distribution map and used as the artifact suppression parameters of the decoupling network in the frequency domain. Based on the artifact suppression parameters, specular reflection high-frequency artifact suppression is performed on the pushbroom image in the frequency domain branch of the decoupled network to obtain intermediate features for artifact removal in the frequency domain.
5. The real-time image detection method for rail surface defects according to claim 4, characterized in that, The decoupling network fuses and decouples the spatial domain deblurred intermediate features and the frequency domain artifact-removed intermediate features to obtain a decoupled intrinsic surface texture feature map, including: The spatial domain deblurring intermediate features and the frequency domain artifact removal intermediate features are obtained from the decoupled network. In the decoupled network, multi-domain feature fusion is performed on the spatial domain deblurred intermediate features and the frequency domain artifact-removed intermediate features to obtain a fused joint feature map; Based on the fused joint feature map, the defect texture features and the background texture features of the rail surface are decoupled and separated in the decoupled network to obtain the decoupled intrinsic surface texture feature map.
6. The real-time image detection method for rail surface defects according to claim 5, characterized in that, The decoupled intrinsic surface texture feature map is input into a pre-trained defect classification and localization network. The real-time detection results of rail surface defects are obtained from the defect classification and localization network, including: The decoupled intrinsic surface texture feature map is obtained from the decoupled network, and the decoupled intrinsic surface texture feature map is input into the defect classification and localization network. In the defect classification and localization network, defect candidate region features are extracted from the decoupled intrinsic surface texture feature map to obtain the defect candidate region feature map; Based on the feature map of the defect candidate region, the defect category is identified in the classification branch of the defect classification and localization network to obtain the defect category identification result; Based on the feature map of the defect candidate region, the defect location is regressed in the localization branch of the defect classification and localization network to obtain the defect location result. Based on the defect category identification results and defect location results, the defect classification and localization network generates real-time detection results of rail surface defects.
7. A real-time image detection system for rail surface defects, wherein the system implements the method as described in any one of claims 1 to 6, characterized in that, include: The multi-source synchronous acquisition module is used to acquire multi-source synchronous data, which includes push-sweep images acquired by the line scan camera pushing and sweeping the rail surface, as well as the vibration acceleration timing signal of the bottom of the detection vehicle and the polarization state information of the reflected light after the active light source is reflected by the rail surface, which are acquired synchronously with the push-sweep images. The physical prior construction module is used to construct a point spread function estimation model of time-varying non-uniform motion fuzz based on the vibration acceleration time-series signal as a spatial domain degradation prior, and to separate the specular reflection component and diffuse reflection component generated by the dynamic mixed adhesion film on the rail surface based on the polarization state information of the reflected light to obtain a transient optical distortion energy distribution map as a frequency domain interference prior. The physical guided feature decoupling module is used to input the pushbroom image into the decoupling network according to the spatial domain degradation prior and the frequency domain interference prior. After spatial domain deblurring, frequency domain artifact removal, and multi-domain feature fusion and decoupling, the decoupled intrinsic surface texture feature map is obtained. The defect classification and localization module is used to input the decoupled intrinsic surface texture feature map into the pre-trained defect classification and localization network, and the defect classification and localization network obtains the real-time detection results of rail surface defects.
8. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.