A railway pole number plate and kilometer mark identification method and related device

The student model in the knowledge distillation model uses the identification of railway pole license plates and kilometer marks, which solves the problem of difficult deployment of complex models on resource-constrained equipment, and achieves efficient and fast identification performance, reducing memory and computing resource usage.

CN118799844BActive Publication Date: 2024-12-06NANJING ZHILIANSEN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281129.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-06
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

The existing complex railway pole number plate and kilometer mark identification models are difficult to deploy on resource-constrained devices, occupying a large amount of memory and computing resources, making it difficult to achieve efficient identification.

Method used

The student model in the knowledge distillation model is used to identify the railway pole number plate and the kilometer mark. Through feature distillation, pixel-related distillation and output distillation, the total distillation loss is constructed, and the distillation strategy is automatically adjusted to maintain the identification performance.

Benefits of technology

While ensuring identification performance, it can be reduced in memory and computing resource usage, and can be deployed on resource-constrained devices to achieve fast and accurate identification and meet real-time processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799844B_ABST
    Figure CN118799844B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and related devices for identifying railway pole number plates and kilometer markers. The present invention abandons the traditional complex recognition model and adopts the student model in the knowledge distillation model to recognize railway pole number plates and kilometer markers. It reduces the occupied memory and computing resources while ensuring the recognition performance, and can be deployed on resource-constrained devices. In addition, the model of the present invention does not consider a single type of distillation method, but considers feature distillation, pixel relationship distillation and model output distillation. The distillation strategy can be automatically adjusted according to the complexity of the task, so that the model can maintain excellent performance in the task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a railway pole number plate and kilometer mark recognition method and related devices, and belongs to the field of image processing. Background Art

[0002] In the railway transportation system, accurate and rapid identification of pole number plates and kilometer markers in the railway environment is of great significance for ensuring the safe operation of trains and improving dispatching efficiency. With the development of deep learning technology and the sharp increase in the amount of railway image data, the railway pole number plate and kilometer marker recognition method based on deep learning is gradually becoming mainstream. However, in practical applications, due to the wide variety of railway information and the complex and changeable environment, complex network models are usually used to improve the accuracy of recognition. This model will take up more memory and computing resources, limiting the possibility of deployment on resource-constrained devices. Summary of the invention

[0003] The invention provides a railway pole number plate and kilometer mark identification method and related devices, which solve the problems disclosed in the background technology.

[0004] According to one aspect of the present disclosure, a method for identifying railway pole number plates and kilometer markers is provided, which is characterized by comprising:

[0005] Get the images of railway pole number plates and kilometer markers;

[0006] According to the images of railway pole number plates and kilometer markers, the student model in the pre-trained knowledge distillation model is used to identify railway pole number plates and kilometer markers;

[0007] Among them, during the training process of the knowledge distillation model, the same training samples are input into the teacher model and the student model to obtain the feature representation map of the teacher model, the feature representation map of the student model, the output of the teacher model and the output of the student model; according to the feature representation map, an autonomous intention mechanism is adopted to obtain the pixel relationship in the feature representation map; spatial knowledge is distilled on the feature representation map to establish feature distillation loss; global knowledge is distilled on pixel relationship to establish relationship distillation loss; semantic knowledge is distilled on the output to establish output distillation loss; based on feature distillation loss, relationship distillation loss and output distillation loss, a total distillation loss is constructed.

[0008] In some embodiments of the present disclosure, when distilling spatial knowledge, a Gaussian mask is constructed to simulate the foreground true label part;

[0009] The characteristic distillation loss is:

[0010] ;

[0011] Where, L Fis the feature distillation loss, W, H and C are the length, width and number of channels of the feature representation graph respectively, is the normalization factor, A linear transformation layer used to align the feature space dimensions in the student model feature representation graph with the feature space dimensions in the teacher model feature representation graph. is the feature representation of the teacher model in the i-th row, j-th column, and c-th channel. is the feature representation of the student model in the i-th row, j-th column, and c-th channel. ijc is the Gaussian mask of the i-th row, j-th column, and c-th channel.

[0012] In some embodiments of the present disclosure, the relation distillation loss is:

[0013] ;

