High-reflection subway contact rail surface defect detection method and system

By simulating natural ambient light and optimizing light source parameters, combined with the improved YOLOv5s network, the detection difficulties caused by the high reflectivity of the subway contact rail surface are solved, efficient and accurate defect detection is achieved, and reliable subway line system and power supply system are provided. Maintenance support.

CN119223978APending Publication Date: 2024-12-31SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411326499.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The high reflectivity of the surface of the subway contact rail leads to difficulty in image acquisition and processing, affecting the accuracy and efficiency of defect detection. The prior art has failed to effectively identify the defects on the surface of the contact rail.

Method used

A high-reflective subway contact rail surface defect detection system is designed, including a subway tunnel simulation unit, a light intensity generation unit and an image processing unit. By simulating natural ambient light, controlling light source parameters and using an improved YOLOv5s network for image acquisition and processing. Optimize light source parameters to improve detection accuracy.

Benefits of technology

It improves the accuracy and efficiency of contact rail surface defect detection, provides reliable technical support for the maintenance of subway line systems and power supply systems, and can accurately identify and deal with defects on contact rail surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119223978A_ABST
    Figure CN119223978A_ABST
Patent Text Reader

Abstract

The invention provides a high-reflection subway contact rail surface defect detection method and system. The system comprises a subway tunnel simulation unit, and an illumination intensity generation unit, an image acquisition unit and an image processing unit which are arranged in the subway tunnel simulation unit, the subway tunnel simulation unit is used for simulating natural environment light in different time periods in a subway tunnel; the illumination intensity generation unit is used for controlling a light source to generate different illumination intensities; the image acquisition unit is used for acquiring contact rail images under different light source conditions and transmitting the contact rail images to the image processing unit; and the image processing unit is used for analyzing the influence of different light source conditions on the recognition quality of shot images for the surface defects of the subway contact rail, and detecting the surface defects of the subway contact rail by optimizing light source parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of subway track detection, and in particular relates to a method and system for detecting surface defects of a highly reflective subway contact rail. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Subways play many important roles in urban transportation and bring great convenience to people's lives. Trains cannot travel without the assistance of three tracks, two running rails and one contact rail. The contact rail is a special power transmission system that supplies power to trains. During the operation of the train, the train extends the power receiving shoe to connect with the contact rail to obtain power. This power supply method has the advantages of good stability, high conductivity, and small requirements on tunnel boundaries.

[0004] However, in daily use, the contact rail will have many surface defects such as cracks, rust, and wear due to daily train friction, spark burning, etc. If not treated for a long time, it will damage the train current collecting shoe and bring serious safety hazards. The contact rail is usually composed of steel-aluminum composite plates, and its surface becomes smoother under the friction of the train. During daily inspections, it is necessary to use manual or machine means to light its surface to check its actual state. In this process, the high reflectivity of the metal surface will bring difficulties to image acquisition and processing. The highlight area in the image may block the existence of defects, or cause overexposure and distortion of the image, affecting the quality and availability of the image. These problems will reduce the accuracy and efficiency of surface defect detection and identification, and it is impossible to accurately identify contact rail defects and repair them, which will ultimately affect the reliability and stability of the contact rail.

[0005] The inventors discovered during their research that there are existing solutions for detecting track images in the prior art. However, the problem with the above solutions is that they do not take into account the high reflectivity of the surface of the subway contact rail, which will affect the quality of the collected contact rail surface images, and thus make it impossible to accurately identify surface defects of the contact rail. Summary of the invention

[0006] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a highly reflective subway contact rail surface defect detection method, which is used to solve the technical problems of low recognition accuracy and low efficiency when performing surface defect detection on the contact rail, and provide reliable technical support for the maintenance of subway line systems and power supply systems.

[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0008] In a first aspect, a highly reflective subway contact rail surface defect detection system is disclosed, comprising:

[0009] A subway tunnel simulation unit and a light intensity generating unit, an image acquisition unit and an image processing unit arranged in the subway tunnel simulation unit;

[0010] The subway tunnel simulation unit is used to simulate the natural ambient light in the subway tunnel at different time periods;

[0011] The light intensity generating unit is used to control the light source to generate different light intensities;

