A method, device and equipment for training a train component recognition model
Through simulation simulation devices and improved YOLOv5 neural network training train parts recognition models, the lack of intelligence in train bottom parts detection is solved, automation and efficient component recognition is achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202310843774.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-07-11
AI Technical Summary
In the prior art, the detection of train under-car parts lacks intelligent means, which leads to manual inspection taking a long time, high working intensity and easy to miss inspection, and it is difficult to conduct inspection during the train's window period.
By building a simulation device, train parts images are obtained and data sets are constructed, train parts recognition models are trained using the improved YOLOv5 neural network, and automatic recognition and detection are carried out in combination with deep learning technology.
It realizes automated and fast identification of train parts, solves the problems of time-consuming and high working intensity of traditional manual inspections, and improves detection efficiency and accuracy.
Smart Images

Figure CN116883782B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of object detection, and particularly relates to a method, device and equipment for training a train component recognition model. Background Art
[0002] Railway transportation is an efficient, safe, environmentally friendly and economical mode of transportation, with characteristics such as high carrying capacity, fixed routes, large-area connectivity and adaptability to various climate conditions. With the accelerating construction of high-speed railways, the continuous increase in the number of trains and the improvement of infrastructure levels, greater challenges have been posed to the train safety maintenance work. Train safety maintenance work is an important link to ensure the smooth and stable operation of trains during operation. Safety maintenance work can effectively monitor the integrity of the vehicle system, help avoid failures caused by equipment aging and wear, and thus ensure the stable and safe operation of trains.
[0003] As an important support structure of the train, the quality and safety of the underbody are directly related to the stability and safety of train operation. Due to long operation time, high mileage and complex environmental conditions, various components of the train underbody frequently suffer from failures such as wear, detachment, deformation and fracture, which directly threaten the safety and reliability of the train. Regular maintenance of the train underbody can detect and eliminate potential fault hazards and ensure the normal operation of the underbody part.
[0004] Through actual research, it is found that there is no mature intelligent maintenance device for train underbody detection at present. This is due to problems such as difficult acquisition of relevant data. As a result, the current safety maintenance work of train underbody mainly relies on manual detection, and the inspection of train underbody components is completed one by one through visual inspection or probes. This process is extremely time-consuming, with a large work intensity, and is extremely prone to missed inspection problems. Moreover, this maintenance method requires the train to run to a designated location for inspection, with great limitations, and it is very difficult to conduct inspections during the train operation idle period. Summary of the Invention
[0005] Embodiments of the present invention provide a method, device and equipment for training a train component recognition model, aiming to solve at least one technical problem in the background art.
[0006] Embodiments of the present invention are implemented as follows. A method for training a train component recognition model is applied to a train component recognition model training device. The train component recognition model training device includes a simulation device, and the simulation device includes a display device for presenting a pattern of the train bottom, a clamping device disposed above the display device and used for fixing train components, and a camera device disposed above the clamping device. The method includes:
[0007] Obtain the train component image captured by the imaging device, where the train component image is an image of the train component with the train bottom pattern as the background;
[0008] Annotate the train components in the train component image to construct a dataset for training the train component recognition model;
[0009] Train a preset neural network with the dataset, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, thereby training the train component recognition model.
[0010] Further, the steps of obtaining the train component image captured by the imaging device include:
[0011] Place the train component in different states, control the clamping device to drive the train component in different poses and / or control the imaging device to move to different positions;
[0012] Under the condition that the train component is in different states, the train component is in different poses and / or the imaging device is in different positions, respectively control the imaging device to capture the train component image
[0013] Further, the train components include fasteners, and the states include a tightened state and a loose state.
[0014] Further, the clamping device includes a clamping member for clamping the train component and a driving component for driving the clamping member to rotate.
[0015] Further, the imaging device is disposed on a circular electric guide rail, and the imaging device can move along the circular electric guide rail.
[0016] Further, a plurality of position sensors are uniformly arranged on the circular electric guide rail. When the imaging device moves to any one of the position sensors, control the imaging device to stop moving until it captures the train component image at the current position.
[0017] Further, the preset neural network is an improved YOLOv5 neural network, and the improved YOLOv5 neural network includes a CSPDarknet feature extraction module, an FPN feature fusion module, and a Yolo Head module;
[0018] Among them, the steps of training the preset neural network with the dataset and calculating the loss function of the preset neural network include:
[0019] Input the training images in the dataset into the CSPDarknet feature extraction module for feature extraction to obtain effective feature layers;
[0020] Input the effective feature layers into the FPN feature fusion module for feature fusion to obtain the fused effective feature layers;
[0021] Input the fused effective feature layers into the Yolo Head module for output to obtain the predicted train component recognition information;
[0022] Calculate the loss between the predicted train component recognition information and the labeled train component recognition information using a preset loss function.
[0023] Furthermore, the preset loss function Loss is:
[0024] Loss = a * L class + b * L local + c * L conf
[0025] In the formula, L class , L local and L conf are the classification loss function, the localization loss function and the confidence loss function respectively, and a, b and c are the weight coefficients of the classification loss function, the localization loss function and the confidence loss function respectively.
[0026] The embodiment of the present invention also provides a train component recognition model training device, which is applied to a train component recognition model training device. The train component recognition model training device includes a simulation device. The simulation device includes a display device for presenting the pattern of the train bottom, a clamping device arranged above the display device and used for fixing train components, and a camera device arranged above the clamping device. The train component recognition model training device includes:
[0027] An image acquisition module, configured to acquire the train component images captured by the camera device. The train component images are the images of the train components with the pattern of the train bottom as the background;
[0028] An image annotation module, configured to annotate the train components in the train component images to construct a dataset for training the train component recognition model;
[0029] A model training module, configured to train a preset neural network through the dataset, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, so as to train and obtain the train component recognition model.
[0030] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the train component recognition model training method as described above.
[0031] An embodiment of the present invention also provides a train component recognition model training device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. It also includes a simulation device, and the simulation device includes a display device for presenting the pattern of the train bottom, a clamping device arranged above the display device and used for fixing train components, and a camera device arranged above the clamping device. When the processor executes the program, it implements the train component recognition model training method as described above.
[0032] The beneficial effects achieved by the present invention are as follows: By building a simulation device, a large number of train component images can be obtained, solving problems such as difficult acquisition of traditional relevant data. Then, combined with a deep learning neural network, a train component recognition model capable of automatically identifying and detecting train components can be trained, thus solving the technical problems of time-consuming traditional manual inspection, high work intensity, and many restrictions and requirements. Description of the Drawings
[0033] Figure 1 is a structural diagram of the simulation device provided in the embodiment of the present invention;
[0034] Figure 2 is provided in the embodiment of the present invention
[0035] Figure 3 is a flowchart of the train component recognition model training method in Embodiment 1 of the present invention;
[0036] Figure 4 is a schematic diagram of the Focus network structure provided in Embodiment 2 of the present invention;
[0037] Figure 5 is a structural block diagram of the train component recognition model training device in Embodiment 3 of the present invention;
[0038] Figure 6 is a structural block diagram of the train component recognition model training device in Embodiment 4 of the present invention. Detailed Embodiments
[0039] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] The following embodiments can all adopt Figure 1 - Figure 2 the simulation device shown to obtain images of train components, Figure 1 - Figure 2 the simulation device shown can also be called a simulation test bench for complex backgrounds under the train body. It mainly includes a bracket 100, a display device 200 fixed at the bottom of the bracket 100 and used to present the pattern of the train bottom, a clamping device 300 arranged above the display device 200 and used to fix train components, and a camera device 400 arranged above the clamping device 300. The camera device 400 can image the train components clamped by the clamping device 300 under the background of the train bottom pattern displayed by the display device 200, so as to obtain images of train components by means of simulation.
[0041] Specifically, the clamping device 300 includes a clamp 301, a support arm 302 rotatably connected to the clamp 301, a clamping member 303 rotatably connected to the support arm 302 for clamping train components, and a driving assembly for driving the clamping member 303 to rotate. The driving assembly is specifically fixed on the support arm 302 and connected to the clamping member 303. Specifically, the clamp 301 is detachably fixed to the bracket 100 through fasteners such as bolts, so that the clamp 301 can be adjusted up and down relative to the bracket 100. The support arm 302 and the clamp 301 are specifically connected by riveting, so that the support arm 302, the driving assembly and the clamping member 303 can be turned away when needed, which is convenient for operation and can also adjust the position of the train components clamped by the clamping member 303. The driving assembly specifically includes a motor 304 fixed on the support arm 302, a first gear 305 fixedly connected to the output shaft of the motor 304, and a second gear 306 meshing with the first gear 305. The second gear 306 is fixedly connected to the clamping member 303, so as to drive the train components clamped by the clamping member 303 to rotate and adjust the posture. The clamping member 303 can specifically be a clamping cylinder, an elastic clamping arm, etc. Specifically, the simulation device specifically includes two clamping devices 300 arranged on both sides of the bracket. Preferably, one of the two clamping devices 300 is not provided with a driving assembly. Since the height of the clamping device 300 is adjustable, when the train components are clamped at both ends by the two clamping devices 300, the train components can be in different inclined states. Therefore, through the special design of the clamping device 300 and the driving assembly can drive the clamping member 303 to adjust the position and posture, so that the train components are in different positions and postures, to provide the diversity of the train component images and improve the reliability of model training. At the same time, the imaging device 400 is arranged on the circular electric guide rail 500. The circular electric guide rail 500 is fixed at the top of the bracket 100. The imaging device 400 can move along the circular electric guide rail 500, so as to adjust different shooting angles, to provide the diversity of the train component images and also improve the reliability of model training. Specifically, the structure and principle of the circular electric guide rail 500 are the same as those of the electric guide rail of a traditional electric curtain and will not be described in detail here. Preferably, a number of position sensors 501 are evenly arranged on the circular electric guide rail 500. When the imaging device moves to any position sensor 501, the imaging device is controlled to stop moving until it finishes shooting the train component images at the current position, that is, by arranging position sensors 501 at different positions to perform in-place detection on the imaging device, so as to control the imaging device to shoot at multiple fixed positions. The position sensor 501 can be, for example, a proximity switch, an infrared sensor, etc.
[0042] It should be noted that Figure 1 - Figure 2The structures shown do not constitute a limitation on the analog simulation device. In other embodiments, the analog simulation device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0043] Example 1
[0044] Please refer to Figure 3 , which shows the method for training the train component recognition model in the first embodiment of the present invention, applied to a train component recognition model training device. The train component recognition model training device includes the above-mentioned analog simulation device. The method for training the train component recognition model can be specifically implemented by software and / or hardware. The method specifically includes steps S01 - S03.
[0045] Step S01: Obtain the train component image captured by the imaging device. The train component image is an image of the train component with the train bottom pattern as the background.
[0046] In specific implementation, different content or train bottom pictures in different environments can be played through a display device to simulate the complex background of the train bottom. Then, the train component is clamped on the clamping device, and the imaging device is started to take pictures, so as to obtain the train component image.
[0047] In a preferred embodiment, the step of obtaining the train component image captured by the imaging device may specifically include:
[0048] Put the train component in different states, control the clamping device to drive the train component in different poses and / or control the imaging device to move to different positions;
[0049] Under the condition that the train component is in different states, the train component is in different poses and / or the imaging device is in different positions, respectively control the imaging device to capture the train component image.
[0050] It should be noted that since the detection of the train bottom mainly includes detecting the state of fasteners such as bolts, that is, detecting whether there is a slack phenomenon in the fasteners. If so, maintenance is required. Therefore, in this embodiment, the train components mainly include fasteners, and the state includes the tightened state and the slack state. The tightened state specifically refers to the state where the fastener is locked and has no looseness, and the slack state specifically refers to the state where the fastener is not locked and is loose.
[0051] That is, in specific implementation, the fastener can be first placed in a tightened state and clamped on the clamping device, and the clamping device can place the fastener in one of the preset poses (specifically simulating different poses of the fastener at the bottom of the train). Then, the display device is controlled to play one of the train bottom pictures, and then the imaging device is moved along the circular electric guide rail to capture images of the train parts in the current state at different shooting positions. After the shooting is completed, the display device is controlled to switch to the next train bottom picture, and then the imaging device is moved along the circular electric guide rail to take pictures again until all the pre-stored train bottom pictures are completely taken. Then, the clamping device places the fastener in another preset pose, and the above shooting process is repeated until all the preset poses are completed. Then, the fastener is loosened and the above steps are repeated, so as to capture a large number of images of train parts in different states, different poses, different backgrounds and different shooting angles, thus providing sufficient, diverse and positive and negative sample training images for subsequent model training and improving the reliability of model training. In some other optional embodiments, the relaxation state can be further refined, for example, it can be refined into relaxation states with different relaxation degrees, so that the trained model can not only identify whether the fastener is loose, but also identify the degree of relaxation.
[0052] Step S02: Label the train parts in the train part images to construct a data set for training the train part recognition model.
[0053] In specific implementation, all the pictures can be labeled in the labelimg software. Since the accuracy of the deep learning algorithm is closely related to the data set, in order to improve the generalization ability and robustness of the algorithm model, data augmentation is performed on the collected data set samples. In data augmentation, horizontal and vertical random flipping, equal ratio and unequal ratio random scaling and random contrast means are used to simulate the diversity and complexity in the real scene, which can effectively solve the problem of data imbalance.
[0054] Step S03: Train a preset neural network with the data set, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, so as to train and obtain the train part recognition model.
[0055] In summary, the train part recognition model training method in this embodiment solves the problems such as difficult acquisition of traditional relevant data by building a simulation device capable of simulating, and then combines with the deep learning neural network to train and obtain a train part recognition model that can automatically identify and detect train parts, thus solving the technical problems of time-consuming traditional manual inspection, large work intensity, many restrictions and high requirements.
[0056] Example 2
[0057] Embodiment 2 of the present invention also proposes a method for training a train component recognition model. The difference between the train component recognition model training method in this embodiment and the train component recognition model training method in the first embodiment is as follows:
[0058] The preset neural network is an improved YOLOv5 neural network, and the improved YOLOv5 neural network includes a CSPDarknet feature extraction module, an FPN feature fusion module, and a Yolo Head module;
[0059] Among them, the steps of training the preset neural network with the dataset and calculating the loss function of the preset neural network include:
[0060] Input the training images in the dataset into the CSPDarknet feature extraction module for feature extraction to obtain effective feature layers;
[0061] Input the effective feature layers into the FPN feature fusion module for feature fusion to obtain the fused effective feature layers;
[0062] Input the fused effective feature layers into the Yolo Head module for output to obtain the predicted train component recognition information;
[0063] Use a preset loss function to calculate the loss between the predicted train component recognition information and the labeled train component recognition information.
[0064] It should be noted that the traditional YOLOv5 neural network uses Backbone as the main feature extraction network, while in the improved YOLOv5 neural network provided in this embodiment, CSPDarknet is used as the main feature extraction network. In CSPDarknet, the input image will be subjected to feature extraction to obtain feature layers. A total of three effective feature layers are obtained in the main part, and the three effective feature layers contain the key information required for object detection and are used for subsequent object detection tasks. At the same time, the SPP structure and the Focus network structure are included in CSPDarknet, that is, the main feature extraction network of the improved YOLOv5 uses the Residual network. The entire main part of the improved YOLOv5 is composed of residual convolutions. At the same time, the Focus network structure is used in the main feature extraction network (such as Figure 4As shown in the figure, the feature extraction network of the Focus network structure consists of a series of convolutional layers and pooling layers, where the last layer is the Focus convolutional layer. The input of this convolutional layer is the feature map, and the output is four independent feature layers, each corresponding to four different regions of the original image. Stack these four independent feature layers, so that the width and height information is integrated into the channel information. This method quadruples the input channels, improving the receptive field and feature expression ability of the model.
[0065] Specifically, the improved YOLOV5 extracts multiple feature layers for object detection, and a total of three feature layers are extracted. The three feature layers are located in the middle layer, the middle and lower layer, and the bottom layer of the backbone part CSPdarknet respectively. When the input is (640, 640, 3), the shapes on the three feature layers are respectively:
[0066] feat1 = (80, 80, 250);
[0067] feat2 = (40, 40, 512);
[0068] feat3 = (20, 20, 1024);
[0069] FPN is a convolutional neural network structure used for object detection and semantic segmentation, regarded as an enhanced feature extraction network in the algorithm. The three effective feature layers obtained in the backbone part will be sampled to high levels in the feature fusion network of FPN and fused with the high-level feature maps. The feature pyramid of FPN can be used to generate segmentation results at different scales and fuse them to obtain the final segmentation result.
[0070] YOLO Head is the classifier and regressor of YOLOV5. YOLO Head uses the features extracted in CSPDarknet and FPN to classify and regress each prediction box. The classifier assigns the target object in each prediction box to the correct category, and the regressor uses a linear function to predict the center position and width and height of each box.
[0071] Specifically, the preset loss function Loss is:
[0072] Loss = a * L class + b * L local + c * L conf
[0073] In the formula, L class , L local and L conf are the classification loss function, the localization loss function, and the confidence loss function respectively, and a, b, and c are the weight coefficients of the classification loss function, the localization loss function, and the confidence loss function respectively.
[0074] That is, the improved YOLOv5 in this embodiment includes the following three loss functions: classification loss, localization loss, and confidence loss. The overall loss is the weighted sum of the above three.
[0075] Among them, the classification loss function L class is
[0076]
[0077] Among them,
[0078] In the above formula, N represents the total number of categories, y i represents the probability of the current category obtained after the result activation function, and xi represents the predicted value of the current category, represents the true value of the current category.
[0079] In addition, in traditional localization loss, the squared loss is usually used to determine the localization loss L local , that is:
[0080] L local =(x - x * ) 2 +(y - y * ) 2 -(w - w * ) 2 +(h - h * ) 2 , where x and y are the coordinates of the upper left corner of the predicted bounding box, w and h are the width and height of the predicted bounding box, x * and y * are the coordinates of the upper left corner of the labeled true bounding box, w * and h * are the width and height of the labeled true bounding box;
[0081] However, it is found in actual research that there are certain problems with this method. When using the squared loss, it is unable to measure the ratio of the overlapping area between the bounding box and the true bounding box to the area of the union of the two well. Therefore, to solve this problem, this embodiment specifically uses CIoU loss to determine the localization loss L local , that is, the localization loss L local in this embodiment is specifically:
[0082]
[0083]
[0084]
[0085] Among them, B and B gt are the predicted bounding box and the ground truth bounding box respectively. IoU(B, B gt ) represents the ratio of the intersection to the union of the predicted bounding box and the ground truth bounding box. v is the normalization of the difference in the aspect ratio between the predicted bounding box and the ground truth bounding box. The value of part is between 0 and π / 4. After multiplying by 4 / π, it can be converted to between 0 and 1. And α is the balance factor for weighing the loss caused by the aspect ratio and the loss caused by the IoU part.
[0086] Among them, the confidence loss function is specifically:
[0087]
[0088] In the formula, n is the batch size, s is the grid size, represents the prediction of whether the j-th bounding box in the i-th image contains the target by the model, represents the ground truth label. If the target is included at this position, then otherwise it is 0. When there is no target at this position, use to represent.
[0089] Example 3
[0090] On the other hand, the present invention also proposes a training device for a train component recognition model. Please refer to Figure 5 , which shows the training device for the train component recognition model provided in the third embodiment of the present invention. It is applied to the train component recognition model training equipment. The train component recognition model training equipment includes a simulation device. The simulation device includes a display device for presenting the pattern of the train bottom, a clamping device arranged above the display device and used for fixing train components, and a camera device arranged above the clamping device. The train component recognition model training device includes:
[0091] An image acquisition module 11, configured to acquire the train component image captured by the camera device. The train component image is an image of the train component with the train bottom pattern as the background;
[0092] An image annotation module 12, configured to annotate the train components in the train component image and construct a data set for training the train component recognition model;
[0093] The model training module 13 is used to train a preset neural network through the dataset, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, so as to train and obtain the train component recognition model.
[0094] Further, in some alternative embodiments of the present invention, the image acquisition module 11 is further configured to place the train components in different states, control the clamping device to drive the train components in different poses, and / or control the imaging device to move to different positions; when the train components are in different states, the train components are in different poses, and / or the imaging device is in different positions, the imaging device is respectively controlled to capture images of the train components.
[0095] Further, in some alternative embodiments of the present invention, the train components include fasteners, and the states include a tightened state and a loose state.
[0096] Further, in some alternative embodiments of the present invention, the clamping device includes a clamping member for clamping the train components and a driving assembly for driving the clamping member to rotate.
[0097] Further, in some alternative embodiments of the present invention, the imaging device is arranged on a circular electric guide rail, and the imaging device can move along the circular electric guide rail.
[0098] Further, in some alternative embodiments of the present invention, a plurality of position sensors are evenly arranged on the circular electric guide rail. When the imaging device moves to any one of the position sensors, the imaging device is controlled to stop moving until it captures images of the train components at the current position.
[0099] Further, in some alternative embodiments of the present invention, the preset neural network is an improved YOLOv5 neural network, and the improved YOLOv5 neural network includes a CSPDarknet feature extraction module, an FPN feature fusion module, and a Yolo Head module;
[0100] Among them, the steps of training the preset neural network through the dataset and calculating the loss function of the preset neural network include:
[0101] Input the training images in the dataset into the CSPDarknet feature extraction module for feature extraction to obtain effective feature layers;
[0102] Input the effective feature layers into the FPN feature fusion module for feature fusion to obtain the fused effective feature layers;
[0103] Input the fused effective feature layer into the Yolo Head module for output to obtain the predicted train component recognition information;
[0104] Use a preset loss function to calculate the loss between the predicted train component recognition information and the labeled train component recognition information.
[0105] Furthermore, in some alternative embodiments of the present invention, the preset loss function Loss is:
[0106] Loss = a * L class + b * L local + c * L conf
[0107] In the formula, L class , L local and L conf are the classification loss function, the localization loss function, and the confidence loss function respectively, and a, b, and c are the weight coefficients of the classification loss function, the localization loss function, and the confidence loss function respectively.
[0108] The functions or operation steps implemented when the above-mentioned modules and units are executed are substantially the same as those in the above method embodiments, and will not be elaborated here.
[0109] In summary, the train component recognition model training device in this embodiment solves the problems such as difficult acquisition of traditional relevant data by building a simulation device capable of obtaining a large number of train component images, and then combines with a deep learning neural network to train a train component recognition model that can automatically identify and detect train components, thus solving the technical problems of time-consuming traditional manual inspection, high work intensity, and many restrictions and requirements.
[0110] Example 4
[0111] Please refer to Figure 6 , Embodiment 4 of the present invention proposes a train component recognition model training device, including a processor 10, a memory 20, and a computer program 30 stored on the memory and operable on the processor. It further includes a simulation device, and the simulation device includes a display device for presenting the pattern of the train bottom, a clamping device disposed above the display device and used for fixing train components, and a camera device disposed above the clamping device. When the processor 10 executes the program 30, it implements the train component recognition model training method as described above.
[0112] Among them, in some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips, and is used to run the program code stored in the memory 20 or process data, such as executing an access restriction program, etc.
[0113] Among them, the memory 20 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 20 may be an internal storage unit of the train component identification model training device in some embodiments, such as the hard disk of the train component identification model training device. The memory 20 may also be an external storage device of the train component identification model training device in other embodiments, such as a plug-in hard disk equipped on the train component identification model training device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 20 may also include both an internal storage unit and an external storage device of the train component identification model training device. The memory 20 can be used not only to store application software and various types of data installed in the train component identification model training device, but also to temporarily store data that has been output or will be output.
[0114] It should be noted that Figure 6 The structure shown does not constitute a limitation on the train component identification model training device. In other embodiments, the train component identification model training device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0115] In summary, the train component identification model training device in this embodiment solves problems such as difficult acquisition of traditional relevant data by building a simulation device capable of simulating, and then, in combination with a deep learning neural network, can train a train component identification model for automatically identifying and detecting train components, thereby solving the technical problems of time-consuming traditional manual maintenance, high work intensity, and many restrictions and requirements.
[0116] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the train component identification model training method as described above.
[0117] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0118] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0119] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0120] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0121] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for training a train component identification model, characterized in that Applied to a train component recognition model training device, the train component recognition model training device includes a simulation device, the simulation device includes a display device for presenting a pattern of the bottom of the train, a clamping device disposed above the display device and used for fixing train components, and a camera device disposed above the clamping device. The method includes: Obtain a train component image captured by the camera device, where the train component image is an image of the train component with the pattern of the bottom of the train as the background; Annotate the train components in the train component image to construct a dataset for training a train component recognition model; Train a preset neural network with the dataset, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, thereby training the train component recognition model.
2. The method for training a train component identification model according to claim 1, wherein The step of obtaining a train component image captured by the camera device includes: Put the train component in different states, control the clamping device to drive the train component to be in different poses and / or control the camera device to move to different positions; Under the condition that the train component is in different states, the train component is in different poses and / or the camera device is in different positions, respectively control the camera device to capture the train component image.
3. The method for training the train component identification model according to claim 2, wherein, The train components include fasteners, and the states include a tightened state and a relaxed state.
4. The method for training a train component recognition model according to claim 2, wherein, The clamping device includes a clamping member for clamping the train component and a driving component for driving the clamping member to rotate.
5. The method for training a train component recognition model according to claim 2, wherein The camera device is arranged on a circular electric guide rail, and the camera device can move along the circular electric guide rail.
6. The method for training a train component identification model according to claim 5, wherein A plurality of position sensors are evenly arranged on the circular electric guide rail. When the camera device moves to any one of the position sensors, control the camera device to stop moving until it captures a train component image at the current position.
7. The method for training a train component identification model according to any one of claims 1-6, characterized in that, The preset neural network is an improved YOLOv5 neural network, and the improved YOLOv5 neural network includes a CSPDarknet feature extraction module, an FPN feature fusion module, and a Yolo Head module; Among them, the step of training a preset neural network with the dataset and calculating the loss function of the preset neural network includes: Input the training images in the dataset into the CSPDarknet feature extraction module for feature extraction to obtain effective feature layers; Input the effective feature layers into the FPN feature fusion module for feature fusion to obtain fused effective feature layers; Input the fused effective feature layers into the Yolo Head module for output to obtain predicted train component recognition information; Use a preset loss function to calculate the loss between the predicted train component recognition information and the annotated train component recognition information.
8. The method for training a train component identification model according to claim 7, wherein, The preset loss function Loss is: Loss=a*L class +b*L local +c*L conf where L class , L local and L conf are the classification loss function, the localization loss function, and the confidence loss function respectively, and a, b, and c are the weight coefficients of the classification loss function, the localization loss function, and the confidence loss function respectively.
9. A training device for a train component recognition model, characterized in that, Applied to the train component recognition model training device, the train component recognition model training device includes a simulation device, the simulation device includes a display device for presenting the pattern of the train bottom, a clamping device arranged above the display device and used for fixing train components, and a camera device arranged above the clamping device, and the train component recognition model training device includes: An image acquisition module, configured to acquire the train component image captured by the camera device, where the train component image is an image of the train component with the train bottom pattern as the background; An image annotation module, configured to annotate the train components in the train component image to construct a data set for training the train component recognition model; A model training module, configured to train a preset neural network through the data set, calculate the loss of the preset neural network, and use the backpropagation algorithm to iteratively update the parameters of the preset neural network, so as to train and obtain the train component recognition model.
10. A training device for a train component recognition model, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that It further includes a simulation device, the simulation device includes a display device for presenting the pattern of the train bottom, a clamping device arranged above the display device and used for fixing train components, and a camera device arranged above the clamping device, and when the processor executes the program, it realizes the train component recognition model training method according to any one of claims 1-8.
Citation Information
Patent Citations
Intelligent inspection method for railway freight train
CN111554005A
Small-batch scene-oriented few-sample instance segmented part detection method and system
CN116152203A