[0014] Where, L R To relate the distillation loss, W, H, and C are the length, width, and number of channels of the feature representation graph, respectively. A linear transformation layer used to align the pixel relationships in the student model feature representation graph and the pixel relationships in the teacher model feature representation graph. The pixel relationship between the i-th row, j-th column, and c-th channel in the student model feature representation diagram is: is the pixel relationship between the i-th row, j-th column, and c-th channel in the feature representation diagram of the teacher model, Indicates solving the L2 distance.

[0015] In some embodiments of the present disclosure, the output includes a predicted classification and a predicted position;

[0016] Distill semantic knowledge on the output and establish output distillation loss, including:

[0017] Compare the differences between the teacher model and the student model in predicting classification probabilities and establish an initial classification difference loss;

[0018] According to the initial classification difference loss, the classification difference loss in the output distillation loss is established using the loss weighting strategy;

[0019] Compare the differences in predicted positions between the teacher model and the student model and establish an initial position difference loss;

[0020] According to the initial position difference loss, the position difference loss in the output distillation loss is established using the loss weighting strategy; wherein, in the loss weighting strategy, the weight is adjusted according to the importance or difficulty of the category.

[0021] In some embodiments of the present disclosure, the classification difference loss in the output distillation loss is:

[0022] ;

[0023] Where, L C is the classification difference loss in the output distillation loss, n is the total number of positions, K is the total number of categories, and L BCE is the binary cross entropy loss, They are The j1th predicted category of the i1th predicted position in , is the predicted classification output by the teacher model, is the predicted classification output by the student model, is the weight of the j1th prediction category at the i1th prediction position.

[0024] In some embodiments of the present disclosure, the position difference loss in the output distillation loss is:

[0025] ;

[0026] Where, L l is the position difference loss in the output distillation loss, n is the total number of positions, K is the total number of categories, and L giou is the generalized intersection and joint loss, are the i1th predicted position output by the teacher model and the i1th predicted position output by the student model, respectively. is the maximum weight of the row where the j1th prediction category is located in the weight matrix.

[0027] In some embodiments of the present disclosure, the total distillation loss is:

[0028] ;

[0029] Where, L F is the characteristic distillation loss, L R is the relation distillation loss, L C is the classification difference loss in the output distillation loss, L l is the position difference loss in the output distillation loss, L total is the total distillation loss, L F , L R , L C , L l The balance coefficient.

[0030] According to another aspect of the present disclosure, a railway pole number plate and kilometer mark recognition device is provided, comprising:

[0031] The acquisition module obtains the images of the railway pole number plates and kilometer markers;

[0032] The recognition module uses the student model in the pre-trained knowledge distillation model to recognize the railway pole number plate and kilometer mark based on the images of the railway pole number plate and kilometer mark.

[0033] Among them, during the training process of the knowledge distillation model, the same training samples are input into the teacher model and the student model to obtain the feature representation map of the teacher model, the feature representation map of the student model, the output of the teacher model and the output of the student model; according to the feature representation map, an autonomous intention mechanism is adopted to obtain the pixel relationship in the feature representation map; spatial knowledge is distilled on the feature representation map to establish feature distillation loss; global knowledge is distilled on pixel relationship to establish relationship distillation loss; semantic knowledge is distilled on the output to establish output distillation loss; based on feature distillation loss, relationship distillation loss and output distillation loss, a total distillation loss is constructed.

[0034] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes a method for identifying railway pole number plates and kilometer markers.

[0035] According to another aspect of the present disclosure, a computer device is provided, comprising one or more processors and one or more memories, wherein one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a method for identifying railway pole number plates and kilometer markers.

[0036] The beneficial effects achieved by the present invention are as follows: the present invention abandons the traditional complex recognition model and adopts the student model in the knowledge distillation model to recognize railway pole number plates and kilometer markers, while ensuring the recognition performance, reducing the occupied memory and computing resources, and can be deployed on resource-constrained devices. In addition, the model of the present invention does not consider a single type of distillation method, but considers feature distillation loss, pixel relationship distillation and model output distillation. The distillation strategy can be automatically adjusted according to the complexity of the task, so that the model can maintain excellent performance in the task. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a flow chart of the method for identifying railway pole number plates and kilometer markers;

