A railway freight yard wagon box number identification method, system and storage medium

By using an improved bidirectional feature pyramid network and an attention mechanism-based Re-DETR algorithm, combined with visual sensors and adaptive image processing, the problem of car number recognition in complex environments at railway freight yards has been solved, achieving real-time high-precision recognition and improving operational efficiency and safety.

CN123142246APending Publication Date: 2026-11-20INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611397541.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In the complex environment of railway freight yards, traditional car number identification methods cannot simultaneously meet the requirements of real-time performance and high accuracy, leading to chaotic operation scheduling and safety hazards. Existing algorithms are not accurate enough in complex scenarios.

Method used

The Re-DETR algorithm is improved by adopting a bidirectional feature pyramid network and a two-stage attention mechanism. By combining local and global attention mechanisms, automatic recognition of the carriage number character is achieved through feature fusion and decoder. Images are acquired by a visual sensor and adaptively processed. Multi-scale feature maps are extracted by combining the backbone network to enhance feature representation capability.

Benefits of technology

It achieves real-time, high-precision vehicle number recognition in complex scenarios, improving operational efficiency and data consistency, reducing labor costs, and enhancing operational safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123142246A_ABST
    Figure CN123142246A_ABST
Patent Text Reader

Abstract

The present application provides a kind of railway freight yard car box number identification method, system and storage medium, the method comprises: obtaining the image to be identified containing car box number character from railway freight yard image acquisition system;The initial feature map of multiple scales is extracted by inputting the image to be identified obtained into backbone network;The enhanced feature map of multiple scales is outputted by inputting the initial feature map of multiple scales into bidirectional feature pyramid network jointly;The feature sequence is converted from the enhanced feature map of multiple scales, and the boundary box position information corresponding to car box number character in the image to be identified is obtained based on the feature sequence by decoder;The input data of character prediction model is determined based on boundary box position information and the enhanced feature map of multiple scales, and the prediction result of car box number character is obtained based on input data.The present application can be suitable for the complex scene of railway freight yard, while meeting the requirements of real-time and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for recognizing car number in railway freight yards. Background Technology

[0002] In the loading, unloading, and quality inspection processes at railway freight yards, the accurate recording and verification of car number is crucial information connecting multiple stages such as loading, unloading, inspection, storage, and release. Based on accurate car number identification, operational data such as inspection items, location trajectories, loading / unloading status, and car body status can be accurately linked to the corresponding information across the entire operational chain. Errors in car number identification can lead to the failure of the entire data flow, causing operational scheduling chaos and even safety accidents. However, railway freight yards are complex environments characterized by diverse text scales, frequent occlusion, and drastic fluctuations in day and night lighting. Traditional target detection methods, limited by feature extraction capabilities and computational efficiency, struggle to simultaneously meet the requirements of real-time performance and high accuracy in complex scenarios.

[0003] Therefore, achieving rapid, accurate, and automatic identification of car carriage numbers is a technical prerequisite for constructing an integrated data association system within the closed-loop operation process of "work plan - work progress - completion status," and has significant practical implications. There is an urgent need to research a car carriage number identification method that can balance real-time performance and high accuracy in complex environments to support the automated flow of loading and unloading operations and quality inspections, providing a reliable data foundation for intelligent management of freight yards, and fundamentally improving the operational efficiency, data consistency, and operational safety of railway freight stations. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method, system and storage medium for identifying car carriage numbers at railway freight yards, in order to improve operational efficiency through intelligent technology.

[0005] One aspect of the present invention provides a method for identifying car number in a railway freight yard, the method comprising the following steps: Obtain images containing carriage number characters from the railway freight yard image acquisition system; The acquired image to be identified is input into the backbone network to extract initial feature maps at multiple scales; Initial feature maps at multiple scales are input into a bidirectional feature pyramid network, which outputs enhanced feature maps at multiple scales. The enhanced feature maps at multiple scales are converted into feature sequences, and the bounding box position information corresponding to the vehicle number characters in the image to be identified is obtained based on the feature sequences through the decoder. The input data for the character prediction model is determined based on the bounding box location information and enhanced feature maps at multiple scales, and the prediction result of the carriage number character is obtained based on the input data.

[0006] In some embodiments of the present invention, obtaining an image to be identified containing vehicle compartment number characters includes: obtaining an original image to be identified containing vehicle compartment number characters, and performing adaptive histogram equalization processing on the original image to be identified. The steps of adaptive histogram equalization are as follows: The original image to be identified is divided into multiple image blocks, and the grayscale histogram of each image block is calculated. For each image block, if there is a peak value in the grayscale histogram of the image block that exceeds the preset pixel limit threshold, the number of excess pixels is evenly redistributed to all grayscale levels of the grayscale histogram, thereby obtaining a grayscale redistributed image block. The boundaries between image blocks that have undergone grayscale redistribution are smoothed using a bilinear interpolation algorithm to obtain the image to be recognized after image enhancement processing.

[0007] In some embodiments of the present invention, the bidirectional feature pyramid network includes multiple feature enhancement units, each of which is used to perform feature fusion on multiple scale feature maps of the input and output multiple scale feature maps after feature enhancement. In the bidirectional feature pyramid network, the input data of the first feature enhancement unit is an initial feature map at multiple scales, and the output data of the last feature enhancement unit is an enhanced feature map at multiple scales. The output of the previous feature enhancement unit is used as the input of the current feature enhancement unit. Each feature enhancement unit performs the following operations: Feature fusion based on a top-down path: Starting with the feature map at the smallest scale, the first fused feature map at the current scale is sequentially weighted and fused with the feature map at the next scale to obtain the first fused feature map at the next scale; and Feature fusion based on bottom-up path: Starting from the feature map of the largest scale, the second fused feature map of the current scale, the first fused feature map of the previous scale, and the feature map of the previous scale are weighted and fused in sequence to obtain the second fused feature map of the previous scale. Among them, the first fusion feature map with the smallest scale is the feature map with the smallest scale, and the second fusion feature map with the largest scale is the first fusion feature map with the largest scale.