[0012] The image acquisition unit is used to acquire contact rail images under different light source conditions and transmit them to the image processing unit;

[0013] The image processing unit is used to analyze the influence of different light source conditions on the recognition quality of the image taken of the subway contact rail surface defects, and detect the subway contact rail surface defects by optimizing the light source parameters.

[0014] As a further technical solution, the subway tunnel simulation unit includes two black boxes surrounded by an inner and outer box, and there are openings on both sides of the inner black box. Grilles are placed at the openings to make the openings grid-shaped; two LED lights can be set with different light intensities and are placed at the openings on both sides of the inner black box respectively to irradiate light into the inner black box, thereby simulating the natural ambient light in the subway tunnel at different time periods.

[0015] As a further technical solution, the light intensity generating unit comprises: a strip light source, a ring light source and a dome light source, and the above light sources are all connected to a light source controller;

[0016] The above light sources are all fixed on a light source bracket, and the distance between the strip light source, annular light source, dome light source and the highly reflective subway contact rail to be detected can be changed by adjusting the position of the light source bracket.

[0017] As a further technical solution, the light intensity generating unit also includes: a red, blue and green three-color filter. By sticking the red, blue and green three-color filter to the front end of the strip light source, ring light source and dome light source, red light, blue light and green light can be obtained.

[0018] As a further technical solution, the light intensity generating unit further includes: a polarizer, which is a linear polarizer and can be placed between the annular light source, the dome light source and the highly reflective subway contact rail to be detected.

[0019] In a second aspect, a method for detecting surface defects of a highly reflective subway contact rail is disclosed, comprising:

[0020] Simulate the natural ambient light in subway tunnels at different times;

[0021] Control the light source to produce different light intensities;

[0022] Collect contact rail images under different light sources and natural ambient light conditions in subway tunnels at different times;

[0023] The contact rail images collected under different light source conditions are input into the subway contact rail surface defect detection model for training, so as to obtain a trained subway contact rail surface defect detection model;

[0024] The surface image of the subway contact rail to be inspected is input into the corresponding trained subway contact rail surface defect detection model for detection to obtain the surface defect detection result of the subway contact rail.

[0025] As a further technical solution, when collecting contact rail images under different light source conditions, a strip light source, an annular light source or a dome light source is placed above the subway contact rail to be inspected;

[0026] Fix the intensity of the light source, the distance between the light source and the inspected part, adjust the angle between the strip light source and the contact rail of the inspected part, and collect images of the contact rail under different angles;

[0027] Fix the angle and light source intensity, adjust the light source bracket to change the distance between the strip light source and the inspected part, and collect contact rail images under different distance conditions;

[0028] Fix the angle and the distance between the light source and the inspected part, adjust the light source intensity through the light source controller, and collect the contact rail images under different light source intensities;

[0029] Fix the angle, light source intensity, and distance between the light source and the inspected part, attach red, green, and blue filters to the front end of the light source to obtain three colors of light, use red light, blue light, and green light to illuminate the inspected part respectively, and collect images of the contact rail under different lights.

[0030] As a further technical solution, the subway contact rail surface defect detection model adopts an improved YOLOv5s network and is trained by transfer learning;

[0031] The improved YOLOv5s network refers to replacing the backbone network of YOLOv5s with the ResNet-50 residual network. Using it as the backbone network can make the subway contact rail surface defect detection model easier to perform transfer learning, and adding the CBAM attention mechanism to the last layer of the backbone network.

[0032] As a further technical solution, after collecting contact rail images under different light source conditions, a training data set is constructed, and the training data set is processed by zooming in, zooming out, cropping, and rotating to obtain more feature samples;

[0033] A feature transfer method is adopted to extract edge and texture features from existing subway contact rail surface defect detection and classification tasks, and then the extracted features are used in the subway contact rail surface defect detection model.

[0034] As a further technical solution, the EIoULoss function is used as the regression loss function of the improved YOLOv5s network. The EIoULoss function consists of three parts: overlap loss, center distance loss, and width and height loss.

[0035] One or more of the above technical solutions have the following beneficial effects:

[0036] The technical solution of the present invention generates different light intensities by controlling the light source; then collects contact rail images under different light source conditions, analyzes the influence of different light source conditions on the recognition quality of image capture of surface defects of subway contact rails, and detects surface defects of subway contact rails by optimizing light source parameters. This can solve the technical problems of low recognition accuracy and low efficiency when performing surface defect detection on contact rails, and provide reliable technical support for the maintenance of subway line systems and power supply systems.

[0037] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0039] Figure 1 It is a schematic diagram of a high-reflective subway contact rail surface defect detection test system of the present invention;

[0040] Figure 2 This is a flow chart of the surface defect detection of the highly reflective subway contact rail of the present invention;

[0041] In the figure: 1. Outer black box; 2. Inner black box; 3. LED light; 4. PC terminal; 5. CCD camera; 6. Camera bracket; 7. Bar light source; 8. Ring light source; 9. Dome light source; 10. Light source bracket; 11. Light source controller; 12. Linear polarizer; 13. Stage; 14. Parts to be inspected. DETAILED DESCRIPTION

[0042] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0043] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0044] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0045] Embodiment 1

[0046] See attached Figure 1 As shown, this embodiment discloses a method for detecting surface defects of a highly reflective subway contact rail, comprising:

[0047] Two black boxes, two LED lights, PC, CCD camera, camera holder, two bar light sources, ring light source, dome light source, light source controller, light source holder, red, blue and green filters, polarizer, stage and parts to be inspected.

[0048] In this embodiment, if Figure 1 As shown, the two black boxes are an inner and outer surrounding structure, the outer black box 1 surrounds the inner black box 2, the test is carried out in the inner black box 2, there are openings on both sides of the inner black box 2, grilles are placed at the openings to make the openings in a grille shape, and this shape is used to simulate the actual situation of sunlight shining into the tunnel; two LED lamps 3 can be set with different light intensities, and are respectively placed at the openings on both sides of the inner black box 2 to irradiate light into the inner black box 2. By changing the light intensity of the LED lamps, the sunlight at different time periods in reality is simulated, thereby simulating the natural ambient light at different time periods in the subway tunnel.

[0049] Through the above method, the simulation of natural ambient light in different time periods in the subway tunnel can be realized. Since the images of the subway contact rail are collected directly in the tunnel environment, the samples obtained are relatively single, and it is impossible to obtain comprehensive actual images containing various situations. Therefore, the simulation method is beneficial to obtain images under various light sources. The images obtained by the above method are conducive to training models and obtaining accurate detection results. The simulation of natural ambient light in different time periods in the subway tunnel can be realized. Since the images of the subway contact rail are collected directly in the tunnel environment, the samples obtained are relatively single, and it is impossible to obtain comprehensive actual images containing various situations. Therefore, the simulation method is beneficial to obtain images under various light sources. The images obtained by the above method are conducive to training models and obtaining accurate detection results.

[0050] The PC terminal 4 is an industrial computer connected to the CCD camera 5, which can receive and process the contact rail surface defect image, has the characteristics of strong reliability, real-time performance, and expandability, and has strong input and output functions. It can perform real-time online monitoring and control in vibration, high / low temperature and other environments, and collect and process in a timely manner;

[0051] After receiving the image, the industrial computer processes it and then divides it into a training set and a test set. The industrial computer is also equipped with a subway contact rail surface defect detection model, and the model is first trained using the training set.

[0052] The CCD camera 5 is an industrial CCD array camera with high resolution and capable of capturing high-quality images; the camera bracket 6 is used to fix the CCD camera 5; the two strip light sources 7, the annular light source 8, and the dome light source 9 are all LED lights, which can be driven by the light source controller 11 and set with different light intensities; the light source bracket 10 is used to fix the two strip light sources 7, the annular light source 8, and the dome light source 9, and there is a lock in the middle, which can fix the light source bracket 10 on the camera bracket 6, and the light source bracket 10 can be moved up and down on the camera bracket 6 by adjusting the lock, that is, the distance between the two strip light sources 7, the annular light source 8, the dome light source 9 and the inspected part 14 can be changed.

[0053] Through the above method, the lighting conditions at different distances can be obtained. By analyzing, the influence of the distance between the light source and the inspected parts on the acquisition of subway contact rail images and the identification of surface defects can be obtained, and the appropriate distance for image acquisition can be found.