[0038] Figure 2 This is the schematic diagram of the knowledge distillation model;

[0039] Figure 3 The figure is a flow chart of the railway pole number plate and kilometer mark recognition device. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is obvious that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0041] Unless otherwise specified, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0042] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0043] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0044] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0045] It should be noted that similar symbols and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.

[0046] In order to solve the problem that existing complex recognition models cannot be deployed on resource-constrained devices, the present disclosure proposes a railway pole number plate and kilometer mark recognition method and related devices, specifically using the student model in the knowledge distillation model to recognize railway pole number plates and kilometer marks.

[0047] Figure 1 This is a schematic diagram of an embodiment of the method for identifying railway pole number plates and kilometer markers disclosed in the present invention. Figure 1 The embodiment of the present invention can be executed by a railway locomotive information management system.

[0048] like Figure 1 As shown, step 1 of the embodiment is to obtain an image of the railway pole number plate and the kilometer mark;

[0049] It should be noted that a video acquisition device, such as an RGB camera, can be installed on the train to perform video acquisition when the train reaches the location of the railway pole number plate and the kilometer marker, and obtain a frame image containing the railway pole number plate and the kilometer marker from the video; wherein the railway pole number plate and the kilometer marker are in the same image.

[0050] Since the acquired images will inevitably contain noise and inappropriate image size, further preprocessing is required after the images are acquired, including noise removal, image cropping, resizing, etc.; railway pole number plates and kilometer markers are recognized based on the preprocessed images.

[0051] return Figure 1 In step 2 of the embodiment, according to the images of railway pole number plates and kilometer markers, the student model in the pre-trained knowledge distillation model is used to identify the railway pole number plates and kilometer markers; wherein, during the training process of the knowledge distillation model, the same training samples are input into the teacher model and the student model to obtain the feature representation map of the teacher model, the feature representation map of the student model, the output of the teacher model, and the output of the student model; according to the feature representation map, the autonomous intention mechanism is used to obtain the pixel relationship in the feature representation map; the spatial knowledge is distilled on the feature representation map to establish the feature distillation loss; the global knowledge is distilled on the pixel relationship to establish the relationship distillation loss; the semantic knowledge is distilled on the output to establish the output distillation loss; the total distillation loss is constructed according to the feature distillation loss, the relationship distillation loss, and the output distillation loss.

[0052] It should be noted that knowledge distillation is a model compression technology that aims to transfer the knowledge learned from a complex large model (called the teacher model) to a small model (called the student model) with a simpler structure and fewer parameters. When in use, directly using the student model can not only achieve the effect of a complex model, but also because the student model has a simple structure and few parameters, it only takes up very little memory and computing resources and can be deployed on resource-constrained devices.

[0053] Since railway pole number plate and kilometer mark recognition is mainly text recognition, the teacher model in the knowledge distillation model can use a complex railway text detection and recognition detector T det , while the student model can use a simple railway text detection and recognition detector S det .

[0054] In various scenarios, including daytime, nighttime, and various weather conditions, RGB cameras are used to capture images of railway pole number plates and kilometer markers. Then, the captured images are preprocessed, including noise removal, image cropping, and resizing to ensure image quality and consistency. After preprocessing, the images are labeled, that is, each image is assigned the correct railway pole number plate and kilometer label for subsequent model training and evaluation. Subsequently, the labeled images are divided into training sets, validation sets, and test sets according to a certain ratio. Usually, a 70-15-15 division ratio is used, that is, 70% is used for training, 15% is used for validation, and the remaining 15% is used for the final test.

[0055] like Figure 2 , assuming T det and S det The feature extractors can be expressed as f t and f s , the detection head is also represented by h t and h s , then when inputting the same training sample I1, the feature representation graphs extracted by the feature extractors of the two models can be expressed as:

[0056] F t =f t (I1);

[0057] F s =f s (I1);

[0058] In the formula, F t and F s They are the feature representation graphs of the teacher model and the student model respectively.

[0059] According to the feature representation diagram, T det and S det Generate prediction outputs respectively, which can be expressed as:

[0060] P t =h t (F t );

[0061] P s =h s (F t );