[0008] In some embodiments of the present invention, before inputting initial feature maps of multiple scales into the bidirectional feature pyramid network, the method further includes, for each initial feature map: Each initial feature map is divided into multiple non-overlapping windows; The features within each window are calculated using a local window attention mechanism, and a reassembled feature map is formed based on the calculated features and the position of each window in the initial feature map. The reassembled feature map is residually connected to the corresponding initial feature map, and the information of the residually connected feature map is augmented using a global attention mechanism, thereby updating the initial feature map.

[0009] In some embodiments of the present invention, the decoder includes an attention module and a prediction head; the decoder obtains the bounding box position information through multiple rounds of iterative prediction. The steps for each round of iterative prediction are as follows: The object query of the current round is input into the attention module to extract the object query of the next round; the object query of the current round includes the feature embedding vector and the bounding box prediction result of the current round; The feature embedding vector from the object query in the current round is input into the prediction head, and the bounding box offset prediction result of the current round is output. The bounding box prediction results for the current round are adjusted based on the bounding box offset prediction results of the current round to obtain the bounding box prediction results for the next round. The first round of object querying utilizes the intersection-union ratio-aware selection strategy to obtain the initial object query based on the feature sequence.

[0010] In some embodiments of the present invention, the initial object query is obtained in the following manner: The feature sequence is input into a pre-trained classifier, and the output is the classification score and bounding box regression value for each feature location in the feature sequence. Based on classification scores and bounding box regression values, features at multiple feature locations are selected from the feature sequence, thereby obtaining the initial object query for the decoder based on the selected features.

[0011] In some embodiments of the present invention, the character prediction model is constructed based on a temporal prediction model and a connected temporal classifier; The prediction result for the carriage number character is obtained as follows: Features related to the carriage number characters are extracted from enhanced feature maps at multiple scales using bounding box location information. The extracted features are then input into a temporal prediction model, and the output is the temporal features corresponding to the carriage number characters. The temporal features are input into a temporal classifier, and the output is the predicted result of the vehicle compartment number character.

[0012] In some embodiments of the present invention, the bounding box position information is the pixel coordinates of the image to be identified; The method utilizes bounding box location information to extract features related to the carriage number characters from enhanced feature maps at multiple scales, including: for initial feature maps at each scale, obtaining predetermined size feature maps at each scale through pixel alignment operation, and performing spatial transformation processing on the predetermined size feature maps using a spatial transformation network, and using the feature map output by the spatial transformation network as the feature related to the carriage number characters. For enhanced feature maps at various scales, pixel alignment operations include: Map the bounding box location information to coordinates based on the scale-enhanced feature map; Based on the feature map coordinates of the bounding box, the enhanced feature map portion located within the bounding box is divided into multiple blocks, and multiple floating-point positions within each block are sampled. The sampled features are pooled to output a feature map of a predetermined size. The size of each block is determined based on the bounding box location information and a predetermined size.

[0013] Another aspect of the present invention provides a railway freight yard car number identification system, including a processor, a memory, and a computer program / instructions stored in the memory. The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method described in any of the above embodiments.

[0014] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any of the above embodiments.

[0015] The railway freight yard car number recognition method, system, and storage medium proposed in this invention can extract enhanced features through a bidirectional feature pyramid network in the detection branch and determine the bounding box position information corresponding to the car number character through the decoder, thereby obtaining the prediction result of the car number character through the character recognition branch. The method proposed in this application can be applied to the complex scenarios of railway freight yards, while meeting the requirements of real-time performance and high accuracy.

[0016] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0017] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a flowchart illustrating the vehicle compartment number identification method in one embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the feature fusion process of a bidirectional feature pyramid network in one embodiment of the present invention.

[0020] Figure 3 This is a flowchart illustrating the vehicle compartment number identification method in another embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0022] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0023] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0024] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0025] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0026] With the rapid development of the national logistics industry, the demand for railway freight yard transportation is increasing day by day. The efficiency of transporting and unloading containers and railway trains through related operating equipment has become a key factor restricting the speed of logistics.

[0027] However, the traditional method of manually recording car number entries during loading and unloading operations at railway freight yards suffers from high labor costs and low efficiency. Specifically, traditional car number identification methods rely primarily on manual transcription and handheld terminal scanning, which are characterized by low efficiency, high error rates, poor real-time performance, and high labor costs. The limitations of manual operation are particularly pronounced in scenarios with high dust levels, complex lighting conditions, and high vehicle speeds in freight yards. Furthermore, traditional target detection methods (such as the YOLO algorithm or the Canny detection operator) cannot achieve high-precision identification during loading and unloading operations and are ill-suited to the complex environments of railway freight yards. With the deepening of intelligent railway freight construction, automatic car number identification technology has become a core supporting technology for achieving "digital freight yard management."

[0028] For example, Re-DETR is a Transformer-based real-time object detection algorithm that offers faster inference speed and higher detection accuracy compared to traditional DETR. Its core architecture consists of a backbone network, a hybrid encoder, and a decoder. However, existing Re-DETR algorithms cannot meet the accuracy requirements in complex scenarios at railway freight yards.

[0029] This application proposes a method for automatic identification of vehicle compartment numbers, which can shorten operation time and improve operation speed through intelligent image algorithms. For example... Figure 3 As shown, the method proposed in this application can be divided into a bounding box detection branch and a character recognition branch. The bounding box detection branch mainly improves the hybrid encoder in Re-DETR by using a bidirectional feature pyramid network and a two-stage attention mechanism to achieve feature extraction and encoding. The character recognition branch connects a temporal classifier that can automatically learn the alignment relationship between the character sequence and the feature sequence extracted by the temporal prediction model, without the need to use the traditional sequence recognition scheme that aligns time steps with characters.