[0054] The red, blue and green color filters can be used to change the color of the light source. By attaching the red, blue and green color filters to the front ends of the two strip light sources 7, the ring light source 8 and the dome light source 9, red light, blue light and green light can be obtained.

[0055] Considering that the material of the filter will absorb the wavelengths of other colors of light, that is, the filter will filter out other colors of light emitted by the light source and only allow red light, blue light or green light to pass, thereby changing the color of the light source; the choice of light source color has an important impact on the acquisition and processing of contact rail images. Selecting the appropriate light source color according to the color of the object being detected and the background color can improve the acquisition quality, contrast and recognition accuracy of the contact rail image.

[0056] The polarizer 12 is a linear polarizer, which can be placed between the annular light source 8, the dome light source 9 and the inspected part 14, and the optional range of polarization angles is 0°, 45°, 90° and 135°; the stage 13 is used to place the inspected part 14, which is a highly reflective subway contact rail.

[0057] Linear polarizers can selectively block light waves in a certain direction. By aligning the polarization direction of the linear polarizer with the polarization direction of the reflected light, the intensity of the reflected light can be effectively reduced, thereby reducing its impact on image acquisition; by rotating the linear polarizer and changing the polarization angle, the impact of the high reflectivity of the contact rail surface on the contact rail image acquisition can be reduced or eliminated.

[0058] In one implementation example, when using a strip light source, turn on the LED lights at the openings on both sides of the inner black box to simulate the natural ambient light in a subway tunnel, and rotate the light source bracket so that the two strip light sources are located directly above the stage, wherein the angle between the strip light source and the contact rail of the inspected part can be adjusted in the range of 0-90°.

[0059] Fix the intensity of the light source, the distance between the light source and the inspected part, adjust the angle to 0, 30°, 45°, 60°, and 90°, and receive the contact rail images collected under different angles on the PC through the CCD camera;

[0060] Fix the angle and light source intensity, adjust the light source bracket to change the distance between the strip light source and the inspected part, the range is 0-30cm, and collect the contact rail images respectively;

[0061] The angle and the distance between the light source and the inspected part are fixed, the light source intensity is adjusted by the light source controller, and the contact rail images under different light source intensities are collected respectively;

[0062] Fix the angle, light source intensity, and distance between the light source and the inspected part, attach red, green, and blue filters to the front end of the light source to obtain three colors of light, use red light, blue light, and green light to illuminate the inspected part respectively, and collect the contact rail image.

[0063] By comparing the contact rail surface defect recognition accuracy under different conditions through subsequent image processing and surface defect recognition under a strip light source, it can be determined under what conditions the light intensity distribution on the contact rail surface is more uniform and more suitable for contact rail image acquisition.

[0064] In an implementation example, when a ring light source is used, the light source bracket is rotated so that the ring light source is located directly above the stage, the light source intensity and the distance between the light source and the inspected part are fixed, and the angle of the linear polarizer is changed, and the optional angles are 0°, 45°, 90° and 135°, and the contact rail images are collected respectively;

[0065] Fix the light source intensity and the angle of the linear polarizer, adjust the light source bracket to change the distance between the annular light source and the inspected part, ranging from 0-30cm, and collect the contact rail images respectively;

[0066] Fix the angle of the linear polarizer and the distance between the light source and the inspected part, adjust the light source intensity through the light source controller, and collect contact rail images under different light source intensities;

[0067] Fix the intensity of the light source, the angle of the linear polarizer, and the distance between the light source and the inspected part. Stick the red, green, and blue filters to the front end of the light source to obtain three colors of light. Use red light, blue light, and green light to illuminate the inspected part respectively, and collect the contact rail image.

[0068] In one implementation example, when a dome light source is used, the light source bracket is rotated so that the dome light source is located directly above the stage, the light source intensity and the distance between the light source and the inspected part are fixed, and the angle of the linear polarizer is changed, with the optional range being 0°, 45°, 90° and 135°, to collect contact rail images respectively;

[0069] Fix the light source intensity and the angle of the linear polarizer, adjust the light source bracket to change the distance between the dome light source and the inspected part, ranging from 0-30cm, and collect the contact rail images respectively;

[0070] Fix the angle of the linear polarizer and the distance between the light source and the inspected part, adjust the light source intensity through the light source controller, and collect contact rail images under different light source intensities;