[0062] Where P t and P s are the outputs of the teacher model and the student model respectively.

[0063] Most of the existing knowledge distillation is mainly used to solve image classification tasks. Different from image classification, detection and recognition not only need to identify the target category, but also need accurate positioning. Therefore, the above output includes predicted classification and predicted location. t Includes predicted classification of teacher model output and predicted location , similarly P s Includes predicted classification of student model output and predicted location .

[0064] It should be noted that the relationship between pixels in the feature representation map contains valuable information, which helps guide the model to understand global information. Therefore, here, the self-attention mechanism will be further used to process the feature map, aiming to capture and analyze the relationship between pixels.

[0065] Assume that the relation extractors in the teacher model and the student model are G t and G s , then the extracted pixel relationship can be expressed as:

[0066] R t =G t (F t );

[0067] R s =G s (F t );

[0068] In the formula, R t and R s The pixel relationships in the feature representation graph are respectively for the teacher model and the student model.

[0069] Capturing the relationship between pixels in the feature map through self-attention helps the student model better understand the connection between adjacent pixels in the image and the feature representation of each pixel.

[0070] In order to enable the model to maintain excellent performance in the task, this paper adopts multiple types of distillation methods:

[0071] 1) Distill spatial knowledge on the feature representation map, that is, by comparing the responses of the teacher model and the student model on the feature representation map, guide the student model to learn the spatial representation information of the teacher model. This process can be expressed as:

[0072] ;

[0073] Where, L F is the feature distillation loss, W, H and C are the length, width and number of channels of the feature representation graph respectively, A linear transformation layer used to align the feature space dimensions in the student model feature representation graph with the feature space dimensions in the teacher model feature representation graph. is the feature representation of the teacher model in the i-th row, j-th column, and c-th channel. The feature representation of the student model is the feature of the i-th row, j-th column, and c-th channel in the figure.

[0074] In the railway pole number plate and kilometer mark detection task, the ratio of the background area to the foreground area is unbalanced. The background area usually occupies most of the feature map. Extracting features from all positions will inevitably introduce a lot of noise. Therefore, in some embodiments, when distilling spatial knowledge, a Gaussian mask is constructed to simulate the true label part of the foreground, highlight the central area of ​​the foreground object pixels, and suppress the noise introduced by the boundary area around the target, ensuring that the mask can accurately reflect the importance of each pixel in the feature distillation process and help the student model better learn key features.

[0075] The two-dimensional Gaussian mask can be defined as:

[0076] ;

[0077] Where M is the Gaussian mask, B is the bounding box of the given true label target, w and h are the length and width of the bounding box respectively, the center coordinates of the bounding box are (x0, y0), (x, y) are the pixels, is the attenuation factor in both directions. For simplicity, we set The above formula indicates that the Gaussian mask is only valid within the bounding box of the true annotation and is zero in other areas.

[0078] Combining the knowledge of the distillation space and the Gaussian mask, the feature distillation loss can finally be expressed as:

[0079] ;

[0080] Where, L F is the characteristic distillation loss, is the normalization factor, M ijc is the Gaussian mask of the i-th row, j-th column, and c-th channel.

[0081] During training, we can minimize L F To guide the student model to be as close as possible to the performance of the teacher model during feature learning.

[0082] 2) Distill global knowledge from pixel relationships.

[0083] According to the obtained pixel relations, the global information is passed to the student model through the relation-based loss function; the relation distillation loss can be:

[0084] ;

[0085] Where, L R is the relation distillation loss, A linear transformation layer used to align the pixel relationships in the student model feature representation graph and the pixel relationships in the teacher model feature representation graph. The pixel relationship between the i-th row, j-th column, and c-th channel in the student model feature representation diagram is: is the pixel relationship between the i-th row, j-th column, and c-th channel in the feature representation diagram of the teacher model, Indicates solving the L2 distance.

[0086] 3) Distilling semantic knowledge on the output.