[0030] Figure 1 This is a flowchart illustrating a method for identifying carriage numbers at railway freight yards according to an embodiment of the present invention. Figure 1 As shown, the method includes steps S110 to S150, as detailed below: Step S110: Obtain the image to be recognized containing the carriage number characters. That is, the obtained image to be recognized can be an image containing the train carriage number and / or an image containing the container number.

[0031] The truck and container numbers in the image to be identified are fixed character formats designed according to existing numbering rules: the truck number is a unique identifier for a truck (such as an open wagon, boxcar, tanker, etc.) and may include information such as the vehicle type code (such as N for flatcar, C for open wagon), load (or structure), and truck number sequence; the container number conforms to ISO standards and may include information such as the container owner code, the equipment identification code for indicating the container type, the sequence number assigned by the container owner, and the check code.

[0032] In some embodiments of the present invention, obtaining an image to be recognized containing vehicle compartment number characters includes: acquiring an original image to be recognized containing vehicle compartment number characters using a vision sensor, and preprocessing the original image to obtain the image to be recognized. Preprocessing may include one or more of grayscale processing, noise reduction processing, image enhancement processing, and edge enhancement processing. This application does not specifically limit the various processing methods in the preprocessing steps; they can be designed independently. For example, the preprocessing process may be as follows: ① Grayscale processing: When the original image to be identified is a color image (i.e., RGB image), it is necessary to convert the RGB image to a grayscale image to reduce the amount of data and improve the efficiency of subsequent algorithm operation.

[0033] ② Noise Reduction: Filtering algorithms are used to remove noise interference from the original image to be identified. For example, median filtering can be used to remove random noise by taking the median value of neighboring pixels. This noise reduction process effectively preserves image edge information and avoids losing key features. The median filtering algorithm mentioned above is just an example; other filtering algorithms such as Gaussian filtering, wavelet thresholding, or bilateral filtering can also be used.

[0034] ③ Image enhancement processing: Histogram equalization is used to enhance image contrast. For example, algorithms such as global histogram equalization or Contrast Limited Adaptive Histogram Equalization (CLAHE) can be used.

[0035] The CLAHE algorithm redistributes the image's gray-level histogram, making the gray-level distribution more uniform. This improves the distinction between the train carriage number characters and the background area by enhancing local contrast, facilitating subsequent character recognition. Taking the CLAHE algorithm as an example, the image enhancement process in preprocessing can be specifically described as follows: Step S01, Image Blocking: Divide the image into multiple image blocks and calculate the grayscale histogram (also known as the brightness histogram) of each image block. The horizontal axis of each grayscale histogram represents the grayscale level (0-255), representing the pixel brightness, and the vertical axis represents the number of pixels / frequency, representing the number of times a specific brightness occurs.

[0036] Step S02, Contrast Limitation: For each image block, if there is a peak value in the grayscale histogram of that image block that exceeds a preset pixel limit threshold, the excess pixels are evenly redistributed across all grayscale levels of the grayscale histogram, thus obtaining a grayscale redistributed image block. This step limits the height of the grayscale histogram of each image block, that is, limits the maximum number of pixels that can appear at a certain brightness value (i.e., the upper limit of contrast enhancement), realizing the cropping and redistribution of the grayscale histogram of a single image block and preventing excessive noise amplification.

[0037] Preset pixel limit threshold This is not the absolute number of pixels, but rather the upper bound of the slope of the normalized cumulative distribution function. (Exceeding...) The number of pixels is cropped and redistributed evenly across all gray levels. By calculating the CDF of the cropped gray-level histogram, the original gray-level values ​​can be mapped to new equalized gray-level values, thus obtaining the new gray-level histograms corresponding to each image block (the image block with gray-level redistribution) in step S03.

[0038] Step S03, Smoothing Boundaries: The boundaries between each grayscale redistributed image block are smoothed using a bilinear interpolation algorithm (to eliminate potential block artifacts). Specifically, bilinear interpolation is used to smooth the transformation result of each pixel. For each pixel in an image block, interpolation is performed based on the transformation results of the four adjacent image blocks to obtain the image enhancement processed.

[0039] This application does not limit the specific parameters of the CLAHE algorithm. For example, the parameters can be set to clip_limit=2.0 and tile_size=(8,8) to adapt to changes in day and night lighting.

[0040] To address issues such as uneven lighting, reflections, or nighttime shooting that can cause characters to blend into the background, in addition to histogram equalization to enhance image contrast, an LED supplementary lighting component can be configured in the hardware to meet the needs of both daytime and nighttime operating scenarios. The supplementary lighting component can be installed on both sides of the vision sensor at a certain angle, ensuring that light evenly illuminates the area where the vehicle number is located, covering all areas of the vehicle number information and avoiding shadows. The color temperature range of the supplementary lighting component can be adjusted between 3000K and 6500K, providing suitable illumination according to different ambient lighting conditions, enhancing the contrast of the vehicle number area, and improving image recognition accuracy.

[0041] ④ Edge Enhancement Processing: Edge detection algorithms can be used to process the image. The edge detection algorithm process can be as follows: use the Sobel operator to calculate the gradient magnitude and direction of the image to find the edge intensity and direction; compare along the gradient direction through non-maximum suppression to retain local maxima and achieve edge refinement; use preset high and low thresholds to distinguish strong and weak edges to achieve dual threshold detection; form complete and continuous edge lines by edge connection; use the edge lines to form a binary edge map, and use it as a mask to extract the edge-enhanced image from the image containing the carriage number.

[0042] ⑤ Distortion Correction: Based on camera calibration parameters, perspective transformation is used to correct the trapezoidal distortion of the carriage number characters caused by the shooting angle, thereby achieving image normalization.

[0043] ⑥ Region cropping: Remove image portions unrelated to the carriage number characters to narrow down the processing area. For example, traditional object detection algorithms can be used to initially determine the location of the carriage number characters and then crop the image.

