A method and system for identifying and locating parked vehicles based on machine vision
By using deep learning-based target detection and monocular vision ranging technology, the problems of low efficiency and safety hazards in detecting the position and distance of parked cars in freight marshalling yards have been solved, achieving fast and accurate vehicle identification and ranging, and improving the automation and safety of yard operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-28
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, the detection of the position of stationary cars and the distance between advancing cars in freight marshalling yards relies on manual methods, which are inefficient and pose safety hazards. Furthermore, the existing wireless shunting systems lack sufficient automation and accuracy, making it difficult to achieve accurate vehicle identification and distance measurement.
A deep learning-based target detection method is adopted, combined with monocular vision ranging technology. The recognition model is trained by constructing a dataset of parked vehicle images. Image data is acquired using an image acquisition device with fixed focal length and posture. A functional relationship between the distance along the track direction and the target's vertical coordinate is established to achieve vehicle recognition and localization.
It enables rapid and accurate detection and identification of stationary vehicles, and can simultaneously detect the type of target train and measure distance, reducing the safety risks of manual intervention and improving the automation and efficiency of station operations.
Smart Images

Figure CN116403153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway automation technology, and in particular to a method for identifying and locating freight cars in railway marshalling yards, which can be used for initial shunting speed control during the automatic marshalling process of freight cars in freight marshalling yards. Background Technology
[0002] Freight marshalling yards have complex track conditions, and trailer coupling is a crucial part of freight yard transportation. To ensure safe and smooth coupling of the propulsion vehicle and the stationary car on the work track, the position of the stationary car must be accurately known before coupling. The initial shunting speed must be precisely controlled by the distance between the propulsion vehicle and the stationary car, ensuring that the propulsion vehicle does not exceed the prescribed speed limit when it is 10, 15, or 3 car distances from the stationary car during the operation. Currently, the position of the stationary car and the distance between the stationary car and the propulsion vehicle are mainly determined manually by the coupling operator, which is inefficient and poses safety hazards. Wireless shunting systems also require dedicated personnel to install ranging or camera equipment at the end of the propulsion vehicle, but this method still has low automation and efficiency, and also poses safety hazards. Achieving intelligent detection and automatic ranging of stationary cars is of great significance for the safe operation and efficient shunting of the yard.
[0003] With the development of science and technology, visual target detection has undergone a transformation from image processing to deep learning. Deep learning-based target detection can achieve higher accuracy, but currently, deep learning has not been applied to vehicle detection and recognition in freight yards. Machine vision-based ranging is generally divided into binocular vision ranging methods and monocular vision ranging methods. Although binocular vision ranging has higher accuracy, the cost of applying this system is also high, and the accuracy and speed of feature point matching limit the accuracy and real-time performance of binocular ranging. To solve these problems, this invention trains a deep learning recognition model using a dataset of parked vehicle images to achieve automatic recognition and detection of parked vehicles in the image. A monocular vision localization model is designed to calculate the distance from the vehicle to the image acquisition device based on the coordinates of the bottom center point of the vehicle detection box, thereby achieving vehicle localization. Based on the above methods, a machine vision-based parked vehicle recognition and localization system is invented, which can also be extended to vehicle localization on railway lines.
[0004] Existing object detection algorithms can be categorized into two types based on their detection steps: candidate region-based object detection algorithms and regression-based object detection algorithms. Each type has its advantages and disadvantages in terms of detection accuracy and speed. Considering that station staff need to perform real-time vehicle scheduling based on the detection results, this invention selects a faster one-stage detection model as the basic detection network, which has the advantages of high detection speed and high recognition accuracy. The quality of the training dataset directly affects the training effect of the detection model. Currently, there are few publicly available railway datasets, and datasets specifically for freight trains are virtually nonexistent. To address this issue, this invention collects and labels images of railway lines and freight stations under different time periods, lighting conditions, and weather conditions. Furthermore, it uses data augmentation techniques such as rotation, translation, flipping, scaling, contrast adjustment, brightness adjustment, and noise addition to expand the training set as the dataset for the deep learning recognition model.
[0005] Monocular vision ranging is also divided into several categories, mainly based on three methods: camera intrinsic geometric calibration model, inverse perspective projection transformation, and data regression modeling. Shen Zhixi et al. used the correspondence between different reference distances and positions in the image to perform extensive data regression, fitting the imaging model and lens distortion error, proposing a ranging algorithm based on data regression modeling. However, this method requires a large amount of preliminary work such as data collection, analysis, mathematical modeling, and training. Guo Lei utilized the relationship between the vehicle's position and the image acquisition device's intrinsic imaging geometric model, transforming the two-dimensional coordinate system to a three-dimensional coordinate system, calculating the mapping relationship between the vehicle's world coordinates and the imaging coordinate system, determining the vehicle's position in the world coordinate system, and obtaining the object's distance information, thus achieving ranging. This method requires accurate determination of the image acquisition device's attitude angle; otherwise, it will produce a large distance measurement error. Therefore, this invention constructs a cubic polynomial to fit the relationship between pixel coordinates and actual distance values, and provides a coordinate point fitting calibration method for solving the polynomial coefficients. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for identifying and locating parked vehicles based on machine vision.
[0007] The objective of this invention is achieved through the following technical solution: a machine vision-based method for identifying and locating parked vehicles, the method being based on a parked vehicle network detection model and executable by one or more processors, characterized by: configuring an image acquisition device with a fixed focal length and fixed posture to acquire image data of railway lines or stations; constructing a deep learning-based parked vehicle identification model to compress and extract features from the image data, and scaling the features to adapt to scale changes caused by target movement, wherein target detection is performed by a detection head; the machine vision-based method for identifying and locating parked vehicles constructs a functional relationship between the distance along the track direction and the ordinate of the target, and determines an estimated value of the distance y along the track direction based on the functional relationship.
[0008] Preferably, the deep learning-based station vehicle recognition model can obtain image data of railway lines or stations through the image acquisition device, compress and extract image features through the backbone network, wherein the CBAM module can adjust the parameters in the backbone network to ignore the background part in the image and shift the detection center of the model to the detection target, wherein the SIoU function can improve the convergence speed of the model, and the neck network can further compress or expand the features to adapt to the scale changes caused by the target moving in a wide range of scenes, and detect targets of corresponding scales through three detection heads of different sizes.
[0009] Preferably, the deep learning-based parked vehicle recognition model can generate a detection box containing vehicle type information around the rear end face of the vehicle in the image data, and obtain the pixel coordinates of the bottom center of the detection box in the image data.
[0010] Preferably, the one or more processors are capable of determining a theoretically calculated value of the distance y along the track direction between the rear of the vehicle and the image acquisition device based on the pixel coordinates. The theoretically calculated value of the distance y along the track direction can be obtained through a functional relationship y = k, which is, but is not limited to, an Nth-degree polynomial. N x N +k N-1 x N-1 +……+k2x 2 +k1x+k0 represents, where x is the ordinate of the bottom center of the detection box in the image data, and k N ...k2,k1,k0 are polynomial coefficients.
[0011] Preferably, the polynomial coefficients are determined as follows: Record the measured values of the vertical coordinate x of the bottom center of the detection frame at different positions of the vehicle's rear end face in the image data, and the distance y along the track direction; substitute the coordinates (x, y) into the formula y = k N x N +k N-1 xN-1 +……+k2x 2 After +k1x+k0, the polynomial coefficients are obtained by fitting based on the least squares method, wherein the measured values can be obtained by laser distance measurement, lidar or manual measurement.
[0012] Preferably, the image acquisition device is capable of acquiring image data of railway lines or stations under different time periods and different lighting conditions, and the one or more processors are capable of processing the image data to form a dataset in the following manner: labeling the types of freight vehicles and detection boxes in the image data; processing the image data based on data augmentation methods, wherein the data augmentation methods include, but are not limited to: rotation, translation, flipping, scaling, adjusting contrast, adjusting brightness, and adding noise.
[0013] Preferably, the data augmentation method further includes: randomly cropping and scaling M image data and then mixing them to form one image data.
[0014] Preferably, the number of image acquisition devices can be increased or decreased based on the length of the tracks within the station or the number of tracks in the transverse direction. When there are several image acquisition devices, they are configured such that: different image acquisition devices acquire different image ranges, and the image ranges acquired by two adjacent image acquisition devices can overlap; each image acquisition device can acquire image data within its own precise positioning range for identifying and locating parked vehicles; and after summarizing and processing the image data acquired by each of the several image acquisition devices, the identification and location of parked vehicles within the entire track range can be achieved. For example, suppose a camera can accurately locate a stationary car within a 100-meter range in the longitudinal direction and cover three tracks in the transverse direction. If a marshalling yard has 15 tracks, each track being 1000 meters long, then 10 cameras can be placed in the longitudinal direction on each track, and 1 camera can be placed in every 3 tracks in the transverse direction, requiring a total of 50 cameras to achieve full coverage of the yard. The software system uses the above positioning model to locate the stationary cars within the monitoring range of each camera, and combines the positions of each camera to achieve global positioning of all stationary cars within the entire marshalling yard.
[0015] This application also provides a machine vision-based system for identifying and locating parked vehicles, characterized by comprising: an image acquisition device having a fixed focal length and a fixed orientation for acquiring image data of railway lines or stations; a deep learning-based network model for detecting parked vehicles, used to compress and extract features from the image data, and to scale the features to adapt to scale changes caused by target movement, wherein the detection of the target is accomplished by a detection head; and the ability to construct a functional relationship between the distance along the track direction and the vertical coordinate of the target, and to determine an estimated value of the distance y along the track direction based on the functional relationship.
[0016] This application also provides a computer-readable storage medium including computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the method.
[0017] The present invention has the following advantages:
[0018] (1) This invention achieves fast and accurate detection and identification of railway vehicles stopped by using a target detection method based on deep learning.
[0019] (2) This invention can not only detect the type of target train, but also measure the distance of the target vehicle.
[0020] (3) Unlike existing ranging methods, the present invention can calculate the accurate distance of railway vehicles by using the vehicle pixel coordinates in the image using only a calibrated monocular camera. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a machine vision-based method for identifying and locating parked vehicles.
[0022] Figure 2 This is a schematic diagram of a traditional monocular vision geometric ranging model;
[0023] Figure 3 This is a schematic diagram of the training results for the vehicle detection network.
[0024] Figure 4 A schematic diagram of the network structure for the stopped vehicle detection network model;
[0025] Figure 5 This is a schematic diagram of the hybrid attention module.
[0026] Figure 6 This is a schematic diagram of the network structure of CBAM-YOLOv5. Detailed Implementation
[0027] The present invention will be further described below with reference to the accompanying drawings. The scope of protection of the present invention is not limited to the following description:
[0028] Example 1
[0029] As shown in the figure, this application provides a machine vision-based method for identifying and locating stationary vehicles. The method can be executed by one or more processors and includes the following steps: configuring an image acquisition device with a fixed focal length and fixed orientation to acquire image data of a railway line or station; the one or more processors identifying the image data to determine the type of different railway vehicles in the image data and obtaining the coordinate position of the vehicle's tail in the image data; the one or more processors constructing an Nth-order polynomial between the distance along the track direction and the vertical coordinate of the image data, and determining a theoretically calculated value of the distance y along the track direction based on the Nth-order polynomial. Upon obtaining the coordinate position, the one or more processors can generate a detection box for the rear end face of the railway vehicle in the image data and obtain the pixel coordinates of the bottom center of the detection box in the image data.
[0030] Specifically, this application provides a machine vision-based model for identifying and locating parked vehicles. The process includes: first, acquiring a railway line or station image using a pre-calibrated image acquisition device with a fixed focal length and posture; then, using deep learning methods to detect railway vehicles in the image and identify their types; and finally, calculating the longitudinal distance of the detected vehicles along the track based on their coordinate positions in the image, thereby achieving precise location of parked vehicles. This application also proposes a deep learning-based parked vehicle detection network model for identifying different types of freight trains such as boxcars, open wagons, tank cars, and flatcars parked in freight yards. It can accurately mark the position of the vehicle's rear end in the image, using machine learning to replace manual vehicle identification. This model can accurately regress the detection box position based on the identified different vehicle types, accurately detecting the coordinate position of the detection box on the rear end face of the freight car in the image, and thus obtaining the pixel coordinates of the bottom line center of the vehicle end detection box facing the image acquisition device in the image.
[0031] Preferred, such as Figure 4As shown, parked vehicles can be detected using a parked vehicle detection network model. This model consists of three main parts: a backbone, a neck, and a head. The backbone, using Darknet53, is responsible for feature extraction and is primarily composed of the CBS, C3, and SPPF modules. The most fundamental module is the CBS module, which consists of convolutional layers (Conv), batch normalization (BN), and a SiLU activation function. The C3 module is formed by concatenating the ResUnit module with the outer CBS module. The SPPF module sequentially passes the input through multiple 5x5 MaxPool layers, then concatenates the results before passing them through the CBS module. The neck network performs feature fusion, concatenating and fusing intermediate feature maps with different receptive fields generated at different stages of the backbone network before inputting them into the head. The head outputs the prediction results.
[0032] Furthermore, the SIoU loss function and CBAM hybrid attention module are introduced into the parked vehicle detection network model to improve the accuracy of vehicle detection.
[0033] Specifically, traditional object detection loss functions rely on the aggregation of bounding box regression metrics, such as the distance, overlap, and aspect ratio between the predicted and ground truth boxes (i.e., GIoU, CIoU, ICIoU, etc.). However, none of the methods proposed and used to date have considered the direction of mismatch between the desired ground truth and predicted boxes. This deficiency leads to slow convergence and low efficiency, as the predicted boxes may "wander" during training and ultimately produce a worse model. Therefore, this application proposes a novel loss function, SIoU, in which the penalty metric is redefined to take into account the vector angle between the desired regressions. The loss function SIoU consists of an angle cost function, a distance cost function, a shape cost function, and an IoU cost function.
[0034] Specifically, attention mechanisms can generally be divided into channel attention mechanisms and spatial attention mechanisms. The hybrid attention module CBAM used in this application combines the two to more effectively improve the detection of interest targets. CBAM (Convolutional Block Attention Module) calculates attention weights along both the spatial and channel dimensions of a given input feature map, and then adaptively adjusts the input features by multiplying the calculated weight coefficients with the input feature map. Its structure is as follows: Figure 5As shown in the figure, the hybrid attention module is actually composed of a channel attention module and a spatial attention module, with each module corresponding to a different attention mechanism. The feature F input to the channel attention module has a dimension of H×W×C. The algorithm first uses parallel global average pooling and max pooling operations to obtain two 1×1×C channel features. Then, the obtained channel information is sequentially input into two shared convolutional layers. The first layer has C / r neurons and uses the ReLU activation function, while the second layer has C neurons. The features output from the two layers are then summed, and finally, the weight coefficient Mc is obtained through the Sigmoid activation function. Multiplying the weight coefficient by the original feature F yields the scaled new feature. The expression for obtaining the channel attention weight coefficient is: Where: σ represents the Sigmoid function, and the weights W0 and W1 of the MLP are shared for both inputs.
[0035] The input feature F for spatial attention has a scale of H×W×C. The algorithm obtains two channel descriptions of H×W×1 dimensions through average pooling and max pooling at the channel level. Then, the weight coefficients Ms are obtained through the Sigmoid activation function. Finally, multiplying the weight coefficients by the feature F yields the feature with spatial attention. The expression for obtaining the spatial attention weight coefficients is: Where: σ represents the Sigmoid function, f 7×7 This represents a convolution operation with a filter size of 7×7. The network structure of CBAM-YOLOv5 used in this application is as follows: Figure 6 As shown: Based on the original YOLOv5 network structure, the CSP1_1, CSP1_2, and CSP1_3 modules in the backbone network and the CSP2_1 and CBL modules in the neck network are replaced with a hybrid attention module. The hybrid attention module uses the channel relationships of features to output a channel attention map: First, the algorithm compresses the spatial size of the input feature map to efficiently compute channel attention; second, to aggregate spatial information, the module performs average pooling and max pooling operations on the input feature map; then, the obtained average features and spatial features are sent to a weight-sharing network composed of multilayer perceptrons to generate a channel attention map; spatial attention complements channel attention: the algorithm first performs average pooling and max pooling operations along the channel axis and concatenates them to generate a feature description, then applies convolutional layers to the concatenated feature description to supplement the generation of the spatial attention map. After obtaining the two attention maps, the model summarizes the channel information of the feature maps through pooling operations, and then concatenates and convolves the obtained features to produce the final output attention image.
[0036] Preferably, the one or more processors are capable of determining a theoretically calculated value of the distance y along the track direction between the rear of the railway vehicle and the image acquisition device based on the pixel coordinates. The theoretically calculated value of the distance y along the track direction can be obtained using the formula y = k N x N +k N-1 x N-1 +……+k2x 2 +k1x+k0 represents, where x is the ordinate of the bottom center of the detection box in the image data, and k N ...k2,k1,k0 are polynomial coefficients. The polynomial coefficients are determined as follows: Record the measured values of the vertical coordinate x of the bottom center of the detection frame at the rear end face of the railway vehicle at multiple locations in the image data, and the measured distance y along the track direction; substitute the coordinates (x, y) into the formula y = k N x N +k N-1 x N-1 +……+k2x 2 After +k1x+k0, the polynomial coefficients are obtained by fitting based on the least squares method, wherein the measured values can be obtained based on laser distance measurement or lidar measurement.
[0037] Specifically, traditional monocular vision geometric ranging models, such as Figure 2 As shown, where O'(x0,y) xP, as the center of the pixel plane, is the intersection of the imaging plane and the optical axis; P, as the reference for selecting the stationary vehicle for distance measurement, is the projection point of the vehicle's bottom midpoint onto the ground; p(x,y) are the pixel coordinates of the reference point on the image; the focal length f of the image acquisition device is in pixels; H is the shortest actual distance perpendicular to the ground from the optical center of the image acquisition device, serving as the height of the image acquisition device; h is the imaging height of the image plane, the distance from p to O'. Due to the similarity of pinhole imaging, there is a certain functional relationship between the distance D between point P in the world coordinate system and the imaging plane and the ordinate y of p in the pixel coordinate system. However, according to relevant research, two key factors for distance measurement are: firstly, the accuracy of the image acquisition device's height. When the height measurement of the image acquisition device varies within a range of 20cm, the distance change is 4.323m. Since the image acquisition device in this invention is fixed on a crossbeam, significant height changes are unlikely; secondly, the accuracy of the image acquisition device's pitch angle. When the pitch angle of the image acquisition device changes by 0.4°, the distance change is 5.4445m. Therefore, in this scheme, changes in the image acquisition device's height have little impact on distance calculation; however, changes in the image acquisition device's pitch and yaw angles significantly affect the ranging accuracy. The image acquisition device operates in a freight marshalling yard, where vibrations from heavy-duty trains can cause changes in the image acquisition device's attitude, resulting in the relationship between the target distance and its total image coordinates sometimes not strictly following a triangular relationship. Therefore, this invention pre-marks key locations, collects multiple sets of distance and pixel coordinates, and after obtaining a sufficient number of distance and pixel coordinates, uses an Nth-order polynomial to fit the relationship between the two.
[0038] Preferably, the image acquisition device is capable of acquiring image data of railway lines or stations under different time periods and lighting conditions. The one or more processors can process the image data to form a dataset in the following manner: labeling the types of railway vehicles and detection boxes in the image data; processing the image data based on data augmentation methods, wherein the data augmentation methods include, but are not limited to: rotation, translation, flipping, scaling, adjusting contrast, adjusting brightness, and adding noise. The data augmentation methods also include: randomly cropping and scaling nine image data and then blending them to form one image data. When there are multiple image acquisition devices, the image ranges acquired by two adjacent image acquisition devices can overlap.
[0039] Specifically, the dataset is used to provide data support for the vehicle detection model. The constructed dataset is shown in Table 1, where the images are randomly divided into training, validation, and test sets in a 3:1:1 ratio.
[0040] Table 1. Dataset Composition
[0041]
[0042] To ensure accurate vehicle positioning across all locations on a long track, multiple image acquisition units need to be deployed along the track according to the principle of seamless coverage, based on the precise positioning range of a single image acquisition unit. The positioning ranges of adjacent image acquisition units should overlap; for example, if the precise positioning range of a single image acquisition unit is 100 meters and the track length is 1000 meters, at least 10 image acquisition units are required. The system needs to include front-end image acquisition units, edge recognition and positioning processing units (optional), and a global positioning server, all interconnected via wired or wireless networks. Each image acquisition unit performs vehicle identification and precise positioning within its own precise positioning range. Within a single track, multiple image acquisition units achieve global precise positioning across the entire track based on their individual positions and the distance of the vehicle relative to each acquisition unit. Identification and positioning processing can be implemented in the edge recognition and positioning processing unit or on the back-end global positioning server.
[0043] Example 2
[0044] This example can be used to identify the types of parked vehicles in a railway scenario and to calculate the distance to pedestrians in a test scenario. A parked vehicle dataset was established using images obtained from the station, as shown in Table 1, with over 5000 samples each for daytime and nighttime scenarios. Following the training method of deep learning algorithms, this paper uses the model weights pre-trained on a public dataset as initial weights, and then trains the model using the parked vehicle dataset. The experimental parameters for training on the parked vehicle dataset are set as follows. First, the deep learning algorithm selected in this paper is built on the PyTorch platform on Windows. The wormup optimization algorithm is used to update the model parameters, with an initial learning rate of 0.001. One-dimensional linear interpolation is used to update the learning rate during the wormup stage, and cosine annealing is used after the wormup stage. The above settings are only for illustrative purposes and the parameters are not intended to constrain this invention. The training results of the vehicle detection network are shown below. Figure 3 As shown, after 400 epochs of iteration, the classification loss, predicted bounding box confidence loss, and predicted bounding box localization loss all decreased to near 0, while the accuracy and recall approached 1, achieving good results. The test set results are shown in Table 2. The accuracy, recall, and mAP are all close to 1, meeting the accuracy requirements, and the detection speed reached 65fps, meeting the real-time requirements.
[0045] Table 2 Target Detection Network Test Results
[0046]
[0047] To test the ranging performance of the monocular vision-based model, image pairs between the actual distance to the vehicle and the pixel coordinates of the midpoint of the vehicle frame bottom line were collected at the parking lot, as shown in Table 3. The actual distance was obtained using a LiDAR device mounted with the camera, and the vertical coordinates were the pixel coordinates of the midpoint of the truck rear identification frame bottom line in the image.
[0048] Table 3 Key Distance Nodes and Y-axis Values
[0049]
[0050] After obtaining multiple sets of distance and coordinate values, the coefficients in the formula are obtained by fitting a third-order polynomial. The fitted formula is: y = 0.000010212675x 3 -0.012589329377x 2 +5.296757296644x-722.389018
[0051] In the above equations, the coefficients of each power will vary depending on the camera's focal length, mounting posture, and mounting height. Therefore, after each camera is installed, the values of each coefficient need to be obtained through the above calibration process.
[0052] After obtaining the distance equation, it was verified using multiple other sets of data. The resulting errors are shown in Table 4. The errors all did not exceed 1m, indicating that the distance equation is relatively accurate.
[0053] Table 4 shows the error between predicted and actual distances.
[0054]
[0055] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. 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 and locating a parked vehicle based on machine vision, the method based on a parked vehicle network detection model and capable of being executed by one or more processors, characterized in that: an image collector with a fixed focal length and a fixed pose is configured to obtain image data of a railway line or a station yard; a deep learning-based parked vehicle detection network model is constructed to compress and extract features of the image data and scale the features to adapt to scale changes caused by target movement, wherein detection of the target is completed by a detection head; the deep learning-based parked vehicle detection network model is based on an improved YOLO network, capable of obtaining image data of a railway line or a station yard through the image collector, compressing and extracting image features through a backbone network; a hybrid attention module CBAM is introduced into the backbone network, which combines channel attention mechanism and spatial attention mechanism to adjust parameters in the backbone network to ignore background parts in the image and shift the detection center of the model to the detection target; a SIoU function in the model can improve the convergence speed, and the features are further compressed or expanded through a neck network to adapt to scale changes caused by target movement in a large-scale scene, and three different size detection heads are used to detect targets of corresponding scales; key positions of projection points of vehicle bottom midpoints on the ground in a railway line or a station yard are marked in advance, a plurality of measured values of longitudinal coordinates x of the projection points in the image data and distances y between the projection points and the image collector along the track direction are collected, a functional relationship between the distance along the track direction and the longitudinal coordinate of the target is constructed based on the plurality of (x, y) measured data, and an estimated value of the distance y along the track direction is determined based on the functional relationship. The deep learning-based parked vehicle detection network model can generate a detection box containing vehicle type information around the end face of the vehicle tail in the image data, and obtain the pixel coordinates of the bottom center of the detection box in the image data. y = kx + k The polynomial coefficients are determined as follows: Record a plurality of measured values of longitudinal coordinates x of the bottom center of the detection box of the vehicle tail in the image data and distances y along the track direction at different positions; 2.The machine vision based parked vehicle identification and localization method of claim 1, wherein, y = kx + k 3.The machine vision based stopped vehicle identification and localization method of claim 2, wherein, The one or more processors are capable of determining a theoretically calculated value of the distance y between the vehicle tail and the image collector in the track direction based on the pixel coordinates, and the theoretically calculated value of the distance y in the track direction can be determined by a function relationship of an N-order polynomial, but is not limited thereto The image collector can collect image data of a railway line or a station yard under different time periods and different lighting conditions, and the one or more processors can process the image data to form a data set as follows: N x N + k N-1 x N-1 +……+k 2 x 2 +k 1 Label the type and detection box of the freight vehicle in the image data; 0 represents, wherein x is the longitudinal coordinate of the center of the bottom of the detection frame in the image data, k N …k2, k1, k0 are polynomial coefficients. 4.The machine vision based parked vehicle identification and localization method of claim 3, wherein, The image data is processed based on a data enhancement method, wherein the data enhancement method includes but is not limited to rotation, translation, flipping, scaling, adjusting contrast, adjusting brightness, and adding noise. The data enhancement method further includes: randomly cropping and scaling M image data to form 1 image data. Substitute the coordinates (x, y) into the formula N x N +k N-1 x N-1 +……+k 2 x 2 +k 1 0 Afterwards, the polynomial coefficients are obtained by fitting based on the least square method, wherein the measured values can be obtained by means of laser distance measurement or laser radar or manual measurement. 5.The machine vision based parked vehicle identification and localization method of claim 1, wherein, 6.The machine vision-based parked vehicle identification and localization method of claim 5, wherein, 7. The machine vision-based parked vehicle identification and localization method of claim 4, wherein, The number of image collectors can be increased or decreased based on the length of the longitudinal track or the number of transverse tracks in the station yard, wherein, in the case of several image collectors, the image collectors are configured to: The image ranges collected by different image collectors are different from each other, wherein the image ranges collected by two adjacent image collectors can have an overlap; A single image collector can collect image data for realizing the identification and positioning of a stopped vehicle within its own accurate positioning range, wherein the identification and positioning of a stopped vehicle within the entire track range can be realized after the image data collected by each of the several image collectors is processed.
8. A machine vision based parked vehicle identification and localization system, characterized in that, Comprise: An image collector with a fixed focal length and a fixed pose for obtaining image data of a railway line or a station yard; A deep learning-based stopped vehicle detection network model can be constructed to compress and extract features of the image data, and scale the features to adapt to the scale changes caused by target movement, wherein the detection of the target is completed by a detection head; The deep learning-based stopped vehicle detection network model, based on an improved YOLO network, can obtain image data of a railway line or a station yard through the image collector, compress and extract image features through the backbone network; a hybrid attention module CBAM is introduced into the backbone network, which combines channel attention mechanism and spatial attention mechanism, can adjust the parameters in the backbone network to ignore the background part of the image, and transfer the detection center of the model to the detection target; the SIoU function can improve the model convergence speed, the features are further compressed or expanded through the neck network to adapt to the scale changes caused by the movement of the target in a large range of scenes, and three different size detection heads are used to detect the target of corresponding scale; The projection points of the vehicle bottom midpoint on the ground in the railway line or station yard can be marked in advance, and multiple sets of longitudinal coordinates x of the projection points in the image data and the measured values of the distances y between the projection points and the image collector along the track direction are collected, a function relationship between the distance along the track direction and the longitudinal coordinate of the target is constructed based on the multiple sets of (x, y) measured data, and the estimated value of the distance y along the track direction is determined based on the function relationship.
9. A computer-readable storage medium comprising computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the machine vision-based stopped vehicle identification and positioning method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Mine fire identification and fire source positioning method based on binocular vision
CN112906674A
Forward vehicle identification and distance detection method based on deep learning
CN115424237A