[0087] It should be noted that in addition to the distillation loss of the classification output, the knowledge transfer between the target positions also needs to be considered. Therefore, in some embodiments, the global knowledge is distilled on the output to establish the output distillation loss. The process can be: compare the difference between the teacher model and the student model in the predicted classification probability, and establish the initial classification difference loss; based on the initial classification difference loss, use the loss weighting strategy to establish the classification difference loss in the output distillation loss; compare the difference between the teacher model and the student model in the predicted position, and establish the initial position difference loss; based on the initial position difference loss, use the loss weighting strategy to establish the position difference loss in the output distillation loss; wherein, in the loss weighting strategy, the weight is adjusted according to the importance or difficulty of the category.

[0088] It should be noted that you can first and Sigmoid processing can be expressed as follows:

[0089] ;

[0090] ;

[0091] In the formula, Prot Sig is the Sigmoid function, They are and The score is a binary classification score of size n×K, where n is the total number of positions and K is the total number of categories.

[0092] Based on these binary classification scores, the difference between the teacher model and the student model in predicting classification probabilities can be expressed as:

[0093] ;

[0094] Where, L BCE is the binary cross entropy loss, They are The j1th predicted category at the i1th predicted position in .

[0095] Then the initial classification difference loss can be expressed as: .

[0096] Based on the predicted position, the difference between the teacher model and the student model in the predicted position can be expressed as:

[0097] ;

[0098] Where, L giou It is a generalized intersection-union loss, I represents the intersection of the teacher prediction box (i.e., the prediction box in the teacher model) and the corresponding student prediction box, U represents the union of the teacher prediction box and the corresponding student prediction box, and E represents the minimum circumscribed box of the teacher prediction box and the corresponding student prediction box.

[0099] A prediction-guided loss weighting strategy is used to adjust the loss weights according to the importance or difficulty of different categories, which can be expressed as:

[0100] ;

[0101] In the formula, the weight w is adaptively adjusted as the student model learns.

[0102] Combining the semantic knowledge on the final output and the loss weighting strategy, the student model is guided to learn the knowledge of the teacher model at the output layer by minimizing the following output distillation loss;

[0103] The classification difference loss in the output distillation loss can be expressed as:

[0104] ;

[0105] Where, L C is the classification difference loss in the output distillation loss, L BCE is the binary cross entropy loss, is the weight of the j1th prediction category at the i1th prediction position.

[0106] The position difference loss in the output distillation loss can be expressed as:

[0107] ;

[0108] Where, L l is the position difference loss in the output distillation loss, L giou is the generalized intersection and joint loss, are the i1th predicted position output by the teacher model and the i1th predicted position output by the student model, respectively. is the maximum weight of the row where the j1th prediction category is located in the weight matrix.

[0109] Here, we consider transferring the knowledge of the classification and position output of the teacher model at the same time, and focus on extracting important samples through the dynamic weighted loss of the joint teacher model and the student model.

[0110] A joint type of distillation method is used to improve the performance of the student model; specifically, based on the above loss, a structured adaptive distillation loss is formed:

[0111] ;

[0112] Where, L total is the total distillation loss, L F , L R , L C , L l The balance coefficient. L total It is the adaptive distillation loss, which can be adjusted adaptively according to the balance coefficient, L total It comprehensively considers the global structure, pixel relationship and semantic knowledge of output scores, and guides the student model to better learn the knowledge of the teacher model through joint training, making the student model more lightweight and efficient.

[0113] After optimization and training, this lightweight student model is deployed into the railway locomotive information management system to achieve real-time recognition of railway pole number plates and kilometer markers.

[0114] The above method abandons the traditional complex recognition model and adopts the student model in the knowledge distillation model to recognize railway pole number plates and kilometer signs. It reduces the memory and computing resources occupied while ensuring the recognition performance, and can be deployed on resource-constrained devices. In addition, the model of the above method does not consider a single type of distillation method, but considers feature distillation loss, pixel relationship distillation and model output distillation. The distillation strategy can be automatically adjusted according to the complexity of the task, so that the model can maintain excellent performance in the task.

[0115] Figure 3 This is a schematic diagram of an embodiment of the railway pole number plate and kilometer mark identification device disclosed in the present invention. Figure 3 The embodiment is a virtual device that can be loaded and executed by a railway locomotive information management system, including an acquisition module and an identification module.

[0116] The acquisition module of the embodiment is configured to acquire an image of the railway pole number plate and the kilometer mark;