[0044] As an example, the image to be identified (the original image) is an image containing the number of the freight car or container being handled, captured by a vision sensor (such as a camera) installed on an unmanned inspection system or the boom of a reach stacker during freight yard operations (the vision sensor belongs to the image acquisition system of the railway freight yard). Since the locations of the numbers on different types of freight cars and containers vary, a vision sensor can be placed at a specific location on the operating equipment where the car / container number can be clearly obtained, and the shooting angle of the vision sensor can be adjusted so that the vision sensor can acquire the image to be identified at an angle relative to the plane where the car / container number is located, minimizing character distortion caused by the shooting angle and improving recognition accuracy. Simultaneously, when setting up the vision sensor, it is necessary to ensure that the complete car / container number is captured while avoiding collisions between the vision sensor and the transported goods (freight car or container) during loading and unloading. For example, a vision sensor used to capture images containing container numbers can be installed in the middle of the reach stacker boom, ensuring that the shooting angle is vertically or nearly vertically aligned with the container number area (e.g., the vision sensor can be installed on the reach stacker boom 1-2 meters from the top of the container), while a vision sensor used to capture images containing freight car numbers can be installed at the end of the reach stacker boom near the reach stacker cab. This application does not impose specific limitations on the number, location, and shooting angle of the visual sensors installed on the operating equipment, as long as they can capture clear and unobstructed images containing the vehicle number characters.

[0045] To achieve accurate acquisition, identification, and data reporting of the vehicle compartment numbers, a 300W pixel high-definition industrial camera is used as a vision sensor to clearly capture the details of the vehicle compartment numbers. The frame rate is set to 30 frames per second to ensure that images can be acquired quickly and in real time during the operation of the equipment, thus guaranteeing the real-time performance of the identification system.

[0046] Step S120: Input the acquired image to be identified into the backbone network to extract initial feature maps at multiple scales.

[0047] The targets (i.e., the carriage number characters) in the image to be identified often have different sizes, and small targets are detected better on high-resolution feature maps, while large targets are detected better on low-resolution but semantically rich feature maps. To improve the effectiveness of subsequent target detection, this application uses a backbone network to extract multiple feature maps of different scales from the image to be identified through different sampling strides. The backbone network can be a CNN-based network such as ResNet, VGG, or ResNext, or a hierarchical Transformer-based network such as Swin Transformer. This application does not impose specific limitations on the network architecture of the backbone network, as long as it can extract multi-scale feature maps from the image to be identified.

[0048] The scale of a feature map refers to its spatial resolution. A larger feature map scale results in higher resolution, a smaller sampling stride, a smaller receptive field, and more retained pixel information. For example, this application can design a backbone network output { , , , , Five levels of feature maps ( scale> scale> scale> scale> The sampling scales are {8, 16, 32, 64, 128}.

[0049] Step S130: Input the initial feature maps of multiple scales into the bidirectional feature pyramid network to output the enhanced feature maps of multiple scales.

[0050] Simply using multi-scale features extracted by the backbone network results in a semantic gap (i.e., shallow layers have weak semantics, deep layers have low resolution, and the semantic information contained in R3 to R7 gradually increases). Therefore, a Bidirectional Feature Pyramid Network (BiFPN) can be used to enhance the multi-scale feature representation capability and address the problem of large differences in text scale. The BiFPN can be used to achieve multi-scale feature fusion (multi-scale information is fused into each level, but the levels are not merged). Similar to the feature pyramid network, BiFPN can effectively detect targets at different scales by constructing pyramid-shaped feature hierarchies. The scale of the multiple enhanced feature maps output by BiFPN is the same as the scale of the initial feature map output by the backbone network.

[0051] More specifically, the Bidirectional Feature Pyramid Network (BiFPN) comprises multiple feature enhancement units. Each feature enhancement unit performs feature fusion on input feature maps at multiple scales and outputs enhanced feature maps at multiple scales. In other words, the feature enhancement units in BiFPN primarily achieve enhancement by fusing feature maps of different scales. The input data for the first feature enhancement unit in the BiFPN consists of initial feature maps at multiple scales, and the output data for the last feature enhancement unit consists of enhanced feature maps at multiple scales. Furthermore, the output of the previous feature enhancement unit serves as the input to the current feature enhancement unit (i.e., the feature enhancement units are arranged in a concatenated manner). It should be noted that for each feature enhancement unit in the BiFPN, the next-scale feature map and the previous-scale feature map mentioned below are both input feature maps to that feature enhancement unit. The second fused feature maps at each scale obtained during bottom-up feature fusion are the feature maps output by that feature enhancement unit (i.e., the second fused feature maps are the feature maps after feature enhancement by the feature enhancement unit).

[0052] BiFPN's bidirectional feature extraction path involves sequentially upsampling high-level features and fusing them with low-level features using weighted feature fusion, followed by downsampling of low-level features and fusing them with high-level features using weighted feature fusion, forming a bidirectional, cross-scale connection structure. Compared to path aggregation networks, bidirectional feature pyramid networks remove some nodes with the same information content, effectively reducing data redundancy, strengthening information exchange between feature maps at different levels, and effectively improving the problem of feature information loss caused by changes in feature resolution at different levels. BiFPN can combine the rich semantic information of high-level features with the high resolution of low-level features, greatly improving the expressive power of feature vectors.

[0053] like Figure 2 As shown, each feature enhancement unit in the BiFPN structure performs the following operation once, specifically: ① Top-down path (upsampling + feature fusion): Starting from the smallest scale, low-resolution semantically rich features are sequentially passed to high-resolution features.

[0054] For each scale (except the largest scale), the resolution of the first fused feature map corresponding to that scale is amplified using bilinear interpolation or nearest neighbor interpolation to make it the same spatial resolution as the feature map of the next scale. The amplified fused feature map and the feature map of the next scale are then weighted and fused to obtain the first fused feature map corresponding to the next scale. The first fused feature map corresponding to the smallest scale is the smallest scale feature map.

[0055] ② Bottom-up path (downsampling + feature fusion): Starting from the largest scale, high-resolution detail information is passed to the low-resolution layer in sequence.

[0056] For each scale (except the smallest scale), the resolution of the second fused feature map corresponding to that scale is reduced by max pooling or strided convolution to make it the same scale as the feature map of the previous scale. Then, the reduced second fused feature map, the first fused feature map of the previous scale, and the feature map of the previous scale are weighted and fused to obtain the second fused feature map corresponding to the previous scale. Among them, the second fused feature map corresponding to the largest scale is the first fused feature map corresponding to the largest scale.

[0057] Assume the backbone network outputs feature maps at 5 scales, denoted as... , , , , BiFPN outputs 5 enhanced feature maps. , , , , The spatial resolution of the feature map output by BiFPN is the same as that of the feature map input by BiFPN.

[0058] For each feature enhancement unit, the weighted fusion formula for the top-down path can be expressed as (this formula applies to...). ): ; For each feature enhancement unit, the weighted fusion formula for the bottom-up path can be expressed as (this formula is applicable to...). 4, 5, 6, 7): ; in, For scale The input feature map (for the first feature enhancement unit) ); Representing scale The corresponding first fused feature map, in the top-down path ; Representing scale The corresponding second fused feature map (for the first feature enhancement unit) ), and in the bottom-up path ; This indicates a zoom-in or zoom-out operation on the feature map. This can typically be a depthwise separable convolution. , as well as , , All of these represent learnable weights (which can be scalars, vectors, or tensors). To prevent numerically unstable small constants (such as...) The purpose of introducing weights is to achieve different contribution levels of features at different scales when synergistically fusing multi-level features.