[0071] Fix the intensity of the light source, the angle of the linear polarizer, and the distance between the light source and the inspected part. Stick the red, green, and blue filters to the front end of the light source to obtain three colors of light. Use red light, blue light, and green light to illuminate the inspected part respectively, and collect the contact rail image.

[0072] The technical solution of the present invention simulates the natural environment in the subway tunnel to control the light source to produce different light intensities; then collects the contact rail images under different light source conditions, analyzes the influence of different light source conditions on the image recognition quality of the subway contact rail surface defects, and eliminates the influence of the high reflectivity of the contact rail surface on image acquisition and contact rail surface defect recognition. By optimizing the light source parameters and detecting the surface defects of the subway contact rail, it can solve the technical problems of low recognition accuracy and low efficiency when detecting surface defects on the contact rail, and provide reliable technical support for the maintenance of subway line systems and power supply systems.

[0073] The contact rail images under different light source conditions can be collected in the above method. After being processed by the PC, the following high-reflective subway contact rail surface defect detection method is used to compare the subway contact rail surface defect recognition accuracy under different light source conditions, and analyze the impact of different light source conditions on the recognition quality of subway contact rail surface defect images. During optimization, the subway contact rail surface defect recognition accuracy under different light source parameters is statistically analyzed to determine the best light source shape, light intensity range, distance between the light source and the inspected parts, light source color and other parameters. By optimizing the light source parameters, the accuracy and efficiency of subway contact rail surface defect detection can be improved.

[0074] Embodiment 2

[0075] The purpose of this embodiment is to provide a method for detecting surface defects of a highly reflective subway contact rail, which is as follows:

[0076] Based on the above-mentioned high-reflective subway contact rail surface defect detection test system, images to be detected of contact rail surface defects are collected; the images to be detected are respectively input into the corresponding trained subway contact rail surface defect detection model for detection, and the surface defect detection results of the subway contact rail are obtained.

[0077] Among them, the subway contact rail surface defect detection model adopts the improved YOLOv5s network and is trained by transfer learning; the improved YOLOv5s network refers to replacing the backbone network of YOLOv5s with the ResNet-50 residual network. Using it as the backbone network can make the subway contact rail surface defect detection model easier to transfer learning, and add the CBAM attention mechanism in the last layer of the backbone network.

[0078] Preprocess the data and divide the data set into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the final performance of the model. Process the input image, adjust the image to a fixed size, normalize the pixel values, and then perform data enhancement, such as random cropping, rotation, flipping, etc., to increase the diversity of training data and improve the robustness of the model;

[0079] Network input: The preprocessed images are used as network input, and the input image size is fixed. Images are input to the network in batches so that the GPU can be used to accelerate the training process;

[0080] Network processing includes forward propagation and output prediction. Forward propagation is performed in the network. YOLOv5s uses a convolutional neural network to extract features and processes them through a series of convolutional layers, activation functions, and pooling operations; the input is multiple bounding boxes and their corresponding confidence and category probability distributions;

[0081] Output the final inspection results, including the category and location of each detected surface defect. These results are annotated on the original image in the form of images;

[0082] Subsequent processing: Analyze the test results, evaluate the performance of the model, fine-tune the model, and compile statistics and reports on the test results.

[0083] The subway contact rail surface defect detection model of this application uses the ResNet-50 residual network to replace the backbone network of YOLOv5s. Using it as the backbone network can make the subway contact rail surface defect detection model easier to transfer learning, and add the CBAM attention mechanism to the last layer of the backbone network. In addition, the loss function of the original YOLOv5s network is CIoULoss, while the model of this application uses the EIoULoss function as the regression loss function of the improved model, which effectively improves the detection model's precise positioning of small targets, while also improving the convergence of the model, accelerating the convergence of the model, and achieving high-precision detection of subway contact rail surface defects.

[0084] In this embodiment, a YOLOv5s model is constructed. In order to improve the accuracy of subway contact rail surface defect detection, the YOLOv5 model is improved by integrating transfer learning, replacing the backbone network of YOLOv5s, attention mechanism, and loss function optimization. Considering that the surface defect area of ​​subway contact rails accounts for a small proportion and the data samples are small, it is difficult to effectively train them using traditional machine learning target detection methods. Therefore, the present invention adopts a method combining data enhancement and transfer learning to train the YOLOv5s contact rail surface defect detection model.