[0117] The recognition module of the embodiment is configured to recognize railway pole number plates and kilometer markers according to the images where the railway pole number plates and kilometer markers are located, using a student model in a pre-trained knowledge distillation model; wherein, during the knowledge distillation model training process, the same training samples are input into the teacher model and the student model to obtain a feature representation map of the teacher model, a feature representation map of the student model, the output of the teacher model, and the output of the student model; based on the feature representation map, an autonomous intention mechanism is used to obtain the pixel relationship in the feature representation map; spatial knowledge is distilled on the feature representation map to establish a feature distillation loss; global knowledge is distilled on pixel relationships to establish a relationship distillation loss; semantic knowledge is distilled on the output to establish an output distillation loss; and a total distillation loss is constructed based on the feature distillation loss, the relationship distillation loss, and the output distillation loss.

[0118] Similar to the above method, the above device abandons the traditional complex recognition model and adopts the student model in the knowledge distillation model to recognize railway pole number plates and kilometer signs. It reduces the occupied memory and computing resources while ensuring the recognition performance, and can be deployed on resource-constrained devices. In addition, the model of the above method does not consider a single type of distillation method, but considers feature distillation loss, pixel relationship distillation and model output distillation. The distillation strategy can be automatically adjusted according to the complexity of the task, so that the model can maintain excellent performance in the task.

[0119] In the application scenario of railway safety and service, it is very important to quickly and accurately identify the pole number plate and kilometer mark information. The present invention can accelerate the reasoning speed of the model without sacrificing the recognition accuracy through model compression to meet the needs of real-time processing.

[0120] Based on the same technical solution, the present disclosure also relates to a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes a method for identifying railway pole number plates and kilometer markers.

[0121] Based on the same technical solution, the present disclosure also relates to a computer device, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by one or more processors, and the one or more programs include instructions for executing a method for identifying railway pole number plates and kilometer markers.

[0122] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0123] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0126] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A method for identifying railway pole number plates and kilometer markers, characterized in that: include: Get the images of railway pole number plates and kilometer markers; According to the images of railway pole number plates and kilometer markers, the student model in the pre-trained knowledge distillation model is used to identify railway pole number plates and kilometer markers; In the process of training the knowledge distillation model, the same training samples are input into the teacher model and the student model to obtain the feature representation map of the teacher model, the feature representation map of the student model, the output of the teacher model and the output of the student model; according to the feature representation map, the self-attention mechanism is used to obtain the pixel relationship in the feature representation map; the spatial knowledge is distilled on the feature representation map to establish the feature distillation loss; the global knowledge is distilled on the pixel relationship to establish the relationship distillation loss; the semantic knowledge is distilled on the output to establish the output distillation loss; according to the feature distillation loss, the relationship distillation loss and the output distillation loss, the total distillation loss is constructed; Construct a Gaussian mask to simulate the true label part of the foreground; The characteristic distillation loss is: ; In the formula, L F is the characteristic distillation loss, W , H and C are the length, width and number of channels of the feature representation graph, respectively. is the normalization factor, A linear transformation layer used to align the feature space dimensions in the student model feature representation graph with the feature space dimensions in the teacher model feature representation graph. is the feature representation graph of the teacher model. i Row, No. j Column, No. c The characteristics of the channels, The feature representation diagram of the student model is i Row, No. j Column, No. c The characteristics of the channels, M ijc For the i Row, No. j Column, No. c Gaussian mask for each channel; The relation distillation loss is: ; In the formula, L R is the relation distillation loss, A linear transformation layer used to align the pixel relationships in the student model feature representation graph and the pixel relationships in the teacher model feature representation graph. The student model features the first i Row, No. j Column, No. c The pixel relationship of each channel, is the feature representation graph of the teacher model. i Row, No. j Column, No. c The pixel relationship of each channel, Indicates solving the L2 distance; The output includes predicted classification and predicted position; semantic knowledge is distilled on the output to establish output distillation loss, including: comparing the difference between the teacher model and the student model in predicted classification probability to establish an initial classification difference loss; based on the initial classification difference loss, using the loss weighting strategy, establishing the classification difference loss in the output distillation loss; comparing the difference between the teacher model and the student model in predicted position to establish an initial position difference loss; based on the initial position difference loss, using the loss weighting strategy, establishing the position difference loss in the output distillation loss; wherein, in the loss weighting strategy, the weight is adjusted according to the importance or difficulty of the category; The total distillation loss is: ; In the formula, L C is the classification difference loss in the output distillation loss, L l is the position difference loss in the output distillation loss, L total is the total distillation loss, They are L F , L R , L C , L l The balance coefficient.