[0059] As an example, channel alignment can also be performed before weighted fusion in both the top-down and bottom-up paths: if the initial feature maps at each scale... The number of channels is not a pre-set fixed value (such as 64 or 128), and its number of channels is adjusted by one-dimensional convolution.

[0060] In some embodiments of the present invention, before inputting initial feature maps at multiple scales into the bidirectional feature pyramid network, the method proposed in this application further includes updating the initial feature maps at each scale using local attention mechanisms and global attention mechanisms. That is, this application designs an approach that effectively integrates spatial feature information through attention mechanisms to capture the contextual relationships at different locations. The purpose of updating the initial feature maps is to perform feature enhancement processing on the initial feature maps.

[0061] Images to be recognized are not always obtained under standard lighting conditions. For example, in certain low-light scenes at night, it may be difficult to focus on weak but crucial target features, leading to reduced detection performance. Therefore, this application designs a mechanism that combines local window attention and global attention to enhance feature representation capabilities for the multi-scale feature maps output by the backbone, adapting to changes in day and night lighting. The two-stage mechanism of local and global attention enables phased feature enhancement from local detailed features to global context, improving the ability to highlight weak features that are difficult to highlight in low-light environments and enhancing global context understanding.

[0062] As an example, taking a window-based local attention mechanism (i.e., local window attention mechanism) as an example, and assuming that both the local attention mechanism and the global attention mechanism are of the self-attention type, the specific process of updating the initial feature map can be as follows: Step S11: Divide each initial feature map into multiple non-overlapping local windows (the size of the local windows is fixed).

[0063] Each initial feature map is divided into multiple non-overlapping windows (i.e., image patches), and each window has the same size. Assume the feature map is... The size of each window obtained by partitioning can be 1. ( , The number of windows obtained by dividing each initial feature map.

[0064] Step S12: For each initial feature map, perform self-attention calculation within each window. Self-attention is calculated independently within each window, and there is no information exchange between windows, which can significantly reduce computational complexity.

[0065] Before performing attention calculations, convolutional layers can be used to perform depth convolutions on the features within each window (such as combining 1×1 and 3×3 convolutions) to capture local detail features within each window.

[0066] For example, the process of calculating self-attention within each window can be as follows: The convolutional processes of each window... The feature mapping within is the corresponding query. ,key Sum This allows for the calculation of region self-attention using the mapped (query, key, and value). The formula for calculating region self-attention can be expressed as: Attention )= .

[0067] Step S13: After calculating the features within each window using the local window attention mechanism, the processed features of each window are reassembled according to their positions in the initial feature map to obtain the reassembled feature map corresponding to each initial feature map; the reassembled feature map and the corresponding initial feature map are residually connected to obtain the input data for the global self-attention mechanism.

[0068] Step S14: Use a global self-attention mechanism to augment the information of the feature map after residual connection, and use the augmented feature map as the updated feature map of the initial feature map.

[0069] Before using the global attention mechanism to process the feature map, depthwise convolutions (such as a combination of 1×1 and 3×3 convolutions) can be performed using convolutional layers to capture local information and ensure accurate recovery of detailed features.

[0070] The global attention mechanism, when processing feature maps, no longer segments the feature maps. Instead, it divides the channels of the residual-connected feature maps into multiple heads and enhances information exchange between these heads by fusing multi-head features, thus achieving self-attention learning. In other words, the global attention mechanism can project the residual-connected feature maps onto multiple different subspaces, allowing each subspace to capture information from different perspectives. Finally, by summing all perspectives, the result of global attention learning is obtained. The formula for global self-attention learning can be expressed as: Attention )= ; in, and They are all obtained by projecting the feature maps after residual connection. and Each represents a learnable parameter.

[0071] This application does not specifically limit the attention type of local attention mechanism and global attention mechanism; they can all be self-attention, or they can be morphological attention, etc.

[0072] It should be noted that the two-stage mechanism proposed in this application, consisting of a local window attention mechanism and a global attention mechanism, can be selected when the input image to be recognized has low illumination, resulting in low contrast between the target and the background. The local window attention mechanism enhances local detail features, while the global attention mechanism integrates global information to distinguish the target and background under different lighting conditions, overcoming the defect of low contrast between the target and the background due to excessive noise under non-standard lighting conditions. However, when the input image to be recognized contains many reflective areas or large areas of dirt obscuring characters, a large separable kernel attention mechanism can be used instead of the local window attention mechanism and the global attention mechanism to further enhance the feature capture capability for reflective surface foreign objects.