[0085] In terms of subway contact rail surface defect detection model training, this example uses the Mosaic data enhancement method to improve the performance of the model under different defect types and scenarios. The training data set is processed by methods such as magnification, reduction, cropping, and rotation to obtain more feature samples, thereby achieving the purpose of increasing training samples. The feature migration method is used to extract edge, texture and other features from the existing subway contact rail surface defect detection and classification tasks, and then the extracted features are used in the subway contact rail surface defect detection model, so that the model can learn more features about contact rail surface defects.

[0086] In view of the current situation that the detection of contact rail surface defects has insufficient ability to extract detection targets, the sub-technical solution of this embodiment replaces the backbone network of YOLOv5s with a 3-layer ResNet-50 network, which can effectively capture complex image features, while reducing the number of model parameters and improving the training stability of the model; in order to solve the problem of low detection accuracy of the YOLOv5s model in detecting subway contact rail surface defects when dealing with complex scenes and overlapping targets, the CBAM attention mechanism is added to the last layer of the backbone network. The introduction of the convolutional attention block CBAM can help the model automatically learn the most suitable channels and spaces, optimize the network structure, and extract richer target features; the loss function of the original YOLOv5s network is CIoULoss, which only considers the difference in aspect ratio within the bounding box, without considering the actual difference between width and height and its confidence, and when the aspect ratio of the predicted box changes proportionally, the aspect ratio penalty of CIoULoss loses its effectiveness, which makes it somewhat difficult to accurately locate and identify small targets.

[0087] To solve the above problems, the EIoULoss function is used as the regression loss function of the improved model. The EIoULoss function consists of three parts: overlap loss, center distance loss, and width and height loss. The first two parts retain the advantages of the CIoU method, while the width and height loss divides the aspect ratio loss into the difference between the predicted width and height and the minimum width and height of the enclosing box. EIoULoss effectively improves the detection model's precise positioning of small targets, while also improving the convergence of the model, accelerating model convergence, and achieving high-precision detection of surface defects on subway contact rails.

[0088] During the training stage, the marked sample data of contact rail surface defects such as cracks, rust, and wear are input into the optimized YOLOv5s deep neural network, and the optimized YOLOv5s deep neural network is iteratively trained to obtain the trained subway contact rail surface defect detection model. The preliminary obtained detection model is pruned to reduce the parameters and structure of the deep learning model, that is, automatic machine learning is used to evaluate the parameters, find redundant parameters, delete some redundant parameters based on the evaluation results, and retrain the model to improve the efficiency and performance of the model. The fine-tuned model is then evaluated for the second time to determine whether the pruned model is suitable for deployment to improve the efficiency and performance of the model.

[0089] In the training phase, the labeled sample data of contact rail surface defects such as cracks, rust, and wear are input as training sets for model learning. The training sets input in the training phase contain data of various disease scenarios. Finally, a perfect subway contact rail surface defect detection model is obtained, which can gradually adapt to various disease scenarios, and the model outputs high accuracy of recognition results, and can correctly judge each damage classification and accurately draw the damage location.

[0090] In the target detection stage, the trained detection model is applied to the test data set, which is the image collected by the high-reflective subway contact rail surface defect detection test system. By inputting the image to be detected, the system can detect and classify the target object in the image and output the classification result of the contact rail surface defect.

[0091] The classification result of this embodiment example is the type of contact rail surface defects present in the image to be detected, such as cracks, rust, wear, etc.; the classification result is output by the trained detection model.

[0092] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A highly reflective subway contact rail surface defect detection system, characterized in that: include: A subway tunnel simulation unit and a light intensity generating unit, an image acquisition unit and an image processing unit arranged in the subway tunnel simulation unit; The subway tunnel simulation unit is used to simulate the natural ambient light in the subway tunnel at different time periods; The light intensity generating unit is used to control the light source to generate different light intensities; The image acquisition unit is used to acquire contact rail images under different light source conditions and transmit them to the image processing unit; The image processing unit is used to analyze the influence of different light source conditions on the recognition quality of the image taken of the subway contact rail surface defects, and detect the subway contact rail surface defects by optimizing the light source parameters.

