Highway global vehicle trajectory reconstruction method based on local visual anchor and distributed optical fiber perception
Patent Information
- Application Number
- CN202611335801.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-10-20
AI Technical Summary
[0007]本发明是为了解决DAS轨迹信号粗细变化、局部弱化、轨迹断裂以及相机只能提供局部观测等问题,提出一种基于局部视觉锚定与分布式光纤感知的高速公路全域车辆轨迹重构方法,以期能够适应DAS轨迹粗细、幅值及局部弱化变化,并支持不同时间长度和道路范围的输入,从而能实现局部高精度视觉观测对全域DAS轨迹重构的约束与校正
1.本发明将DAS轨迹强度图、相机观测车辆轨迹二值图和相机观测掩膜统一表示为具有相同时空尺寸的图像张量,通过相机观测车辆轨迹二值图和相机观测掩膜明确区分相机确认无车辆轨迹和相机未观测两种状态,避免了将未观测区域的填充值错误解释为车辆轨迹不存在;相机观测区域在目标路段内的位置不作固定限制,可通过相机观测掩膜表征不同相机布设位置及其有效观测范围,从而适应了不同相机布设条件下的全域车辆轨迹重构。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed optical fiber sensing and intelligent transportation perception technology, specifically to a method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed optical fiber sensing. Background Technology
[0002] Vehicle trajectories on highways reflect the continuous movement of vehicles in both longitudinal space and time along the road, serving as crucial foundational data for traffic state estimation, abnormal traffic event identification, and traffic operation analysis. Current methods for acquiring vehicle trajectories primarily rely on traffic sensing devices such as road cameras, millimeter-wave radar, and drones. However, these devices typically only cover limited road areas, making it difficult to achieve long-distance, continuous monitoring of highways at a low cost.
[0003] Distributed fiber acoustic sensing technology, or DAS for short, can use communication optical fibers laid along roads to sense vibration signals caused by vehicles traveling on the road, and represent the vibration signals as a two-dimensional spatiotemporal intensity map with time and longitudinal position of the road as coordinates. DAS has the advantages of long coverage distance, continuous spatial sampling, and no need for densely deployed sensors along the road, providing a new technical approach for vehicle trajectory perception over long road areas of highways.
[0004] However, vibration signals acquired by DAS are easily affected by factors such as road structure, fiber optic cable laying conditions, vehicle load, distance between the vehicle and the fiber optic cable, environmental vibration noise, and signal propagation attenuation. The trajectory signal generated by the same vehicle may exhibit different amplitudes and widths at different road locations, with some trajectories being thicker and others thinner. During periods of signal attenuation or strong noise, the vehicle trajectory may also show local weakening, breakage, or disappearance. Furthermore, when multiple vehicles are traveling simultaneously or are close together, the vibration signals generated by different vehicles may overlap, making the boundaries of vehicle trajectories in the DAS trajectory intensity map unclear. Therefore, directly applying threshold segmentation to the DAS trajectory intensity map makes it difficult to accurately obtain a continuous and complete binary image of the vehicle trajectory.
[0005] Cameras can output vehicle trajectories with high accuracy within their effective observation area, but their observation range typically only covers a portion of the target road segment. For spatiotemporal regions not covered by the camera, a zero value in the camera trajectory map only indicates that the area was not observed by the camera, not that there are no vehicles in that area. If the local camera trajectory map is directly concatenated with the DAS trajectory intensity map, the neural network has difficulty distinguishing between the two situations: "the camera confirms that there is no vehicle trajectory" and "the camera did not observe," thus limiting the constraint effect of local camera observations on global trajectory reconstruction.
[0006] Existing image segmentation or trajectory extraction methods typically employ pixel-wise classification loss for training. However, vehicle trajectory pixels constitute a relatively small proportion of the overall spatiotemporal image, easily leading to foreground-background class imbalance. Furthermore, pixel-wise loss alone is insufficient to adequately constrain the local linear morphology of vehicle trajectories, potentially resulting in trajectory breaks, local adhesion, abnormal bifurcation, or blurred edges. Summary of the Invention
[0007] This invention aims to address issues such as variations in the thickness of DAS trajectory signals, local weakening, trajectory breaks, and the fact that cameras can only provide local observations. It proposes a method for reconstructing the entire vehicle trajectory of highways based on local visual anchoring and distributed fiber optic sensing. This method is designed to adapt to variations in the thickness, amplitude, and local weakening of DAS trajectory signals and to support inputs of different time lengths and road ranges. As a result, it enables the constraint and correction of the entire DAS trajectory reconstruction by high-precision local visual observations.
[0008] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed optical fiber sensing, characterized by the following steps: Step 1: Under a unified temporal resolution, unified spatial resolution, and unified road longitudinal coordinate system, divide the target observation period and target road segment into... A spatiotemporal grid, in which The number of time grids, The number of longitudinal spatial grids of the road. For the index of the time grid, For the vertical spatial grid; The raw DAS trajectory intensity data covering the target road segment is acquired and standardized to obtain the DAS trajectory intensity map. True value map of vehicle trajectories across the entire target road segment ;in, Indicates that it is located at the th The first time grid and the first Standardized DAS vibration intensity at each longitudinal spatial grid; Indicates the location within the target road segment at the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, if , indicating that it is located on the time grid and vertical spatial grid There is a vehicle trajectory at that location, if , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at this location; Obtain a binary image of vehicle trajectories within the effective observation area of the camera located on the target road segment. Observation mask characterizing the effective observation area of the camera ,in, Indicates that it is located at the th The first time grid and the first The observation mask at each vertical spatial grid, if This indicates the time grid observed by the camera. and vertical spatial grid If This indicates that the camera did not observe the time grid. and vertical spatial grid Place; Indicates the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, when and "Time" indicates that it is located on the time grid. and vertical spatial grid Vehicle tracks exist at this location; when ,and , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at that location; when ,and , indicating that it is located on the time grid and vertical spatial grid The vehicle's trajectory is unknown. Step 2: Construct a conditional adversarial trajectory reconstruction network, including: a generator G and a discriminator D; Step 2.1: The generator G includes: a DAS coding branch, a camera coding branch, mask-gated fusion units corresponding to each coding scale, a multi-scale bottleneck layer, and a fusion decoder, and performs... , and Process the data and output a probability map of vehicle trajectories across the entire region. ; Step 2.2, Discriminator D includes: A series of sequentially connected fully convolutional discriminant layers, and the resulting... , and and The first condition combination is formed by splicing the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the first discrimination matrix. ; for , and and The second condition combination is formed by piecing together the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the second discrimination matrix. ;in, yes The Middle Line 1 The first discriminant value; yes The Middle Line 1 The second discriminant value; , ; Step 3: Construct the local discriminant loss of the discriminator respectively. The combined loss of the generator Composite loss Including: combating losses Weighted binary cross-entropy loss Dice loss Camera anchoring loss When the generator G parameters are fixed, according to and calculate And update the discriminator D parameters; when fixing the discriminator D parameters, The discriminator D is input to obtain the generator feedback discriminant matrix. ,in, yes The Middle Line 1 The column generator provides a feedback discriminant value based on... , , , , calculate And update the generator G parameters; Step 4: Based on local discriminative loss and composite loss The generator G and discriminator D are alternately updated to complete the training of the conditional adversarial trajectory reconstruction network, resulting in a trained trajectory reconstruction model. The generator in this model is then used to reconstruct the DAS trajectory intensity map to be reconstructed. Camera observation of vehicle trajectory binary image and camera observation mask The process is performed to obtain the global vehicle trajectory probability map output by the model. and based on and ,right Camera anchoring processing yields a probability map of the camera anchoring trajectory. Finally, a threshold is used. right Binarization is performed to obtain a binary reconstruction image of the vehicle trajectory across the entire area. .
[0009] The method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed optical fiber sensing, as described in this invention, is characterized in that step 2.1 includes the following steps: Step 2.1.1, the DAS encoding branch includes: The downsampling layers between the DAS-coded residual blocks and their adjacent DAS-coded residual blocks, wherein the... The DAS-coded residual block pairs with the first The DAS downsampled features output from the downsampled layer are processed to obtain the first downsampled feature. DAS features at each coding scale ,when At that time, the order was made The DAS downsampling features output by each downsampling layer are as follows: ; Step 2.1.2, the camera coding branch includes: The downsampling layers between each camera-coded residual block and its adjacent camera-coded residual blocks, wherein the... The camera coding residual block for the first... The camera downsampled features output from the downsampled layer are processed to obtain the th downsampled feature. Camera features at each coding scale ,when At that time, the first The camera downsampling features output by each downsampling layer are and ; Step 2.1.3: The mask-gated fusion unit calculates the first step according to equations (1)-(2). Each scale of gating weight and the Fusion features at various scales : (1) (2) In equations (1) and (2), express M Zoom to The observation mask after each scale; It is pixel-by-pixel multiplication; σ It is the Sigmoid function; These are the fusion features corresponding to skip connections; It is the first Channel alignment transformation operations at various scales; The convolution kernel is Convolution operations; It's a splicing operation; Step 2.1.4, the multi-scale bottleneck layer is composed of... It is formed by sequentially connecting void residual blocks with different expansion rates, and the first... Fusion features at various scales Process and output the first... Bottleneck characteristics at each scale ; Step 2.1.5, the fusion decoder includes The decoded residual blocks are connected sequentially, wherein the first... Decoding characteristics of the output of each decoding residual block Upsampling to After the same spacetime dimensions, then with Jump connection and enter the first Processing is performed on the decoded residual block to obtain the first... Decoding features at each decoding scale ;when season ; Step 2.1.6: Decode the features at the first decoding scale. Perform convolutional mapping to obtain the inactive prediction map of the entire vehicle trajectory. Then, the Sigmoid activation function is used to activate... Mapped to a global vehicle trajectory probability map ,in, Indicates location within the time grid and vertical spatial grid The probability of the trajectory at that location.
[0010] Furthermore, step 3 includes the following steps: Step 3.1: Construct using equation (3) : (3) Step 3.2: Construct using equation (4) : (4) Step 3.3: Construct using equation (5) : (5) In equation (5), These are the loss weights for the vehicle trajectory pixels; These are the loss weights for the background pixels; It is a small positive number; Step 3.4: Construct using equation (6) : (6) Step 3.5: Construct using equation (7) : (7) Step 3.6: Construct using equation (8) : (8) In equation (8), , , , These are the non-negative weights of each loss term.
[0011] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program supporting the processor in performing the method described therein, and the processor is configured to execute the program stored in the memory.
[0012] The present invention discloses a computer-readable storage medium storing a computer program, characterized in that the computer program is executed by a processor to perform the steps of the method described thereon.
[0013] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention unifies the DAS trajectory intensity map, the camera-observed vehicle trajectory binary map, and the camera observation mask into an image tensor with the same spatiotemporal size. The camera-observed vehicle trajectory binary map and the camera observation mask clearly distinguish between two states: the camera confirms no vehicle trajectory and the camera does not observe. This avoids misinterpreting the fill value of the unobserved area as the absence of a vehicle trajectory. The location of the camera observation area within the target road segment is not fixed. The camera observation mask can represent different camera deployment locations and their effective observation range, thereby adapting to the reconstruction of the entire vehicle trajectory under different camera deployment conditions.
[0014] 2. This invention constructs a dual-branch fully convolutional ResUNet generator to extract features from the global intensity information of DAS and the local trajectory information of the camera, avoiding direct mixing of the two types of data in the shallow layers of the network; through a multi-scale gated fusion unit controlled by the observation mask, the camera trajectory features are fused only in the region with effective observation basis, which improves the constraint and correction ability of local camera observation on global trajectory reconstruction.
[0015] 3. This invention employs a fully convolutional generator and a fully convolutional discriminator, without setting up fully connected layers that require a fixed input dimension. It adapts to inputs of different time lengths and different road ranges through edge padding and pruning, improving the applicability of the model under different target road segments and observation periods. The discriminator constrains the local spatiotemporal morphology of the generated trajectory, and the weighted binary cross-entropy loss, Dice loss, and camera anchoring loss constrain pixel classification accuracy, trajectory region overlap, and camera observation consistency, respectively, reducing the breakage, adhesion, abnormal bifurcation, and local morphological distortion of the generated trajectory. Attached Figure Description
[0016] Figure 1 This is a flowchart of the highway full-domain vehicle trajectory reconstruction method of the present invention; Figure 2 This is a diagram of the conditional adversarial trajectory reconstruction network structure of the present invention; Figure 3 Figure showing trajectory reconstruction results with different numbers of cameras; Figure 4 Performance diagrams of camera coverage trajectory reconstruction under different camera numbers and camera coverage conditions. Detailed Implementation
[0017] In this embodiment, a method for reconstructing the vehicle trajectory of the entire highway based on local visual anchoring and distributed optical fiber sensing can make full use of the advantages of continuous coverage of DAS and the advantages of high local accuracy of camera observation. While retaining the effective observation results of the camera, it infers the vehicle trajectory in areas not observed by the camera based on the trajectory intensity information of DAS, thereby obtaining a complete, continuous and accurate binary map of the vehicle trajectory of the entire highway.
[0018] Specifically, this method uses the complete spatiotemporal region formed by the target observation period and the target road segment as the reconstruction range, and uses the DAS trajectory intensity map. Provides continuous sensing information across the entire area, using camera observations of binary images of vehicle trajectories. Provides localized, high-accuracy trajectory information and utilizes camera observation masks. Define the effective range of camera information. During the training phase, both the generator and discriminator are used; during the trajectory reconstruction phase, only the trained generator is retained. The specific process is as follows: Figure 1 As shown, the method includes: Step 1: Under a unified temporal resolution, unified spatial resolution, and unified road longitudinal coordinate system, divide the target observation period and target road segment into... A spatiotemporal grid, in which The number of time grids, The number of longitudinal spatial grids of the road. For the index of the time grid, This is the index for the vertical spatial grid.
[0019] The raw DAS trajectory intensity data covering the target road segment is acquired and standardized to obtain the DAS trajectory intensity map. True value map of vehicle trajectories across the entire target road segment ;in, Indicates that it is located at the th The first time grid and the first Standardized DAS vibration intensity at each longitudinal spatial grid; Indicates the location within the target road segment at the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, if , indicating that it is located on the time grid and vertical spatial grid There is a vehicle trajectory at that location, if , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at this location.
[0020] Obtain a binary image of vehicle trajectories within the effective observation area of the camera located on the target road segment. Observation mask characterizing the effective observation area of the camera ,in, Indicates that it is located at the th The first time grid and the first The observation mask at each vertical spatial grid, if This indicates the time grid observed by the camera. and vertical spatial grid If This indicates that the camera did not observe the time grid. and vertical spatial grid Place; Indicates the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, when and "Time" indicates that it is located on the time grid. and vertical spatial grid Vehicle tracks exist at this location; when ,and , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at that location; when ,and , indicating that it is located on the time grid and vertical spatial grid The vehicle's trajectory is unknown.
[0021] In practice, the first dimension of the spatiotemporal map is set as the time dimension, and the second dimension is set as the longitudinal spatial dimension of the road. This method does not impose fixed restrictions on the spatial location of the camera observation area within the target road segment. The camera observation area can be located at any local location within the target road segment, and its specific start and end mileage and effective observation range are determined by the camera observation mask. Representation. When the camera's observation position changes, only the binary image of the vehicle trajectory observed by the camera needs to be updated accordingly. and camera observation mask No changes to the generator's network structure are required. When multiple cameras are present, the union of the effective observation regions of each camera is written into the camera observation mask. Vehicle trajectory binary true value map It is used only as part of the training supervision labels and real combination, and is not input into the generator during the model inference phase.
[0022] Step 2: Construct a conditional adversarial trajectory reconstruction network. The specific network structure is as follows: Figure 2 As shown, it includes: a generator G and a discriminator D; Step 2.1: The generator G includes: a DAS coding branch, a camera coding branch, mask-gated fusion units corresponding to each coding scale, a multi-scale bottleneck layer, and a fusion decoder, and performs... , and Process the data and output a probability map of vehicle trajectories across the entire region. .
[0023] Step 2.1.1, the DAS encoding branch includes: The downsampling layers between the DAS-coded residual blocks and their adjacent DAS-coded residual blocks, wherein the... The DAS-coded residual block pairs with the first The DAS downsampled features output from the downsampled layer are processed to obtain the first downsampled feature. DAS features at each coding scale ,when At that time, the order was made The DAS downsampling features output by each downsampling layer are as follows: .
[0024] Step 2.1.2, the camera coding branch includes: The downsampling layers between each camera-coded residual block and its adjacent camera-coded residual blocks, wherein the... The camera coding residual block for the first... The camera downsampled features output from the downsampled layer are processed to obtain the th downsampled feature. Camera features at each coding scale ,when At that time, the first The camera downsampling features output by each downsampling layer are and .
[0025] Step 2.1.3: The mask-gated fusion unit calculates the first step according to equations (1)-(2). Each scale of gating weight and the Fusion features at various scales : (1) (2) In equations (1) and (2), express M Zoom to The observation mask after each scale, It is pixel-by-pixel multiplication; σ It is the Sigmoid function; These are the fusion features corresponding to skip connections; It is the first Channel alignment transformation operations at various scales; The convolution kernel is Convolution operations; It's a splicing operation.
[0026] In practice, both the DAS encoding branch and the camera encoding branch consist of three sequentially connected downsampling layers and four encoding residual blocks, i.e., four encoding scales. The number of output channels at the four scales are 32, 64, 128, and 256, respectively, corresponding to feature map sizes of the original input size, half, quarter, and eighth of the original input size, respectively. Downsampling is performed between adjacent encoding scales using convolutional layers with a kernel size of 3×3, a stride of 2, and padding of 1. Each encoding scale has one residual block, and the main branch of the residual block sequentially includes a 3×3 convolution, group normalization, GELU activation, another 3×3 convolution, and group normalization, which is then added to the shortcut branch and GELU activation is performed again. The number of groups for group normalization is set to 8; when the number of input channels is inconsistent with the number of output channels, the shortcut branch uses a 1×1 convolution for channel matching. Gated fusion is performed separately at each of the four encoding scales.
[0027] Camera observation mask M Nearest neighbor interpolation scaling is used to preserve the discrete properties of the observed and unobserved boundaries; channel alignment transformation. This is used to unify the number of channels for camera features and DAS features. Both encoding branches output features with the same number of channels at the same scale, therefore... An identity mapping is used; when the number of feature channels in the two branches is different... Channel alignment can be achieved using 1×1 convolution. The number of output channels of the 1×1 convolution in Equation (1) is the same as that of the camera features after channel alignment, so the gating weights have the same size as the camera features.
[0028] When the scaling observation mask at a certain location is 0, the gating weight at that location is forced to be 0, and the fusion feature in Equation (2) retains only the DAS feature; when the scaling observation mask is 1, the network adaptively determines the injection intensity of the camera feature based on the DAS feature, camera feature and observation state. The fusion features at all four scales are saved as the skip connection features of the decoder, and the fusion feature at the deepest scale continues to be input into the multi-scale bottleneck layer.
[0029] Step 2.1.4, the multi-scale bottleneck layer is composed of... It is formed by sequentially connecting void residual blocks with different expansion rates, and the first... Fusion features at various scales Process and output the first... Bottleneck characteristics at each scale ; In practice, the multi-scale bottleneck layer contains four dilated residual blocks with dilation rates of 1, 2, 4, and 8, respectively. These four dilated residual blocks are connected in series, maintaining a constant input and output channel count of 256. This allows for the gradual extraction of vehicle trajectory association features across different time and spatial ranges without further reducing the feature map size.
[0030] Step 2.1.5, the fusion decoder includes The decoded residual blocks are connected sequentially, wherein the first... Decoding characteristics of the output of each decoding residual block Upsampling to After the same spacetime dimensions, then with Jump connection and enter the first Processing is performed on the decoded residual block to obtain the first... Decoding features at each decoding scale ;when season .
[0031] Step 2.1.6: Decode the features at the first decoding scale. Perform convolutional mapping to obtain the inactive prediction map of the entire vehicle trajectory. Then, the Sigmoid activation function is used to activate... Mapped to a global vehicle trajectory probability map ,in, Indicates location within the time grid and vertical spatial grid The probability of the trajectory at that location.
[0032] In practice, the decoder sets three progressively higher sampling scales. First, bilinear interpolation is used to adjust the bottleneck features to the size of the fused features from the third coding scale, concatenating them with the 128-channel fused features, and outputting 128-channel features through residual blocks. Then, the features are adjusted to the size of the fused features from the second coding scale, concatenating them with the 64-channel fused features, and outputting 64-channel features through residual blocks. Finally, the features are adjusted to the size of the fused features from the first coding scale, concatenating them with the 32-channel fused features, and outputting 32-channel features through residual blocks. A 1×1 convolution is used to map the 32-channel features to a global vehicle trajectory inactive prediction map. The global vehicle trajectory probability map is obtained through the Sigmoid function. .
[0033] Step 2.2, Discriminator D includes: A series of sequentially connected fully convolutional discriminant layers, and the resulting... , and and The first condition combination is formed by splicing the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the first discrimination matrix. ; for , and and The second condition combination is formed by piecing together the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the second discrimination matrix. ;in, yes The Middle Line 1 The first discriminant value; yes The Middle Line 1 The second discriminant value; , .
[0034] In practice, the discriminator uses five convolutional layers with a kernel size of 4×4. The number of output channels for each layer is 32, 64, 128, 256, and 1, respectively, with convolution strides of 2, 2, 2, 1, and 1, and padding set to 1 for all layers. No normalization layer is applied after the first convolutional layer; LeakyReLU activation with a negative half-axis slope of 0.2 is used directly. The second to fourth convolutional layers use group normalization (8 groups) and LeakyReLU activation. The fifth layer does not have a normalization layer or activation function; it directly outputs a two-dimensional inactive discriminant matrix. The network structure ensures that each output element of the discriminator corresponds to a 70×70 local spatiotemporal receptive field in the input combination, used to determine whether the conditional information within that local region is consistent with the vehicle trajectory pattern.
[0035] Step 3: Construct the local discriminant loss of the discriminator respectively. The combined loss of the generator Composite loss Including: combating losses Weighted binary cross-entropy loss Dice loss Camera anchoring loss When the generator G parameters are fixed, according to and calculate And update the discriminator D parameters; when fixing the discriminator D parameters, The discriminator D is input to obtain the generator feedback discriminant matrix. ,in, yes The Middle Line 1 The column generator provides a feedback discriminant value based on... , , , , calculate And update the generator G parameters.
[0036] Step 3.1: Construct using equation (3) : (3) In specific implementation, the target label matrix of the first condition combination is set to be the same as... The target label matrix of the second condition combination is set to be the same size as the matrix of all 1s. For all-zero matrices of the same size, calculate the loss for each matrix and then take the arithmetic mean as the discriminator loss.
[0037] Step 3.2: Construct using equation (4) : (4) Step 3.3: Construct using equation (5) : (5) In equation (5), These are the loss weights for the vehicle trajectory pixels; These are the loss weights for the background pixels; It is a small positive number.
[0038] In practice, the loss weights of background pixels are... Setting it to 1 will adjust the loss weights of the vehicle trajectory pixels. Set to 10 and remain unchanged throughout a single training cycle. Numerical stability terms in the weighted binary cross-entropy loss, Dice loss, and camera anchoring loss. Set to 10 −6 .
[0039] Step 3.4: Construct using equation (6) : (6) Step 3.5: Construct using equation (7) : (7) Step 3.6: Construct using equation (8) : (8) In equation (8), , , , These are the non-negative weights of each loss term; In practice, the weights of the adversarial loss, weighted binary cross-entropy loss, Dice loss, and camera anchoring loss are fixed at 1, 5, 5, and 10, respectively.
[0040] Step 4: Based on local discriminative loss and composite loss The generator G and discriminator D are alternately updated to complete the training of the conditional adversarial trajectory reconstruction network and obtain the trained trajectory reconstruction model. In practice, a total of 6,000 samples were used, with the training set, validation set, and test set containing 4,200, 900, and 900 samples respectively. The training set, validation set, and test set were divided according to non-overlapping time ranges, and the test set was not used for model training, model selection, or binarization threshold selection.
[0041] Both the generator and discriminator use the AdamW optimizer, with an initial learning rate set to 2×10⁻⁶. -4The first-order moment decay factor is set to 0.5, the second-order moment decay factor is set to 0.999, and the weight decay factor is set to 1×10. -5 The maximum physical batch size is set to 4, and the physical batch size of samples of different sizes is automatically adjusted between 1 and 4 based on the number of pixels after edge patching in the batch. The effective batch size is made approximately 4 through gradient accumulation.
[0042] In each training batch, first fix the generator G and stop. The gradient will and Input the discriminator D to obtain D1 and D2, and then use the local discrimination loss of the discriminator. Update discriminator D; then fix the updated discriminator D, while retaining... Combining the second condition in the case of gradient Re-input to discriminator D, and obtain And based on the generator composite loss Update generator G. The ratio of updates for the generator to the discriminator is 1:1, and the maximum number of training rounds is set to 100.
[0043] A full validation was performed every two training epochs thereafter, using the out-of-camera Dice coefficient on the validation set as the metric for selecting the best model. Training was stopped when this metric failed to improve after 15 consecutive validations, and the generator parameters at which the out-of-camera Dice coefficient on the validation set was highest were saved. Table 1 shows the global Dice coefficient, global intersection-over-union ratio, out-of-camera Dice coefficient, out-of-camera intersection-over-union ratio, out-of-camera precision, and out-of-camera recall of the best model on the test set.
[0044] Table 1. Vehicle trajectory reconstruction performance of the best model in the test scenario.
[0045] The generator in the trained trajectory reconstruction model is used to reconstruct the intensity map of the DAS trajectory to be reconstructed. Camera observation of vehicle trajectory binary image and camera observation mask The process is performed to obtain the global vehicle trajectory probability map output by the model. ,based on and ,right Camera anchoring processing is performed, and the probability map of camera anchoring trajectory is obtained using equation (9). Using threshold right Binarization is performed, and the binary reconstruction map of the vehicle trajectory over the entire domain is obtained using equation (10). : (9) (10) in, It is located on the time grid after the camera is anchored. and vertical spatial grid The trajectory probability at that location. It is the binarization threshold. It is located in the time grid and vertical spatial grid The binary trajectory at that location.
[0046] The final output is a binary reconstruction map of the vehicle trajectory across the entire area. To visually demonstrate the vehicle trajectory reconstruction effect under different camera deployment conditions, samples with 1, 2, 3, and 4 cameras were randomly selected from the test set to display the trajectory reconstruction results under different camera numbers, as shown below. Figure 3 As shown. By Figure 3 It is evident that, under different camera counts, the reconstructed trajectories generally maintain the main shape and continuity of the true trajectories; vehicle trajectories within the effective observation area of the cameras are accurately preserved, and the main vehicle trajectories within the unobserved areas of the cameras can also be effectively reconstructed.
[0047] To further analyze the impact of camera deployment conditions on trajectory reconstruction results outside the camera coverage area, the test samples were grouped and statistically analyzed according to the number of cameras and camera coverage. The results are as follows: Figure 4 As shown. By Figure 4 It is evident that the Dice coefficient outside the camera coverage area generally increases with the increase of the number of cameras and camera coverage. Specifically, when the number of cameras increases from 1 to 4, the coefficient increases from 0.675 to 0.779; when the camera coverage increases from 15%–30% to 45%–65%, the coefficient increases from 0.649 to 0.767. These results indicate that local camera observation can not only ensure the accuracy of trajectory within the effective observation area of the camera, but also enhance the vehicle trajectory reconstruction effect in areas not observed by the camera through feature fusion.
[0048] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0049] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
Claims
1. A method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed fiber optic sensing, characterized in that, Includes the following steps: Step 1: Under a unified temporal resolution, unified spatial resolution, and unified road longitudinal coordinate system, divide the target observation period and target road segment into... A spatiotemporal grid, in which The number of time grids, The number of longitudinal spatial grids of the road. For the index of the time grid, For the vertical spatial grid; The raw DAS trajectory intensity data covering the target road segment is acquired and standardized to obtain the DAS trajectory intensity map. True value map of vehicle trajectories across the entire target road segment ;in, Indicates that it is located at the th The first time grid and the first Standardized DAS vibration intensity at each longitudinal spatial grid; Indicates the location within the target road segment at the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, if , indicating that it is located on the time grid and vertical spatial grid There is a vehicle trajectory at that location, if , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at this location; Obtain a binary image of vehicle trajectories within the effective observation area of the camera located on the target road segment. Observation mask characterizing the effective observation area of the camera ,in, Indicates that it is located at the th The first time grid and the first The observation mask at each vertical spatial grid, if This indicates the time grid observed by the camera. and vertical spatial grid If This indicates that the camera did not observe the time grid. and vertical spatial grid Place; Indicates the first The first time grid and the first The vehicle trajectory at each vertical spatial grid, when and "Time" indicates that it is located on the time grid. and vertical spatial grid Vehicle tracks exist at this location; when ,and , indicating that it is located on the time grid and vertical spatial grid There is no vehicle trajectory at that location; when ,and , indicating that it is located on the time grid and vertical spatial grid The vehicle's trajectory is unknown. Step 2: Construct a conditional adversarial trajectory reconstruction network, including: a generator G and a discriminator D; Step 2.1: The generator G includes: a DAS coding branch, a camera coding branch, mask-gated fusion units corresponding to each coding scale, a multi-scale bottleneck layer, and a fusion decoder, and performs... , and Process the data and output a probability map of vehicle trajectories across the entire region. ; Step 2.2, Discriminator D includes: A series of sequentially connected fully convolutional discriminant layers, and the resulting... , and and The first condition combination is formed by splicing the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the first discrimination matrix. ; for , and and The second condition combination is formed by piecing together the channels. Local feature extraction and sliding local discrimination processing are performed to obtain the second discrimination matrix. ;in, yes The Middle Line 1 The first discriminant value; yes The Middle Line 1 The second discriminant value; , ; Step 3: Construct the local discriminant loss of the discriminator respectively. The combined loss of the generator Composite loss Including: combating losses Weighted binary cross-entropy loss Dice loss Camera anchoring loss When the generator G parameters are fixed, according to and calculate And update the discriminator D parameters; when fixing the discriminator D parameters, The discriminator D is input to obtain the generator feedback discriminant matrix. ,in, yes The Middle Line 1 The column generator provides a feedback discriminant value based on... , , , , calculate And update the generator G parameters; Step 4: Based on local discriminative loss and composite loss The generator G and discriminator D are alternately updated to complete the training of the conditional adversarial trajectory reconstruction network, resulting in a trained trajectory reconstruction model. The generator in this model is then used to reconstruct the DAS trajectory intensity map to be reconstructed. Camera observation of vehicle trajectory binary image and camera observation mask The process is performed to obtain the global vehicle trajectory probability map output by the model. and based on and ,right Camera anchoring processing yields a probability map of the camera anchoring trajectory. Finally, a threshold is used. right Binarization is performed to obtain a binary reconstruction image of the vehicle trajectory across the entire area. .
2. The method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed optical fiber sensing according to claim 1, characterized in that, Step 2.1 includes the following steps: Step 2.1.1, the DAS encoding branch includes: The downsampling layers between the DAS-coded residual blocks and their adjacent DAS-coded residual blocks, wherein the... The DAS-coded residual block pairs with the first The DAS downsampled features output from the downsampled layer are processed to obtain the first downsampled feature. DAS features at each coding scale ,when At that time, the order was made The DAS downsampling features output by each downsampling layer are as follows: ; Step 2.1.2, the camera coding branch includes: The downsampling layers between each camera-coded residual block and its adjacent camera-coded residual blocks, wherein the... The camera coding residual block for the first... The camera downsampled features output from the downsampled layer are processed to obtain the th downsampled feature. Camera features at each coding scale ,when At that time, the first The camera downsampling features output by each downsampling layer are and ; Step 2.1.3: The mask-gated fusion unit calculates the first step according to equations (1)-(2). Each scale of gating weight and the Fusion features at various scales : (1) (2) In equations (1) and (2), express M Zoom to The observation mask after each scale; It is pixel-by-pixel multiplication; σ It is the Sigmoid function; These are the fusion features corresponding to skip connections; It is the first Channel alignment transformation operations at various scales; The convolution kernel is Convolution operations; It's a splicing operation; Step 2.1.4, the multi-scale bottleneck layer is composed of... It is formed by sequentially connecting void residual blocks with different expansion rates, and the first... Fusion features at various scales Process and output the first... Bottleneck characteristics at each scale ; Step 2.1.5, the fusion decoder includes The decoded residual blocks are connected sequentially, wherein the first... Decoding characteristics of the output of each decoding residual block Upsampling to After the same spacetime dimensions, then with Jump connection and enter the first Processing is performed on the decoded residual block to obtain the first... Decoding features at each decoding scale ;when season ; Step 2.1.6: Decode the features at the first decoding scale. Perform convolutional mapping to obtain the inactive prediction map of the entire vehicle trajectory. Then, the Sigmoid activation function is used to activate... Mapped to a global vehicle trajectory probability map ,in, Indicates location within the time grid and vertical spatial grid The probability of the trajectory at that location.
3. The method for reconstructing the entire vehicle trajectory of a highway based on local visual anchoring and distributed optical fiber sensing according to claim 2, characterized in that, Step 3 includes the following steps: Step 3.1: Construct using equation (3) : (3) Step 3.2: Construct using equation (4) : (4) Step 3.3: Construct using equation (5) : (5) In equation (5), These are the loss weights for the vehicle trajectory pixels; These are the loss weights for the background pixels; It is a small positive number; Step 3.4: Construct using equation (6) : (6) Step 3.5: Construct using equation (7) : (7) Step 3.6: Construct using equation (8) : (8) In equation (8), , , , These are the non-negative weights of each loss term.
4. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports a processor in executing the method of any one of claims 1-3, the processor being configured to execute the program stored in the memory.
5. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the method according to any one of claims 1-3.