[0073] S140: The enhanced feature maps at multiple scales are fused into a feature sequence in order of scale size, and the bounding box position information corresponding to the vehicle number characters in the image to be identified is obtained based on the feature sequence by the decoder.

[0074] Considering that convolutional layers can achieve feature fusion across different scales, convolutional neural networks can be used to convert the multi-scale feature maps of BiFPN into feature sequences. This application does not specifically limit the method of converting feature maps into feature sequences; the convolutional neural network mentioned above is merely an example.

[0075] In some embodiments of the present invention, the decoder designed in this application includes an attention module and a prediction head. The attention module is used to generate object queries for multi-round iterative prediction, and the prediction head is used to predict the offset of the bounding box based on the object query, so that the decoder can use the result of the last round of iterative prediction as the bounding box position information corresponding to the carriage number character in the image to be recognized.

[0076] The decoder's function is as follows: ① Input the object query and feature sequence (or enhanced feature maps at multiple scales) of the current round into the attention module to extract the object query for the next round. The formula can be expressed as: ; The attention module can query objects in the current round through self-attention. It interacts with other queries to remove duplicate queries, and interacts with image features (i.e., feature sequences) through cross-attention to extract target information. By transforming the feature representation through a feedforward neural network, the next round of object queries can be obtained. .

[0077] It should be noted that the object query in the current round includes the feature embedding vector and the bounding box prediction result of the current round (which can be 4D bounding box coordinates). The object query in the first round (also known as the initial object query) uses the intersection-union-ratio (IoU)-aware query selection strategy to select the most relevant image features from the feature sequence to improve detection accuracy.

[0078] As an example, the initial object query is a high-quality feature dynamically selected from the feature sequence as the initial value of the initial object query. This can be obtained as follows: The feature sequence is input into a pre-trained classifier, which outputs a classification score (quantifying the probability of a character at each feature position, i.e., confidence) and a bounding box regression value (i.e., the coordinates of the regressed character bounding box) for each feature position based on the classification score and the bounding box regression value. The comprehensive score for each feature position is calculated based on the bounding box regression value (the IoU score between the predicted box and the reference box is calculated based on the bounding box regression value, and the product of the classification score and the IoU score is used as the comprehensive score) and sorted. The top-k features with the least uncertainty are selected from the feature sequence, and the initial object query for the decoder is obtained based on the selected features.

[0079] IoU-aware query selection addresses the inconsistency between classification scores and localization quality in traditional query selection, primarily through a pre-trained classifier. The classifier is trained as follows: training samples of feature sequences and their corresponding ground truth bounding box labels are obtained; the training samples are input into the classifier, which outputs the classification score and bounding box regression for each feature location; the intersection-union ratio (IoU) between the bounding box and the ground truth bounding box label at each feature location is calculated; and a loss function is constructed based on Hungarian matching loss. The classifier parameters are then iteratively adjusted according to this loss function to force the classification score at each feature location to align with the calculated IoU.

[0080] It should be noted that the decoder (including the attention module, prediction head, and classifier) ​​works together with the backbone network and the bidirectional feature pyramid network to determine the bounding box coordinates corresponding to the carriage number characters, and utilizes... The loss function used for training together is the loss function constructed above based on Hungarian matching loss, and its calculation formula can be expressed as: ; in, This represents the classification loss (Focal Loss can be used to address imbalanced samples). The bounding box regression loss can be represented by L1 loss. This represents the Giou loss (which can be used to optimize the geometry of the bounding box). and All are weights.

[0081] This application does not specifically limit the network architecture of the classifier and the prediction head, and the classifier and the prediction head can be different modules or the same module.

[0082] ② The feature embedding vector from the object query in the current round is input into the prediction head, and the bounding box offset prediction result of the current round is output. Based on the bounding box offset prediction result of the current round, the bounding box prediction result of the current round object query is adjusted to obtain the bounding box prediction result of the next round.

[0083] As an example, a character attention mechanism can be introduced before inputting the feature embedding vector into the prediction head. For instance, a multi-head attention mechanism can be used to extract features from different dimensions of the feature embedding vector, and these features can be weighted and aggregated to form a character aggregation feature that combines local details with global correlations. This character aggregation feature can then be used as the input data for the prediction head. When applying the character attention mechanism, an attention mask can be generated using prior knowledge of dense character regions to enhance the representation of text region features.

[0084] This application can utilize a decoder built based on Transformer and IoU-aware query selection to complete the final detection, significantly improving the accuracy of target detection and network convergence efficiency, and realizing the efficient execution of real-time detection tasks.

[0085] Steps S110 to S140 are the steps of the detection branch in the recognition method of this application. The detection branch is used to extract features from the input image to be recognized and output the bounding box position information of the carriage number. Specifically, it includes: a backbone network for generating an initial feature map; an attention mechanism module (i.e., a two-stage mechanism of local attention and global attention) for enhancing the initial feature map; a bidirectional feature pyramid network for outputting a multi-scale enhanced feature map; and a decoder for outputting the bounding box position information based on the enhanced feature map.

[0086] Step S150: Based on the bounding box location information and enhanced feature maps at multiple scales (or the feature sequence obtained in step S140), determine the input data for the character prediction model, and input the obtained input data into the character prediction model to obtain the prediction result of the carriage number character (the prediction result of the carriage number character can be represented in text form).

[0087] More specifically, the character prediction model is built upon a temporal prediction model and a Connectionist Temporal Classifier (CTC). The specific execution process of step S150 is as follows: Features related to the carriage number character are extracted from enhanced feature maps at multiple scales using bounding box location information (spatial features within the bounding box, such as edges, textures, and shapes, can be extracted using feature extraction networks such as convolutional neural networks). The extracted features are then input into the temporal prediction model, outputting the temporal features corresponding to the carriage number character (which can be represented in time series form). These temporal features are then input into the connectionist temporal classifier (also known as a CTC decoder), outputting the prediction result for the carriage number character. CTC decoding is a key technology for character recognition in this application, and end-to-end training can be achieved through automatic alignment.