2. A highly reflective subway contact rail surface defect detection system as claimed in claim 1, characterized in that: The subway tunnel simulation unit includes two black boxes surrounded by inner and outer boxes. There are openings on both sides of the inner black box, and grilles are placed at the openings to make the openings grid-shaped; two LED lights can be set with different light intensities and are placed at the openings on both sides of the inner black box respectively to irradiate light into the inner black box, thereby simulating the natural ambient light in the subway tunnel at different time periods.

3. A highly reflective subway contact rail surface defect detection system as claimed in claim 1, characterized in that: The illumination intensity generating unit comprises: a strip light source, a ring light source and a dome light source, and the above light sources are all connected to a light source controller; The above light sources are all fixed on a light source bracket, and the distance between the strip light source, annular light source, dome light source and the highly reflective subway contact rail to be detected can be changed by adjusting the position of the light source bracket.

4. A highly reflective subway contact rail surface defect detection system as claimed in claim 1, characterized in that: The light intensity generating unit further comprises: a red, blue and green tricolor filter. The red, blue and green tricolor filter is attached to the front end of the strip light source, the ring light source and the dome light source to obtain red light, blue light and green light.

5. A highly reflective subway contact rail surface defect detection system as claimed in claim 1, characterized in that: The light intensity generating unit further comprises: a polarizing plate, which is a linear polarizing plate and can be placed between the annular light source, the dome light source and the highly reflective subway contact rail to be detected.

6. A method for detecting surface defects of a highly reflective subway contact rail, characterized in that: include: Simulate the natural ambient light in subway tunnels at different times; Control the light source to produce different light intensities; Collect contact rail images under different light sources and natural ambient light conditions in subway tunnels at different times; The contact rail images collected under different light source conditions are input into the subway contact rail surface defect detection model for training, so as to obtain a trained subway contact rail surface defect detection model; The surface image of the subway contact rail to be inspected is input into the corresponding trained subway contact rail surface defect detection model for detection to obtain the surface defect detection result of the subway contact rail.

7. A method for detecting surface defects of a highly reflective subway contact rail as claimed in claim 6, characterized in that: When collecting contact rail images under different light source conditions, the strip light source, the ring light source or the dome light source is placed above the subway contact rail to be inspected; Fix the intensity of the light source, the distance between the light source and the inspected part, adjust the angle between the strip light source and the contact rail of the inspected part, and collect images of the contact rail under different angles; Fix the angle and light source intensity, adjust the light source bracket to change the distance between the strip light source and the inspected part, and collect contact rail images under different distance conditions; Fix the angle and the distance between the light source and the inspected part, adjust the light source intensity through the light source controller, and collect the contact rail images under different light source intensities; Fix the angle, light source intensity, and distance between the light source and the inspected part, attach red, green, and blue filters to the front end of the light source to obtain three colors of light, use red light, blue light, and green light to illuminate the inspected part respectively, and collect images of the contact rail under different lights.

8. A method for detecting surface defects of a highly reflective subway contact rail as claimed in claim 6, characterized in that: The subway contact rail surface defect detection model adopts an improved YOLOv5s network and is trained by transfer learning; The improved YOLOv5s network refers to replacing the backbone network of YOLOv5s with the ResNet-50 residual network. Using it as the backbone network can make the subway contact rail surface defect detection model easier to perform transfer learning, and adding the CBAM attention mechanism to the last layer of the backbone network.

9. A method for detecting surface defects of a highly reflective subway contact rail as claimed in claim 6, characterized in that: After collecting images of the contact rail under different light sources, a training data set was constructed and processed by zooming in, zooming out, cropping, and rotating to obtain more feature samples. A feature transfer method is adopted to extract edge and texture features from existing subway contact rail surface defect detection and classification tasks, and then the extracted features are used in the subway contact rail surface defect detection model.

10. A method for detecting surface defects of a highly reflective subway contact rail as claimed in claim 6, characterized in that: The EIoULoss function is used as the regression loss function of the improved YOLOv5s network. The EIoULoss function consists of three parts: overlap loss, center distance loss, and width and height loss.