2. The method for identifying railway pole number plates and kilometer markers according to claim 1, characterized in that: The classification difference loss in the output distillation loss is: ; In the formula, n is the total number of positions, K is the total number of categories, L BCE is the binary cross entropy loss, They are Middle i 1st predicted position j 1 prediction category, is the predicted classification output by the teacher model, is the predicted classification output by the student model, For the i 1st predicted position j 1 weight for the predicted class.

3. The method for identifying railway pole number plates and kilometer markers according to claim 1, characterized in that: The position difference loss in the output distillation loss is: ; In the formula, n is the total number of positions, K is the total number of categories, L giou is the generalized intersection and joint loss, They are the outputs of the teacher model. i 1 predicted position and the output of the student model i 1 predicted location, is the weight matrix j The maximum weight of a row with a predicted category.

4. A railway pole number plate and kilometer mark recognition device, characterized in that: include: The acquisition module obtains the images of the railway pole number plates and kilometer markers; The recognition module uses the student model in the pre-trained knowledge distillation model to recognize the railway pole number plate and kilometer mark based on the images of the railway pole number plate and kilometer mark. Among them, in the process of training the knowledge distillation model, the same training samples are input into the teacher model and the student model to obtain the feature representation map of the teacher model, the feature representation map of the student model, the output of the teacher model and the output of the student model; according to the feature representation map, the autonomous intention mechanism is adopted to obtain the pixel relationship in the feature representation map; the spatial knowledge is distilled on the feature representation map to establish the feature distillation loss; the global knowledge is distilled on the pixel relationship to establish the relationship distillation loss; the semantic knowledge is distilled on the output to establish the output distillation loss; according to the feature distillation loss, the relationship distillation loss and the output distillation loss, the total distillation loss is constructed; Construct a Gaussian mask to simulate the true label part of the foreground; The characteristic distillation loss is: ; In the formula, L F is the characteristic distillation loss, W , H and C are the length, width and number of channels of the feature representation graph, respectively. is the normalization factor, A linear transformation layer used to align the feature space dimensions in the student model feature representation graph with the feature space dimensions in the teacher model feature representation graph. is the feature representation graph of the teacher model. i Row, No. j Column, No. c The characteristics of the channels, The feature representation diagram of the student model is i Row, No. j Column, No. c The characteristics of the channels, M ijc For the i Row, No. j Column, No. c Gaussian mask for each channel; The relation distillation loss is: ; In the formula, L R is the relation distillation loss, A linear transformation layer used to align the pixel relationships in the student model feature representation graph and the pixel relationships in the teacher model feature representation graph. The student model features the first i Row, No. j Column, No. c The pixel relationship of each channel, is the feature representation graph of the teacher model. i Row, No. j Column, No. c The pixel relationship of each channel, Indicates solving the L2 distance; The output includes predicted classification and predicted position; semantic knowledge is distilled on the output to establish output distillation loss, including: comparing the difference between the teacher model and the student model in predicted classification probability to establish an initial classification difference loss; based on the initial classification difference loss, using the loss weighting strategy, establishing the classification difference loss in the output distillation loss; comparing the difference between the teacher model and the student model in predicted position to establish an initial position difference loss; based on the initial position difference loss, using the loss weighting strategy, establishing the position difference loss in the output distillation loss; wherein, in the loss weighting strategy, the weight is adjusted according to the importance or difficulty of the category; The total distillation loss is: ; In the formula, L C is the classification difference loss in the output distillation loss, L l is the position difference loss in the output distillation loss, L total is the total distillation loss, They are L F , L R , L C , L l The balance coefficient.

5. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform any of the methods of claims 1 to 3.

6. A computing device, characterized in that: include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 3.