[0088] This application employs an end-to-end recognition model combining a temporal prediction model and a CTC decoder, capable of adapting to the complex shapes of freight yard car number characters. The core principles are as follows: spatial features (edges, textures, and shapes) of characters are extracted through a feature extraction network (such as the multi-layer convolution and pooling operations contained in a CNN convolutional layer), generating high-dimensional features; a temporal prediction model is used to capture the sequential dependencies of character sequences, solving the problem of feature loss caused by character tilting and blurring; based on the CTC transcription layer in the CTC decoder, temporal features are directly transcribed without the need for precise segmentation of individual characters, outputting character probability distributions, which can effectively solve the problems of character adhesion and segmentation errors.

[0089] This invention does not specifically limit the network architecture of the time series prediction model. For example, the time series prediction model can be built based on BiLSTM (Bidirectional Long Short-Term Memory), but this invention is not limited to this. Neurons in LSTM networks are often closely connected to previous memory information, but less connected to subsequent inputs. If the LSTM network has a large workload, it means that the memory blocks in the network not only need to process the input information at the front end, but also need to handle the output of the output gate. A single-layer recurrent LSTM obviously cannot meet this type of requirement. Therefore, this application can introduce a bidirectional LSTM sequence model to complete the task of connecting preceding and following connections.

[0090] After determining the bounding box location information corresponding to the carriage number character, this application also identifies the carriage number character through a character recognition branch. The loss function of the character recognition branch (i.e., the character prediction model) is... It can be represented as: ; in, This represents the time series prediction loss. Represents the connection-time classification loss. Weights. CTC loss function = -log P(f|x) calculates the negative log probability of outputting the correct label sequence f given input x using dynamic programming, and achieves automatic alignment using blank labels without the need for pre-segmentation of characters.

[0091] In some embodiments of the present invention, the bounding box position information obtained in step S140 is based on the pixel coordinates of the image to be recognized. Therefore, before executing step S150, such as Figure 3 As shown, the method further includes: for each detected text region, extracting a fixed-size feature map using RoI Align (Region of Interest Alignment), performing spatial transformation processing on the feature map extracted by RoI Align using a spatial transformation network, and inputting the spatially transformed feature map into the character recognition branch for character sequence prediction. That is, for the enhanced feature maps at each scale, pixel alignment is used to obtain feature maps of predetermined sizes at each scale, and a spatial transformation network is used to perform spatial transformation processing on the predetermined-size feature maps. The feature map output by the spatial transformation network is used as the feature related to the vehicle number character. The core principle of RoI Align is to completely eliminate any coordinate quantization operations, thereby achieving accurate sampling in floating-point coordinates through bilinear interpolation.

[0092] More specifically, for enhanced feature maps at various scales, the RoI Align operation may include: Step S21, mapping the bounding box position information to coordinates based on the enhanced feature map at that scale; maintaining floating-point numbers during the mapping process without any rounding; Step S22, dividing the enhanced feature map portion located within the bounding box into multiple bins based on the feature map coordinates of the bounding box, and sampling multiple floating-point positions within each bin; wherein the size of each bin is determined based on the bounding box position information and a predetermined size, and can be represented as... Furthermore, the value can be calculated by bilinear interpolation during sampling; in step S23, the sampled features are pooled (average pooling or max pooling, etc.) to output a feature map of a predetermined size.

[0093] Furthermore, Spatial Transformer Networks (STNs) can automatically learn to perform spatial transformations (such as translation, scaling, rotation, shearing, perspective transformation, etc.) on the input feature map. They consist of three parts: a localization network, a mesh generator, and a sampler, used to predict affine transformation parameters and perform geometric correction on the feature map. This application utilizes STN to correct perspective distortion, as follows: ① The feature map of a predetermined size obtained from the RoI Align operation is input into the localization network, and the transformation parameters are output; ② A sampling mesh is generated using the mesh generator and the transformation parameters. The sampling mesh indicates the sampling position of each pixel in the STN output feature map corresponding to the predetermined-size feature map; ③ Based on the sampling mesh, the spatially transformed feature map is obtained by sampling from the predetermined-size feature map (e.g., using bilinear interpolation for differentiable sampling).

[0094] The character recognition branch in this application is used to extract the carriage number and perform character recognition based on the bounding box position information. Specifically, it includes: ROI Align, which extracts a fixed-size feature map based on the bounding box position information and the enhanced feature map; a spatial transformation network connected to the output of the ROI Align module, which performs spatial transformation processing on the fixed-size feature map to generate a feature map with corrected perspective distortion; and a character prediction model connected to the output of the STN, which performs feature encoding and sequence decoding on the feature map with corrected perspective distortion to output the prediction result of the carriage number character.

[0095] When operating equipment at railway freight yards performs loading and unloading operations, character recognition is mainly used to determine whether the containers or train cars to be loaded or unloaded are consistent with the system instructions. When the industrial control computer determines that the train number or container number is consistent with the system instructions, it controls the boom to drive the spreader to insert into the corresponding lock hole.

[0096] The proposed railway freight yard car number recognition method improves the Re-DETR hybrid encoder by using BiFPN and a two-stage attention mechanism. A character attention mechanism and a character recognition branch are introduced into the decoder, unifying object detection and character recognition within a single framework. This achieves one-step recognition from the original image to the predicted character sequence, avoiding the error accumulation problem caused by the separation of detection and recognition in traditional methods. Specifically, the input image to be recognized can extract multi-scale features through a backbone network, perform feature enhancement and fusion through the improved hybrid encoder, and utilize the decoder to output the bounding box coordinates and confidence scores of the car number and car number.

