Railway freight loading state image recognition method and system
By introducing bidirectional weighted BiFPN and an improved coordinate attention mechanism into railway freight inspection, the problem of low detection accuracy of abnormal freight car loading status has been solved, intelligent identification and alarm have been realized, and the quality and detection accuracy of freight inspection work have been improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA RAILWAY FIRST SURVEY & DESIGN INST GRP
- Filing Date
- 2023-08-16
- Publication Date
- 2026-07-24
AI Technical Summary
The problem with existing railway freight inspection technology is its low precision, especially in detecting abnormal loading conditions of freight cars. This leads to a reliance on manual inspection for quality control, which can easily result in missed or incorrect inspections.
A railway freight loading status image recognition method is adopted. By establishing an anomaly dataset and enhancing it, a bidirectional weighted BiFPN structure and an embedded coordinate attention mechanism module are introduced into the YOLOv5 network model. Feature fusion is performed using feature pyramids and an improved coordinate attention mechanism to improve detection accuracy.
It significantly improves the detection accuracy of railway freight loading status identification, reduces the labor intensity of operators, improves the quality of freight inspection work, and realizes intelligent identification and alarm of freight car loading status.
Smart Images

Figure CN117011798B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway transportation technology, and specifically to a method and system for recognizing images of railway freight loading status. Background Technology
[0002] Railway transportation is one of the main modes of transport in modern transportation. Currently, railway freight volume is constantly increasing, and transportation efficiency is also continuously improving. Under these new circumstances, improper loading of goods constitutes the most direct safety hazard in railway transportation, and freight safety faces unprecedented challenges. Traditional manual operations involve manually checking the loading status of each vehicle from images, a heavy workload. The quality of freight inspection largely depends on the professional skills, sense of responsibility, and attitude of the personnel, and is also affected by factors such as operator fatigue, making it prone to omissions and oversights.
[0003] By utilizing deep learning technology in computer image processing, and through classification, modeling, and learning from various vehicle type databases and feature databases of problematic vehicles, intelligent identification of passing vehicles and cargo can be achieved. This allows for the rapid and intuitive detection of abnormal loading conditions in trucks, providing alerts and warnings for vehicles and abnormal loading statuses. Reducing operator workload and improving the quality of cargo inspection is the future direction of this field. However, intelligent cargo inspection image recognition based on deep learning technology generally requires the establishment of a data-driven detection model. This involves inputting a large amount of raw data and corresponding labels, allowing the neural network to learn and extract the most useful features to achieve good detection results. In reality, truck loading abnormalities are diverse, and the number of samples is insufficient, limiting the improvement of accuracy in detecting abnormal truck loading conditions.
[0004] Therefore, new identification methods are needed to overcome the shortcomings of existing technologies. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for recognizing the loading status of railway freight, so as to solve the problem of low accuracy in detecting abnormal loading status of freight cars.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A method for recognizing railway freight loading status images, the method comprising:
[0008] S1: Establish an anomaly dataset based on abnormal images of railway freight vehicles and enhance and expand it;
[0009] S2: Introduce a bidirectional weighted BiFPN structure into the YOLOv5 network model;
[0010] S3: Embed a coordinate attention mechanism module in the bidirectional weighted BiFPN structure;
[0011] S4: Input the abnormal dataset into the model for training;
[0012] S5: Input the target detection dataset into the trained model to identify anomalies in railway freight vehicles.
[0013] Furthermore, in S1, the enhancement and augmentation of the anomalous dataset includes flipping, scaling, rotating the images, adding noise to the images, and changing their colors.
[0014] Furthermore, in S2, a bidirectional weighted BiFPN structure is introduced into the YOLOv5 network model, including:
[0015] The bidirectional weighted BiFPN structure extracts feature maps of at least three different resolutions as its own input;
[0016] Based on bidirectional feature propagation, information is transmitted between feature maps of different resolutions;
[0017] Weighted fusion of feature maps is performed based on feature importance.
[0018] Furthermore, in S2, the bidirectional weighted BiFPN structure includes a three-column structure:
[0019] The first column is used to reduce the resolution, serving as the final convolutional layer in different stages of the backbone network, with the output resolution halved layer by layer;
[0020] The second column is used to receive feature inputs from the previous layer and the current layer of the backbone network, which are then fused and convolutional operations are performed.
[0021] The third column is used to simultaneously receive feature inputs from the current layer and the previous layer of the backbone network, fuse them, perform convolution operations, and then send the results to the previous layer or output them directly.
[0022] Furthermore, in S2, in the first column of the bidirectional weighted BiFPN structure, the final convolutional layer is any convolutional layer other than the bottom and top layers.
[0023] Furthermore, in S3, a coordinate attention mechanism module is embedded in the bidirectional weighted BiFPN structure, including:
[0024] The ordinary convolutional layer in the coordinate attention mechanism module is improved by replacing it with SENet, resulting in an improved coordinate attention mechanism module.
[0025] An improved coordinate attention mechanism module is embedded into the sampling layer before the bidirectional weighted BiFPN structure and the backbone network output layer.
[0026] Furthermore, in S4, the abnormal dataset is input into the model for training, including:
[0027] During the coarse training phase, all convolutional layers are frozen, and only the fully connected layers are trained.
[0028] During the fine-tuning training phase, all convolutional layers are unfrozen, and training is performed on all layers.
[0029] On the other hand, a railway freight loading status image recognition system is provided, the system being used to implement the method, including:
[0030] A module is established to create an anomaly dataset based on abnormal images of railway freight vehicles, and to enhance and expand it.
[0031] An import module is introduced to introduce the BiFPN structure into the YOLOv5 network model;
[0032] An embedding module is used to embed a coordinate attention mechanism module into a bidirectional weighted BiFPN structure;
[0033] The training module is used to input the abnormal dataset into the model for training.
[0034] The identification module is used to input the target detection dataset into the trained model for anomaly identification of railway freight vehicles.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] This invention proposes a method and system for image recognition of railway freight loading status. It introduces intelligent image recognition technology into a railway freight safety monitoring system for freight car loading status by utilizing a fusion algorithm combining a Bidirectional Feature Pyramid Network (BiFPN) and a coordinate attention mechanism. First, a weighted bidirectional feature pyramid is used to capture contextual information, improving the fusion degree of multi-scale features with different weights. Then, an embedded improved coordinate attention module is used to make the receptive field more focused on the region of interest, maintaining feature integrity. Finally, improved multi-scale feature enhancement and fusion techniques are employed to generate more samples through data augmentation, increasing the sample size and thus enhancing the robustness of the model.
[0037] The method of this invention significantly improves the detection accuracy of railway freight loading status identification, thereby reducing the labor intensity of operators and improving the quality of freight inspection work. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.
[0039] Figure 1 This is a flowchart of the method of the present invention.
[0040] Figure 2 This is a system composition diagram of the present invention.
[0041] Figure 3 These are the loss curves of the model on the training set and the validation set in the embodiment.
[0042] Figure 4 This is a schematic diagram comparing and identifying different model algorithms in the embodiment. Detailed Implementation
[0043] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0044] It should be noted that similar reference numerals and letters indicate similar items; therefore, once an item is defined in one embodiment, it does not need to be further defined and explained in subsequent embodiments. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0045] This invention provides a method for recognizing the loading status of railway freight vehicles. It utilizes a feature pyramid and coordinate attention mechanism fusion algorithm and improves the YOLOv5 network model. This method is applied to the monitoring of freight car loading status in railway freight safety monitoring to achieve abnormal identification of railway freight vehicles and provide alerts, thereby reducing the workload of operators and improving the quality of freight inspection.
[0046] Channel attention mechanisms can be used for intelligent image recognition, but the dimensionality reduction operations they employ negatively impact the prediction results, and the acquisition of dependencies between channels is inefficient. To address this issue, this method employs a coordinate attention mechanism, utilizing a local cross-channel interaction strategy. Furthermore, the originally used fully connected layers are replaced with one-dimensional convolutions to learn channel information. By using one-dimensional convolutions to capture information between different channels, channel dimensionality reduction can be avoided, and cross-channel information interaction can be achieved.
[0047] like Figure 1 This method includes:
[0048] S1: Establish an anomaly dataset based on abnormal images of railway freight vehicles and enhance and expand it.
[0049] Augmenting outlier datasets includes performing affine transformations on images, such as flipping, scaling, and rotating, as well as adding color distortions, such as noise and color shifting. Data augmentation generates more samples, increasing the sample size and thus enhancing the model's robustness.
[0050] S2: Introduce a bidirectional weighted BiFPN structure into the YOLOv5 network model. This includes:
[0051] S201: The bidirectional weighted BiFPN structure extracts feature maps of at least three different resolutions as its own input;
[0052] S202: Based on bidirectional feature propagation, information is transmitted between feature maps of different resolutions;
[0053] S203: Perform weighted fusion of feature maps based on feature importance.
[0054] The above operations can fully combine the location and detail information in the low-level feature map that is helpful for the localization of foreign objects with the semantic information in the high-level feature map that is helpful for the classification of foreign objects, thereby greatly improving the accuracy of the detection task.
[0055] The bidirectional weighted BiFPN structure includes a three-column structure:
[0056] ① The first column is used to reduce the resolution. It is the final convolutional layer in different stages of the backbone network. The output resolution is halved layer by layer.
[0057] ② The second column is used to receive feature inputs from the previous layer and the current layer of the backbone network, which are then fused and convolutional operations are performed.
[0058] ③ The third column is used to simultaneously receive feature inputs from the current layer and the previous layer of the backbone network, fuse them, perform convolution operations, and send the results to the previous layer or output them directly.
[0059] Through these pathways, the BiFPN structure can fuse feature information from different levels and scales, thereby better capturing key features in object detection tasks. Furthermore, to avoid increasing computational cost without affecting feature fusion performance, convolutional layers are not used in the bottom and top layers, as these locations have only one input or output, having minimal impact on feature fusion and simplifying the structure.
[0060] S3: Embedding a coordinate attention mechanism module in the bidirectional weighted BiFPN structure. This includes:
[0061] S301: Improve the ordinary convolutional layer in the coordinate attention mechanism module by replacing it with SENet to obtain the improved coordinate attention mechanism module;
[0062] S302: An improved coordinate attention mechanism module is embedded into the sampling layer before the backbone network output layer of the bidirectional weighted BiFPN structure.
[0063] For images of foreign objects in railway freight cars, such as stones and broken objects, their grayscale distribution is similar to that of background noise such as rust and stains. This can easily interfere with feature extraction for foreign object recognition in railway freight cars, leading to missed or false detections. To enhance the network's feature extraction capabilities, an improved coordinate attention mechanism is introduced, enabling the network to adaptively focus on foreign object targets on the vehicle, thereby improving detection accuracy. Since railway freight car foreign object detection is a small-target detection task, it is highly sensitive to positional information. Based on the characteristics of foreign objects in railway freight cars, two improvement strategies are introduced into YOLOv5: BiFPN and an improved coordinate attention mechanism. These strategies strengthen certain features and attenuate useless information, thus improving model accuracy. This method uses YOLOv5 as the basic framework and optimizes it from two key perspectives: attention mechanism and feature pyramid fusion. The attention mechanism helps the model better focus on the target object. Feature pyramid fusion can fuse feature information at different levels and scales, improving the model's perception and recognition accuracy of the target object. The above optimization measures can further improve the balance between detection accuracy and speed, thus better solving the problem of foreign object detection in trucks.
[0064] S4: Input the outlier dataset into the model for training, including:
[0065] S401: Coarse training phase, freeze all convolutional layers, and train only the fully connected layers. Use a batch size of 16 iterations, set the initial learning rate to 0.001, and train for 50 epochs.
[0066] S402: Fine-tuning training phase. Unfreeze all convolutional layers and train all layers. Use a batch size of 8 iterations, a learning rate of 0.0001, and train 150 times.
[0067] During training, early stopping was used to prevent overfitting, and the momentum parameter was set to 0.937. The optimization algorithm used stochastic gradient descent.
[0068] S5: Input the target detection dataset into the trained model to identify anomalies in railway freight vehicles.
[0069] This method can be used to identify and analyze vehicle problems of various models. By classifying, modeling, and learning from various vehicle model databases and problem vehicle feature databases, an effective identification model can be obtained. Vehicle problems of various models can include more than 30 subcategories of abnormal loading states in ten major categories, such as foreign objects on the roof, open doors, and open dust covers, as shown in the table below:
[0070]
[0071]
[0072] This method, employing a feature pyramid and coordinate attention mechanism fusion algorithm for vehicle condition recognition, is the first of its kind. It first uses a weighted bidirectional feature pyramid to capture contextual information, improving the fusion degree of multi-scale features with different weights. Then, it utilizes an embedded improved coordinate attention module to focus the receptive field more closely on the region of interest, maintaining feature integrity. Through improved multi-scale feature enhancement and fusion methods, the robustness and detection accuracy of the network are further enhanced. Experimental results show that the proposed algorithm achieves a detection accuracy of 94.57%, which, compared with some mainstream object detection networks, accurately detects foreign objects on railway freight vehicles.
[0073] Example:
[0074] This embodiment focuses on foreign object detection on the roof of railway freight cars, and experiments are conducted to test the model's detection capabilities:
[0075] In object detection, multiple evaluation metrics need to be considered to characterize the detection capability of the network model. In this embodiment, the following metrics are selected as the evaluation metrics for this experiment, and the specific formulas for each metric are as follows:
[0076] Precision (P): Also known as accuracy, it is an indicator of a model's ability to correctly detect foreign objects. A high precision indicates that a large number of foreign objects are detected. Its calculation formula is as follows:
[0077]
[0078] Where TP represents positive examples and FP represents false positive examples. TP and FP are the total number of samples that are predicted as positive examples.
[0079] Recall (R): Represents the proportion of all positive samples in the test set that are correctly identified, also known as the overall detection rate. A high recall rate means a high proportion of samples are correctly identified as foreign objects. Precision and recall are contradictory metrics. Generally, precision decreases as recall increases. A PR curve can visually reflect the model's generalization ability. The formula for calculating recall is:
[0080]
[0081] Here, FN represents a counterexample.
[0082] Average Precision (AP): This is a comprehensive metric used to evaluate the detection accuracy and recall of a model at different confidence levels. Its calculation formula is as follows:
[0083]
[0084] in, AP represents confidence level, and P(R) represents average recall. A higher AP indicates better performance of the object detection algorithm.
[0085] Mean Average Precision (mAP): This represents the average AP across multiple classes. A higher mAP value indicates that the model performs better in object detection tasks.
[0086]
[0087] Where N represents the number of categories.
[0088] F1 score: Represents the harmonic mean of precision and recall. The higher the F1 score, the better the recall and precision. The maximum value of F1 is 1 and the minimum value is 0.
[0089]
[0090] Where P represents precision and R represents recall.
[0091] Results analysis:
[0092] The proposed foreign object detection network for railway freight cars based on BiFPN-SECA-YOLOv5 was trained using transfer learning. The loss curves of the model on the training set and the validation set are shown below. Figure 3As shown in the figure, the model initially exhibits high loss values on both the training and validation sets during the coarse training phase. As the number of iterations increases, these loss values gradually decrease, reaching their minimum values of 1.8254 on the training set and 1.8404 on the validation set. Next, the model enters the fine-tuning phase, where the loss values on both sets decrease sharply. After 200 iterations, the loss values stabilize, and the model stops training. Ultimately, the minimum loss value on the training set is 1.4762, and the minimum loss value on the validation set is 1.4768.
[0093] To verify the network foreign object detection model proposed in this invention and its advantages in detecting foreign objects in railway freight cars, this embodiment will evaluate the network model from the following three aspects based on three categories of foreign object detection: comparison of experimental models with attention mechanism, comparison of model ablation experiments, and comparison of experiments between different model algorithms.
[0094] (1) Comparison of experimental models incorporating attention mechanisms
[0095] To verify the optimization effect of the improved coordinate attention mechanism introduced in this invention on YOLOv5, ECA, CBAM, CA, and SECA modules were sequentially embedded into YOLOv5, resulting in ECA-YOLOv5, CBAM-YOLOv5, CA-YOLOv5, and SECA-YOLOv5 networks. Comparative experiments were conducted on a self-made railway foreign object dataset, comparing the AP and mAP metrics under different attention mechanisms. The results are shown in the table below.
[0096]
[0097]
[0098] As shown in the table above, the Map value of YOLOv5 is significantly improved after introducing the attention mechanism module. The mAP value of the unmodified YOLOv5 was 88.53%, while the mAP value of the modified SECA-YOLOv5 was 93.98%, an improvement of 5.45%. Experimental results demonstrate that the improved coordinate attention mechanism is highly effective for extracting foreign object features from railway freight cars, proving the effectiveness of adding the improved coordinate attention module to YOLOv5.
[0099] (2) Module ablation experiment:
[0100] To verify the effectiveness of introducing the BiFPN module, this embodiment conducts module ablation experiments on a self-made foreign object dataset on the top of railway freight vehicles using the YOLOv5, BiFPN-YOLOv5, BiFPN-CA-YOLOv5, and the proposed BiFPN-SECA-YOLOv5 network models. The BiFPN module and the SECA module are added sequentially and compared with the CA module. The experimental results are shown in the table below.
[0101]
[0102] As shown in the table above, the BiFPN introduced in this invention improves the average accuracy of foreign object bag and damaged single-class identification by 2.39% and 6.12%, respectively, but the average accuracy of foreign object stone identification decreases. After adding the improved coordinate attention mechanism (SECA), the average accuracy (AP) for (bag, stone, damaged) foreign objects is improved by 5.78%, 5.6%, and 6.74%, respectively, and the mean average precision (mAP) is improved by 6.04%.
[0103] (3) Comparison of different model algorithms:
[0104] To verify the advantages of the model, a comparative experiment was conducted with six network models: YOLOv3, YOLOv4, SSD, EffcientNet, the currently mainstream Faster R-CNN, and the BiFPN-SECA-YOLOv5 proposed in this chapter. After complete training and testing, the average accuracy (AP) and mean average precision (mAP) of the above networks in detecting three types of foreign objects were statistically analyzed. The experimental results are shown in the table below.
[0105]
[0106]
[0107] like Figure 4 The first column of images shows multiple white foreign objects (bags) on an open wagon, the second column shows multiple foreign objects (stones) on a boxcar, and the third column shows two damaged areas on a tanker truck. It can be seen that all five network models compared have missed detecting foreign objects, while the BiFPN-SECA-YOLOv5 network model proposed in this invention can detect foreign objects on vehicles more accurately.
[0108] Compared to the YOLOv3 model, the proposed BiFPN-SECA-YOLOv5 network model achieves a 10.19% improvement in average accuracy (AP) for foreign objects (bags, stones, and broken objects), an 8.95% improvement in average accuracy (mAP), and a 9.71% improvement in average precision (mAP) for these three types of objects. Compared to the YOLOv4 model, the proposed network model achieves a 7.73% improvement in average accuracy (AP) for foreign objects (bags, stones, and broken objects), a 7.82% improvement in average accuracy (mAP), and a 4.75% improvement in average precision (mAP) for these three types of objects. Compared to the Faster R-CNN model, the proposed network model achieves a 9.34% improvement in average accuracy (AP) for foreign objects (bags, stones, and broken objects), a 8.55% improvement in average accuracy (mAP), and a 8.86% improvement in average precision (mAP) for these three types of objects. Compared to the EffcientNet model, the proposed network model improves the mean accuracy (AP) on foreign objects (bags, stones, and broken objects) by 6.68%, 7.27%, and 3.25%, respectively, and the mean average precision (mAP) by 5.74%. Compared to the SSD model, the proposed network model improves the mean accuracy (AP) on foreign objects (bags, stones, and broken objects) by 11.93%, 17.19%, and 16.87%, respectively, and the mean average precision (mAP) by 15.33%.
[0109] Experiments were conducted on a dataset of foreign objects on the top of railway freight vehicles. The results show that the average accuracy of the proposed model is 94.57%. Compared with the classic Faster R-CNN, EffcientNet, and SSD models, the mean average accuracy (mAP) is improved by 8.86%, 5.74%, and 15.33%, respectively, which improves the model's accuracy in detecting foreign objects. This indicates that the improved network can improve the accuracy of foreign object detection to a certain extent.
[0110] On the other hand, the present invention provides a railway freight loading status image recognition system for implementing the method described in the present invention, comprising:
[0111] The module is used to build an anomaly dataset based on abnormal images of railway freight vehicles and to enhance and expand it, corresponding to S1 in this method;
[0112] The module is used to introduce the BiFPN structure into the YOLOv5 network model, corresponding to S2 in this method;
[0113] The embedding module is used to embed the coordinate attention mechanism module into the bidirectional weighted BiFPN structure, corresponding to S3 in this method;
[0114] The training module is used to input the abnormal dataset into the model for training, corresponding to S4 in this method;
[0115] The identification module is used to input the target detection dataset into the trained model for anomaly identification of railway freight vehicles, corresponding to S5 in this method.
[0116] When all or part of the functions of the method of the present invention are implemented by a computer program, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by a computer program, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash drive, or portable hard drive, and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.
[0117] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.
Claims
1. A method for recognizing railway freight loading status images, characterized in that: The method includes: S1: Establish an anomaly dataset based on abnormal images of railway freight vehicles and enhance and expand it; S2: Introduce a bidirectional weighted BiFPN structure into the YOLOv5 network model to capture contextual information; S3: Embed a coordinate attention mechanism module in the bidirectional weighted BiFPN structure to make the receptive field more focused on the region of interest and maintain the integrity of features; S4: Input the abnormal dataset into the model for training; S5: Input the target detection dataset into the trained model to identify anomalies in railway freight vehicles; In S2, a bidirectional weighted BiFPN structure is introduced into the YOLOv5 network model, including: The bidirectional weighted BiFPN structure extracts feature maps of at least three different resolutions as its own input; Based on bidirectional feature propagation, information is transmitted between feature maps of different resolutions; Weighted fusion of feature maps based on feature importance; In S2, the bidirectional weighted BiFPN structure includes a three-column structure: The first column is used to reduce the resolution, serving as the final convolutional layer in different stages of the backbone network, with the output resolution halved layer by layer; The second column is used to receive feature inputs from the previous layer and the current layer of the backbone network, which are then fused and convolutional operations are performed. The third column is used to simultaneously receive feature inputs from the current layer and the previous layer of the backbone network, fuse them, perform convolution operations, and send the result to the previous layer or output it directly. In S2, the final convolutional layer in the first column of the bidirectional weighted BiFPN structure is any convolutional layer except for the bottom and top layers; in the bidirectional weighted BiFPN structure, no convolutional layers are set in the bottom and top layers to avoid increasing the amount of computation and to not affect the feature fusion effect; In S3, a coordinate attention mechanism module is embedded in the bidirectional weighted BiFPN structure, including: The ordinary convolutional layer in the coordinate attention mechanism module is improved by replacing it with SENet, resulting in an improved coordinate attention mechanism module. An improved coordinate attention mechanism module is embedded into the sampling layer before the bidirectional weighted BiFPN structure and the backbone network output layer.
2. The railway freight loading status image recognition method according to claim 1, characterized in that: In S1, augmentation of the anomalous dataset includes flipping, scaling, rotating images, adding noise, and changing colors.
3. The railway freight loading status image recognition method according to claim 2, characterized in that: In S4, the abnormal dataset is input into the model for training, including: During the coarse training phase, all convolutional layers are frozen, and only the fully connected layers are trained. During the fine-tuning training phase, all convolutional layers are unfrozen, and training is performed on all layers.
4. A railway freight loading status image recognition system, characterized in that: The system is used to implement the method according to any one of claims 1-3, comprising: A module is established to create an anomaly dataset based on abnormal images of railway freight vehicles, and to enhance and expand it. An import module is introduced to introduce the BiFPN structure into the YOLOv5 network model; An embedding module is used to embed a coordinate attention mechanism module into a bidirectional weighted BiFPN structure; The training module is used to input the abnormal dataset into the model for training; The identification module is used to input the target detection dataset into the trained model for anomaly identification of railway freight vehicles.