[0097] Corresponding to the above method, the present invention also provides a railway freight yard car number identification system. The system includes a computer device, which includes a processor and a memory. The memory stores computer programs / instructions, and the processor is used to execute the computer programs / instructions stored in the memory. When the computer programs / instructions are executed by the processor, the system implements the steps of the method described above.

[0098] This invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0099] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0100] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0101] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0102] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for identifying carriage numbers at railway freight yards, characterized in that, The method includes the following steps: Obtain images containing carriage number characters from the railway freight yard image acquisition system; The acquired image to be identified is input into the backbone network to extract initial feature maps at multiple scales; Initial feature maps at multiple scales are input into a bidirectional feature pyramid network, which outputs enhanced feature maps at multiple scales. The enhanced feature maps at multiple scales are converted into feature sequences, and the bounding box position information corresponding to the vehicle number characters in the image to be identified is obtained based on the feature sequences through the decoder. The input data for the character prediction model is determined based on the bounding box location information and the enhanced feature maps at multiple scales, and the prediction result of the vehicle number character is obtained based on the input data.

2. The method according to claim 1, characterized in that, The step of obtaining the image to be recognized containing the vehicle compartment number characters includes: obtaining the original image to be recognized containing the vehicle compartment number characters, and performing adaptive histogram equalization processing on the original image to be recognized. The steps of the adaptive histogram equalization process are as follows: The original image to be identified is divided into multiple image blocks, and the grayscale histogram of each image block is calculated. For each image block, if there is a peak value in the grayscale histogram of the image block that exceeds the preset pixel limit threshold, the number of excess pixels is evenly redistributed to all grayscale levels of the grayscale histogram, thereby obtaining a grayscale redistributed image block. The boundaries between image blocks that have undergone grayscale redistribution are smoothed using a bilinear interpolation algorithm to obtain the image to be recognized after image enhancement processing.

3. The method according to claim 1, characterized in that, The bidirectional feature pyramid network includes multiple feature enhancement units, each of which is used to perform feature fusion on the input feature maps at multiple scales and output feature maps at multiple scales after feature enhancement. In the bidirectional feature pyramid network, the input data of the first feature enhancement unit is an initial feature map at multiple scales, and the output data of the last feature enhancement unit is an enhanced feature map at multiple scales. The output of the previous feature enhancement unit is used as the input of the current feature enhancement unit. Each feature enhancement unit performs the following operations: Feature fusion based on top-down path: Starting from the feature map of the smallest scale, the first fused feature map of the current scale is successively weighted and fused with the feature map of the next scale to obtain the first fused feature map of the next scale; as well as Feature fusion based on bottom-up path: Starting from the feature map of the largest scale, the second fused feature map of the current scale, the first fused feature map of the previous scale, and the feature map of the previous scale are weighted and fused in sequence to obtain the second fused feature map of the previous scale. Among them, the first fusion feature map with the smallest scale is the feature map with the smallest scale, and the second fusion feature map with the largest scale is the first fusion feature map with the largest scale.

4. The method according to claim 1, characterized in that, Before inputting initial feature maps at multiple scales into the bidirectional feature pyramid network, the method further includes, for each initial feature map: Each initial feature map is divided into multiple non-overlapping windows; The features within each window are calculated using a local window attention mechanism, and a reassembled feature map is formed based on the calculated features and the position of each window in the initial feature map. The reassembled feature map is residually connected to the corresponding initial feature map, and the information of the residually connected feature map is augmented using a global attention mechanism, thereby updating the initial feature map.

5. The method according to claim 1, characterized in that, The decoder includes an attention module and a prediction head; the decoder obtains the bounding box position information through multiple rounds of iterative prediction. The steps for each round of iterative prediction are as follows: The object query of the current round is input into the attention module to extract the object query of the next round; wherein, the object query of the current round includes the feature embedding vector and the bounding box prediction result of the current round; The feature embedding vector from the object query in the current round is input into the prediction head, and the bounding box offset prediction result of the current round is output. The bounding box prediction results for the current round are adjusted based on the bounding box offset prediction results of the current round to obtain the bounding box prediction results for the next round. The first round of object query is an initial object query obtained based on the feature sequence using the intersection-union ratio (IU)-aware selection strategy.

6. The method according to claim 5, characterized in that, The initial object query is obtained through the following method: The feature sequence is input into a pre-trained classifier, and the classification score and bounding box regression value of each feature position in the feature sequence are output. Based on classification scores and bounding box regression values, features at multiple feature locations are selected from the feature sequence, thereby obtaining the initial object query for the decoder based on the selected features.

7. The method according to claim 1, characterized in that, The character prediction model is built based on a time-series prediction model and a connected time-series classifier; The prediction result of the carriage number character is obtained in the following way: Features related to the carriage number characters are extracted from enhanced feature maps at multiple scales using bounding box location information. The extracted features are then input into a temporal prediction model, and the output is the temporal features corresponding to the carriage number characters. The temporal features are input into a temporal classifier, and the predicted result of the vehicle compartment number character is output.

8. The method according to claim 7, characterized in that, The bounding box position information is the pixel coordinates of the image to be identified; The method of extracting features related to the carriage number characters from enhanced feature maps at multiple scales using bounding box position information includes: obtaining a predetermined size feature map at each scale by performing a region of interest alignment operation on the initial feature map at each scale, and performing spatial transformation processing on the predetermined size feature map using a spatial transformation network, and using the feature map output by the spatial transformation network as the feature related to the carriage number characters. For the enhanced feature maps at various scales, the region of interest alignment operation includes: Map the bounding box location information to coordinates based on the scale-enhanced feature map; Based on the feature map coordinates of the bounding box, the enhanced feature map portion located within the bounding box is divided into multiple blocks, and multiple floating-point positions within each block are sampled. The sampled features are pooled to output a feature map of a predetermined size. The size of each block is determined based on the bounding box location information and a predetermined size.

9. A railway freight yard car number identification system, comprising a processor, a memory, and a computer program / instructions stored in the memory, characterized in that, The processor is configured to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 8.