Driving scene-oriented timing consistency video generation method and model training method
By introducing instance identity and trajectory masking mechanisms into the diffusion model, limiting the range of visual feature interaction and strengthening foreground supervision, the instance drift problem in driving scene video generation is solved, achieving high-quality, low-cost time-consistent video generation and supporting the simulation data requirements of autonomous driving systems.
Patent Information
- Application Number
- CN202610112396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2025-12-04
- Filing Date
- 2026-01-27
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2046-01-27
AI Technical Summary
In existing autonomous driving technologies, the driving scene video generation method based on the diffusion model suffers from the instance identity drift problem, which causes the appearance and category of the generated video instances to change over time, making it difficult to meet the temporal consistency requirements of downstream tasks such as autonomous driving perception and tracking.
By constructing instance identity masking and trajectory masking mechanisms, the interaction range of visual features is limited in the self-attention calculation of the diffusion model, and the supervision weight of the foreground region is strengthened by combining a probabilistic dynamic masking strategy, so as to ensure the instance-level temporal consistency of the generated video.
It significantly improves instance-level temporal consistency of generated videos, enhances the generation quality of small-scale objects, strengthens the visual realism and credibility of videos, and supports the generation of high-quality simulation data for autonomous driving systems.
Smart Images

Figure CN122200464B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of autonomous driving technology, specifically relating to a method for generating time-consistent videos and a model training method for driving scenarios. Background Technology
[0002] The evolution of autonomous driving technology heavily relies on perception and decision-making models trained on large amounts of high-quality, multi-view driving video data. However, the high cost of collecting and labeling real-world data has become a key bottleneck for technological development. To overcome this challenge, generative world models based on diffusion models (such as DriveDreamer2 and MagicDrive-V2) are considered a promising alternative, capable of synthesizing realistic driving scene videos.
[0003] While these methods have made progress in overall scene generation quality, they generally suffer from instance identity drift, meaning that the appearance, color, and even semantic category of the same object instance can change uncontrollably in consecutive frames of the generated video. For example... Figure 1 As shown. This problem severely reduces the realism, credibility, and usability of the generated videos. The direct technical root of this problem lies in three key flaws in existing methods: Lack of explicit instance identity criteria: When generating long sequences, the model cannot anchor a globally consistent identity for each instance, leading to semantic-level drift, such as... Figure 1 (a) shows the phenomenon where the vehicle becomes a truck.
[0004] Attention mechanisms lack instance perception capabilities: The current mainstream models employ a 3D full attention mechanism that interacts indiscriminately with all visual tokens, leading to leakage and interference of feature information between different instances. This makes it impossible to guarantee the appearance consistency of individual instances, such as... Figure 1 (b) shows the color offset.
[0005] The training objectives failed to focus on key prospects: The current approach employs a uniform supervised training strategy, forcing the model to reconstruct background pixels (such as the sky and buildings) and key foreground regions with equal importance. This makes it difficult for the model to focus on foreground instances, resulting in the dilution of the supervision signal for details. This particularly affects the generation quality and stability of small-scale objects, such as... Figure 1 As shown in (c).
[0006] These defects lead to instance-level temporal consistency issues, causing the appearance and category of objects in the generated video to change over time, making it difficult to meet the stringent temporal consistency requirements of downstream tasks such as autonomous driving perception and tracking. Summary of the Invention
[0007] This application proposes a temporal consistency scheme for video generation in driving scenarios, aiming to solve the problem of instance identity drift caused by the lack of explicit instance identity conditions, the lack of instance perception ability in the attention mechanism, and the failure of the training target to focus on the key foreground in the prior art.
[0008] The first aspect of this application provides a method for training a temporal consistency video generation model for driving scenarios, including: Obtain a training dataset, which includes multimodal driving scenario control conditions and corresponding real video sequences. The multimodal control conditions include at least the three-dimensional bounding box information of the instances. Based on the 3D bounding box information, an instance mask is generated, wherein the instance mask includes at least an instance identity mask and an instance trajectory mask. The instance identity mask is used to bind visual features to their corresponding instance identities in attention calculation, and the instance trajectory mask is used to restrict the interaction of visual features to the spatiotemporal trajectory of the same instance. An initial video generation model based on a diffusion model is constructed. The training dataset is input into the model and forward propagation is performed to generate video data. During the forward propagation process, the instance mask is applied in the self-attention calculation of the model to limit the interaction range of visual features, so that the visual features of each instance only interact spatiotemporally with its own features. Based on the difference between the generated video data and the real video sequence, a loss function is calculated in conjunction with the instance mask to strengthen the supervision weight of the foreground region covered by the instance mask; The model parameters are updated based on the loss function to obtain a video generation model with temporal consistency generation capability.
[0009] In some embodiments of this application, the multimodal control conditions further include road maps and scene text descriptions.
[0010] In some embodiments of this application, before generating the instance mask based on the three-dimensional bounding box information, the method further includes: Based on the instance's category label, size, and tracking ID, a global identity conditional embedding is generated for each instance through encoding and feature fusion.
[0011] In some embodiments of this application, the category labels are encoded using a CLIP text encoder; The dimensions and tracking ID are embedded using Fourier encoding.
[0012] In some embodiments of this application, the instance identity mask is used to bind visual features with corresponding instance identity conditions in self-attention computation; The instance trajectory mask is used in self-attention computation to constrain the interaction range of visual features, so that the interaction is limited to visual features of the same instance in different frames.
[0013] In some embodiments of this application, generating the corresponding instance mask based on the three-dimensional bounding box information includes: Project the three-dimensional bounding box of the example onto a two-dimensional image plane; The projection result is rasterized and then spatially downsampled to obtain the corresponding instance mask.
[0014] In some embodiments of this application, the step of limiting the interaction range of visual features by applying the instance mask in the self-attention computation of the model includes: By applying a mask matrix in self-attention computation to limit the interaction range of visual features, the attention weights between visual features that do not belong to the same instance are set to negative infinity.
[0015] In some embodiments of this application, calculating the loss function in conjunction with the instance mask includes: A loss mask is generated based on the instance mask; Whether to apply the loss mask is dynamically determined with a preset probability. When applied, the loss mask is multiplied by the original loss tensor element by element-wise multiplication to calculate the final loss value; otherwise, the standard loss is calculated.
[0016] A second aspect of this application provides a method for generating time-consistent video for driving scenarios, including: Obtain the multimodal control conditions of the target driving scenario, wherein the multimodal control conditions include the three-dimensional bounding box information of the instance; The multimodal control conditions are input into the video generation model trained by the method according to the first aspect of the embodiments of this application, and the target driving scene video with temporal consistency is output.
[0017] In some embodiments of this application, the video generation model includes a dual-stream MMDiT backbone network; The multimodal control conditions are injected into the video generation process through the ControlNet architecture, wherein the ControlNet architecture is configured to: replicate multiple base blocks of the dual-stream MMDiT backbone network as dedicated control blocks, and each control block fuses the conditional features with the output of the corresponding base block to modulate the feature stream.
[0018] In summary, the temporal consistency method and apparatus for driving scenario video generation provided in the embodiments of this application solve the semantic drift problem caused by missing identity conditions by constructing an instance identity condition generation mechanism to establish a unique identity representation with rich semantics for each instance. Through the instance mask attention mechanism, instance identity masks and instance trajectory masks are applied in self-attention calculation to limit the interaction range of visual features, thereby achieving instance feature isolation in the spatiotemporal dimension and completely solving the problem of information leakage between different instances, ensuring that the features of each instance only propagate within its own spatiotemporal trajectory. By adopting a probabilistic dynamic masking strategy to adjust the loss function and strengthen the supervision weight of the foreground region covered by the instance mask, differentiated supervision of the foreground region is achieved, effectively alleviating the supervision dilution problem caused by background pixel dominance and significantly improving the generation quality of small-scale instances. Finally, through the synergistic integration of the above technical features, an end-to-end temporal consistency guarantee system is formed, thereby providing a high-quality, low-cost simulation data solution for autonomous driving. Attached Figure Description
[0019] The features and advantages of this application will become clearer with reference to the accompanying drawings, which are illustrative and should not be construed as limiting the application in any way. In the drawings: Figure 1 This is an example of the limitations of existing methods in maintaining instance identity across frames; Figure 2 A schematic diagram of the overall architecture of the driving scene video generation method proposed in this application; Figure 3 This is a computer system architecture diagram to which the video generation method of this application applies; Figure 4 This is a computer system architecture diagram to which the video generation model training method of this application is applicable; Figure 5 This is a flowchart illustrating a method for training a temporally consistent video generation model for driving scenarios, according to some embodiments of this application. Figure 6 This is a flowchart illustrating a time-consistent video generation method for driving scenarios, according to some embodiments of this application; Figure 7 This is a comparison of the visual and temporal fidelity of our method with several cutting-edge driving world models on the nuScenes dataset. Figure 8 This is an embodiment of the present application based on the perception task comparison results of Panacea; Figure 9 This is a comparison of perception task performance results for generating nuScenes (T+I)2V verification data according to an embodiment of this application; Figure 10 This is a comparative analysis result of a multi-object tracking task based on a pre-trained StreamPETR, as an embodiment of this application; Figure 11 This is a qualitative ablation experiment result of one embodiment of this application; Figure 12 This is a quantitative ablation experiment result of an embodiment of this application in the nuScenes validation set (T+I) 2V scenario. Detailed Implementation
[0020] In the following detailed description, numerous specific details of this application are illustrated by example to provide a thorough understanding of the relevant disclosure. However, it will be apparent to those skilled in the art that this application can be practiced without these details. It should be understood that the terms “system,” “apparatus,” “unit,” and / or “module” used in this application are one way of distinguishing different parts, elements, sections, or components at different levels in a sequential arrangement. However, these terms may be replaced with other expressions if other expressions can achieve the same purpose.
[0021] It should be understood that when a device, unit, or module is referred to as being "on," "connected to," or "coupled to" another device, unit, or module, it may be directly connected to or coupled to or communicate with other devices, units, or modules, or there may be intermediate devices, units, or modules present, unless the context explicitly indicates otherwise. For example, the term "and / or" as used herein includes any one and all combinations of one or more of the relevant listed items.
[0022] The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates otherwise, words such as "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate that explicitly identified features, integrals, steps, operations, elements, and / or components are included, and such expressions do not constitute an exclusive list, and other features, integrals, steps, operations, elements, and / or components may also be included.
[0023] Referring to the following description and accompanying drawings, these and other features and characteristics, operating methods, functions of related structural elements, combinations of parts, and economics of manufacture of this application can be better understood, wherein the description and drawings form part of the specification. However, it is clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. It is understood that the drawings are not drawn to scale.
[0024] Various structural diagrams are used in this application to illustrate various variations of the embodiments according to this application. It should be understood that the preceding or following structures are not intended to limit this application. The scope of protection of this application is determined by the claims.
[0025] As described in the background section, the reliability of autonomous driving systems highly depends on high-quality, large-scale, multi-view driving video data; however, the acquisition and annotation of real-world data are costly. Generative driving world models based on diffusion models offer a cost-effective solution for large-scale synthesis of realistic driving scenarios, but their generated videos suffer from significant instance identity drift in practical applications—that is, the same object undergoes category or appearance changes in consecutive frames, such as… Figure 1 As shown in (a), (b), and (c), this severely limits the availability of the generated data in downstream tasks.
[0026] There are three main technical roots of identity drift: First, the lack of explicit instance identity conditions, such as the absence of semantic constraints like category in DriveDreamer2, leads to semantic inconsistencies across frames. Second, the attention mechanism of the diffusion transformer does not have instance awareness capability. For example, FLUX's MMDiT uses global attention, which causes information leakage between instances. Third, uniform frame-level supervision targets make it difficult for the model to focus on key foreground elements. For example, Panacea cannot maintain temporal consistency of small objects in complex backgrounds.
[0027] Figure 1 This is an example of the limitations of existing methods in maintaining instance identity across frames. Figure 1 (a) Category drift reveals the lack of a semantic identity anchoring mechanism; Figure 1 (b) Color shift reveals the inadequacy of the instance-aware attention mechanism; Figure 1 (c) The fuzzy foreground details reveal the shortcomings of homogenized monitoring objectives.
[0028] These problems are essentially due to the lack of precise control over instance granularity in existing methods at the level of feature interaction and loss constraints.
[0029] To address the aforementioned limitations, this application proposes a temporal consistency method for driving scene video generation. The core innovation of this method lies in applying instance-level constraints simultaneously at the feature space and loss function levels through a dual instance masking mechanism: on the one hand, by constructing instance identity masks and trajectory masks, intra-instance feature association and inter-instance isolation are enforced during attention calculation; on the other hand, the supervision weights for the foreground region are strengthened through dynamic masking loss.
[0030] Figure 2 This is a schematic diagram of the overall architecture of the method described in this application. For example... Figure 2As shown, the instance mask attention module ( Figure 2 a) Ensure instance-aware properties of feature interactions, while supervising the instance mask loss ( Figure 2 b) ensures that the training process focuses on the key foreground. This includes the instance mask construction process ( Figure 2 c) The generated mask provides the necessary input and basic support for the above modules.
[0031] Figure 3 This is a computer system architecture diagram to which the video generation method of this application applies. (Example:) Figure 3 As shown, the system mainly includes a control condition input unit, a timing consistency enhancement generation server, and a video output unit that are interconnected. The timing consistency enhancement generation server obtains the multimodal control conditions of the target driving scenario through the control condition input unit, and generates a driving video of the target scenario with timing consistency based on the multimodal control conditions, which is then sent to the video output unit. Wherein: The temporal consistency enhancement generation server is deployed with a video generation model trained on temporal consistency. During training, this model strengthens the supervision of the foreground region through an instance mask loss function, thus embedding the ability to maintain instance-level temporal consistency into the model parameters. Upon receiving multimodal control conditions, the server generates corresponding instance masks based on the 3D bounding box information of the instances. During the video generation process of the diffusion model, instance mask attention calculation is performed using the instance masks to constrain feature interactions, and relying on the aforementioned embedded capability, the foreground region of the generated video is ensured to have high temporal consistency. Finally, the server sends the generated temporally consistent latent representation to the video output unit.
[0032] The control condition input unit is an interface unit used to receive and preprocess user or upstream system commands. This unit is responsible for acquiring and encoding the multimodal control conditions of the target driving scenario, including at least the three-dimensional bounding box information of the instance, and can be extended to road maps, scene text descriptions, etc.
[0033] The video output unit is used to present and deliver the final result. This unit receives a potential representation from the time-consistency enhancement generation server, decodes it into a pixel-space video sequence using a video decoder, and outputs it. The output format can be saved as a video file, rendered in real-time to a display interface, or directly streamed to downstream application systems.
[0034] At the deployment level, the control condition input unit, the timing consistency enhancement generation server, and the video output unit can be physically deployed on a single server, a server cluster, or in a distributed cloud environment. They can be integrated as functional modules into autonomous driving simulation platforms (such as CARLA and Panosim), or provided as independent microservices to other systems to provide video generation capabilities.
[0035] Figure 4 This is a computer system architecture diagram applicable to the video generation model training method of this application. (For example...) Figure 4 As shown, the system includes a training database, a model training server, and a model repository with data connectivity.
[0036] The training database serves as the data foundation, storing training data used for model training. Each training data set consists of paired multimodal driving scenario control conditions and corresponding real video sequences. The multimodal control conditions include at least the 3D bounding box information of the instance and may also include road maps, scene text descriptions, etc.
[0037] The model training server is the computational core of the system, hosting the video generation model and executing the training algorithm. It reads data from the training database and continuously optimizes the model parameters through iterative forward inference, instance-mask-based loss calculation, and gradient backpropagation, enabling the model to learn to maintain instance-level temporal consistency. In this application, the video generation model is a diffusion-based video generation model.
[0038] The model repository is used to systematically store and version-manage the optimal model parameters generated during training.
[0039] Figure 5 This is a flowchart illustrating a method for training a temporal consistency video generation model for driving scenarios, according to some embodiments of this application. In some embodiments, the method for training a temporal consistency video generation model for driving scenarios is... Figure 4 The model training server execution specifically includes the following steps: S510, Obtain a training dataset, which includes multimodal driving scenario control conditions and corresponding real video sequences. The multimodal control conditions include at least the three-dimensional bounding box information of the instances.
[0040] This application constructs a training dataset based on multimodal driving scene control conditions obtained from autonomous driving datasets (such as nuScenes) and corresponding real video sequences. The control conditions include at least the 3D bounding box information of instances, and can be extended to road maps and scene text descriptions.
[0041] S520, Based on the three-dimensional bounding box information, an instance mask is generated, wherein the instance mask includes at least an instance identity mask and an instance trajectory mask. The instance identity mask is used to bind visual features to their corresponding instance identities in attention calculation, and the instance trajectory mask is used to restrict the interaction of visual features to the spatiotemporal trajectory of the same instance.
[0042] S530, Construct an initial video generation model based on a diffusion model, input the training dataset into the model and perform forward propagation to generate video data, wherein, during the forward propagation process, the instance mask is applied in the self-attention calculation of the model to limit the interaction range of visual features, so that the visual features of each instance only interact spatiotemporally with its own features.
[0043] The video generation model includes a learnable instance mask attention module. This module is designed to guide the model's attention to focus on each individual instance. For example... Figure 2 As shown in (a), this module constructs an instance mask from the object's bounding box (the mask construction process is as follows). Figure 2 (c) effectively prevents information leakage between different instances. The key operations within this module are described in detail below.
[0044] Instance identity condition generation: For each instance appearing in the video A global condition is constructed that integrates multiple factors of an instance, including its category, unique tracking ID, and bounding box size. These attributes collectively provide an informative representation of semantic identity and geometric configuration, which is crucial for consistently maintaining instance identity across frames. Specifically, a Fourier map is first applied... To encode and track ID and bounding box size Meanwhile, the CLIP-Large text encoder is employed. From category labels Semantic features are extracted from these components. These components are then concatenated and processed through a multilayer perceptron (MLP) to generate a global identity conditional embedding for the instance. The complete set of embeddings of all n instances in the video is denoted as: .
[0045] Instance mask attention construction: During the forward propagation process, the model transforms the input conditions and noise into feature representations. The resulting... Each visual marker is denoted as ,Will Each instance condition is denoted as Subsequently, in the instance mask attention module, the backbone features are... and instance conditions splicing, marked as Applying three-dimensional self-attention, the formula is as follows: It can be observed that standard self-attention without a mask leads to information leakage between instances, such as color features of one instance seeping into another. To address this issue, this application constructs a mask matrix. To determine the effective connections when implementing attention mechanisms: Indicator function for pixel blocks to instance IDs: Indicator Function This indicates that the projected bounding box covers the pixel block marker. The set of instance IDs of the spatial region, such as Figure 2 As shown in (c). Formally, each instance From a corner point (in The 3D bounding box representation of ). Given the first Camera parameters of a frame The corner points are projected as . The convex hull forms a polygon After rasterization, a binary mask is obtained. Further applying trilinear interpolation to map these masks into the latent space, denoted as... For image patch marking obtained from VAE compression ,definition: ,in It corresponds to The flattened visual marker.
[0046] Instance identity mask: For each visual marker and instance condition tags ,if Then set the attention mask to This mask ensures that each visual marker can only focus on the identity condition markers of its corresponding instance. This mechanism explicitly injects global identity features into the attention process, ensuring that each instance consistently maintains its identity over long time. Simultaneously, it strictly suppresses interactions between different instances, thus preventing identity leakage across objects.
[0047] Instance track mask: For two visual markers and ,if Then the attention score mask is This mask ensures that markers of the same instance in different frames can refer to each other, while strictly prohibiting interaction between different instances. This design maintains temporal consistency by explicitly allowing instance-specific features to propagate along their trajectories.
[0048] Finally, the output of the instance mask attention is added back into the backbone representation via gated addition: ,in It is a learnable scalar parameter (initialized to zero) used to adaptively control the contribution of the instance mask attention module.
[0049] S540, based on the difference between the generated video data and the real video sequence, a loss function is calculated in conjunction with the instance mask to strengthen the supervision weight of the foreground region covered by the instance mask.
[0050] S550, Update the model parameters based on the loss function to obtain a video generation model with temporal consistency generation capability.
[0051] The objective of this application is to ensure that foreground objects in a driving scene remain consistent across all frames of the generated video. However, existing training objectives uniformly supervise the entire frame, forcing the model to reconstruct background pixels (such as the sky and buildings) and key foreground regions with equal importance. Since background pixels dominate the scene, this supervision dilution introduces noise that interferes with model training, preventing the model from focusing on fine-grained identity-preserving features. Therefore, the temporal consistency of the foreground is easily compromised, especially for small objects. To address this issue, this application proposes an instance masking loss, which focuses the supervision signal on foreground objects, such as... Figure 2 As shown in (b) and (c). Specifically, this application uses a pixel block to instance ID indicator function. Construct a binary loss mask For each tag The mask is defined as This ensures that only tags covered by at least one instance are selected. The mask loss is calculated as follows: ,in This represents the original denoising loss. This represents element-wise multiplication. However, directly applying this mask loss to all training samples may cause the model to overfit to foreground objects, thereby impairing the generation quality of background regions (such as roads and high-resolution maps). To mitigate this problem, this application employs a probabilistic dynamic masking strategy. Specifically, it uses probability... Decide whether to apply mask loss: This stochastic approach allows the model to focus on foreground consistency while still preserving the natural realism of the background content.
[0052] Figure 6 This is a flowchart illustrating a method for generating time-consistent video for driving scenarios, according to some embodiments of this application. In some embodiments, the method for generating time-consistent video for driving scenarios comprises... Figure 3 The aforementioned time-series consistency enhancement generation server execution specifically includes the following steps: S610, Obtain the multimodal control conditions of the target driving scenario, wherein the multimodal control conditions include the three-dimensional bounding box information of the instance.
[0053] S620, the multimodal control conditions are input into the video generation model trained according to the method described in s510-s550, and the target driving scene video with temporal consistency is output.
[0054] In a preferred embodiment of this application, the video generation model uses OpenSora V2.0 as its basic framework. Variational autoencoder (Video DC-AE) is used for video encoding, T5XXL and CLIP-Large are used for text encoding, and MMDiT is used as the base model for the denoising process. To achieve fine-grained control, this application introduces a comprehensive set of control conditions, including bounding box projection, road maps, and scene descriptions, and integrates them into the conditional video generation process. Furthermore, this application introduces instance category labels, instance size, and tracking IDs to extract instance identity conditions and incorporate them into the attention process; this is the key mechanism of the instance mask attention module proposed in this application. Considering the need to process multiple control elements, this embodiment uses ControlNet to inject control signals into the video generation process. To integrate these control-aware representations, this embodiment replicates the first 19 base blocks of the dual-stream MMDiT backbone network as dedicated control blocks. Each control block fuses conditional features with the output of the corresponding base block, thereby modulating the feature stream and ensuring that control signals are effectively incorporated throughout the generation process.
[0055] First, control condition encoding and instance mask construction are performed. ,include: Control condition coding : The goal is to transform various control signals input by the user into normalized data that the model can understand. Some embodiments of this application include: Text conditions: Scene descriptions like “Busy Street, cars driving.” are fed into the T5-XXL and CLIP-Large text encoders to generate a comprehensive semantic feature vector, which guides the overall atmosphere and scene content of the generated video.
[0056] Geometric conditions: Vehicle bounding box projection: The 3D vehicle bounding box information provided by the user will be precisely projected onto the 2D plane of each frame image using the camera's intrinsic and extrinsic parameters to form the vehicle's outline.
[0057] Map projection: High-precision map information (such as lane lines and drivable areas) is also projected into the image space to provide the model with the layout structure of the scene.
[0058] Instance identity condition generation: For each instance defined in the control conditions (e.g., there are 3 cars in the scene), the model constructs a unique global identity conditional embedding for it. Specifically: category For example, the semantic features of the word "car" are obtained through the CLIP text encoder.
[0059] size The dimensions (length, width, height) of the 3D bounding box are embedded using Fourier encoding.
[0060] track : A unique identifier for each instance, also Fourier encoded.
[0061] These features are concatenated and passed through a multilayer perceptron (MLP) to ultimately generate an embedding vector representing the unique identity of the instance. The embeddings of all instances constitute a set. .
[0062] Instance mask construction : Using the projected 2D bounding box information, the model generates a binary mask for each instance in the latent space through rasterization and trilinear interpolation. .
[0063] Instance trajectory mask: Based on the instance's tracking ID, associate the masks in different frames to form the instance's spatiotemporal trajectory.
[0064] Instance loss mask: Combine the masks of all foreground instances to obtain a total mask used to guide the training loss to focus on the foreground region.
[0065] Next, denoising generation based on instance mask attention is performed. (Iterative reasoning) This is the core generation loop of the model, based on a diffusion model, which iteratively "carves" video frames from random noise through multiple iterations, including: Latent representation and noise initialization: First, the model initializes a latent representation of random noise. Its dimensions are (e.g., 16×32×56).
[0066] Control signal injection : Potential representation Along with control conditions (text features, bounding box projection features, map features, etc.), they are fed into the model's backbone network (MMDiT). The control signals are integrated into the feature flow of the backbone network through a dedicated ControlNet block.
[0067] Instance mask attention operation : In the attention layer of MMDiT, visual markers ( , from ) and instance identity condition tags They are spliced together for self-attention calculation.
[0068] Apply a mask to prevent information leakage: When calculating attention weights, the instance identity mask forces each visual tag to focus only on the identity condition tags of its own instance (e.g., a pixel tag belonging to "red car" only focuses on "red car"). This avoids interference between the appearance features of different vehicles. At the same time, the instance trajectory mask restricts attention to different frames of the same instance, ensuring that, for example, the features of "red car" in frame 1 can only be used to predict "red car" in frame 2.
[0069] Through this restricted attention mechanism, the model can accurately "recall" the appearance (color, texture) and semantic (category) information that each instance should have when generating each frame, and propagate it stably over time, thereby effectively preventing identity drift.
[0070] Feature fusion and denoising prediction : After undergoing multi-layer instance-aware attention transformation, the model outputs a denoised latent representation. This process is repeated until a clean latent representation is obtained. .
[0071] Finally, video decoding and output are performed. Ultimately, the generated latent representation The video is fed into a video decompressor (such as the decoder in Video DC-AE), upsampled, and decoded back into pixel space to form the final, high-fidelity driving scene video with high instance-level temporal consistency.
[0072] One embodiment of this application evaluates a model trained using the method described in s510-s550 (hereinafter referred to as "this method") on the nuScenes dataset. To comprehensively measure the performance of this method, this application compares the model with state-of-the-art driving world models, including BEVControl, DriveDiffusion, DriveDreamer2, Panacea, and MagicDrive-V2.
[0073] Evaluation indicators: To systematically evaluate the quality of the generated videos, the comparative experiment used multi-dimensional quantitative indicators: Visual Realism Assessment : FID and FVD are used to measure the visual quality of the generated images and the temporal coherence of the video sequence, respectively.
[0074] Attribute binding effect verification : The alignment of generated instances with preset categories, sizes, and other conditions is evaluated through a perception task. Since accurate category recognition and size localization are fundamental requirements for a perception system, perception performance directly reflects the semantic and geometric accuracy of the generated content. Specifically, the video-based perception model StreamPETR is used, and the detection score (NDS) and mean average precision (mAP) based on the nuScenes dataset are reported. mAP directly measures the accuracy of object category detection, while NDS integrates multiple factors such as category detection, localization, and orientation estimation to provide an overall evaluation of perception quality.
[0075] Instance feature propagation capability analysis : Further evaluation of the model's performance in real-world autonomous driving scenarios is conducted using multi-object tracking (MOT) tasks. MOT tasks explicitly measure the model's ability to maintain consistent object identities through metrics such as ID switching counts. StreamPETR is used as the tracker, and standard MOT metrics such as AMOTA, AMOTP, and IDS are reported.
[0076] Training details: The training in the experiment was implemented using the Open-Sora 2.0 framework. All training inputs were uniformly set to a resolution of 16 frames × 256 × 448, and training was completed on 64 A100 GPUs. Subsequent experimental results show that this method can stably generate long video sequences of more than 200 frames.
[0077] Experimental verification results: (1) Quantitative analysis of experimental results To verify the superiority of the generated videos in terms of fine-grained temporal consistency and high fidelity, comparative experiments were conducted using the annotations of the nuScenes dataset as conditional signals to generate training and validation data, and a comprehensive comparison was made with various cutting-edge driving world models.
[0078] 1. Visual realism and temporal fidelity : like Figure 7 As shown, the video sequences generated by this method exhibit excellent temporal fidelity, significantly reducing the FVD metric to 37.23. This improvement is mainly attributed to the proposed instance mask attention module, which effectively enhances instance-level temporal consistency by preserving instance attribute features across frames. In terms of visual quality, the proposed method achieves an FID value of 3.88, significantly outperforming video-based generation methods (such as DriveDreamer2) and image-based solutions (such as BEVControl). These data fully demonstrate that the images generated by this method not only possess stronger temporal coherence but also exhibit higher-quality visual realism.
[0079] 2. Evaluation of Instance Property Binding Effect : The experiment measures instance-level temporal consistency by evaluating the binding effect between global instance attributes and generated content. In the field of autonomous driving, perception tasks heavily rely on accurate category recognition and size localization capabilities, making them natural indicators for measuring attribute binding quality. Therefore, the experiment focuses on evaluating the alignment between generated instances and preset control conditions such as category and size, which directly reflects the fidelity of instance attribute binding.
[0080] Data Augmentation Performance Verification : like Figure 8 As shown, training the StreamPETR model using only the dataset generated by this method yields a mean average precision (mAP) of 31.5%, which is 91.3% of the performance achieved by training the model using only the real nuScenes dataset. When the generated videos are further combined with real data for joint training, the NDS of the perceptual model reaches 54.6, which is 7.7 percentage points higher than training with only real data, highlighting the significant gains brought by incorporating generated data.
[0081] Perceptual verification performance : The method was evaluated on the generated nuScenes validation set using a pre-trained StreamPETR model. The method achieved a relative performance of 88.23% on the NDS metric, significantly outperforming [previous method]. Figure 9 Other baseline models listed in the table. And no post-optimization processing is required.
[0082] 3. Analysis of instance attribute propagation capability: The experiment further verifies instance-level temporal consistency by evaluating the propagation efficiency of instance attributes across frames. For example... Figure 10 As shown, in multi-object tracking tasks, the model needs to track instances based on consistent attributes over time, making MOT (Modal of Attributes) a strong metric for measuring the quality of attribute propagation. Specifically, the experiment generated videos based on annotations from the nuScenes validation set and used them as training data for the augmented object tracking model StreamPETR. Experimental data show that the MOT model trained with the generated data exhibits significantly improved performance, reducing the number of identity switching occurrences to 525.
[0083] (2) Qualitative analysis of experimental results The experiment, through detailed observation of the generated video sequences, conducted a qualitative comparative analysis between our method and existing state-of-the-art baseline methods, with typical examples including... Figure 1 As shown.
[0084] Instance property binding capability (category consistency) : like Figure 1 As shown in (a), DriveDreamer2 suffers from a significant semantic drift problem: the category of a car gradually changes to truck across consecutive frames. In contrast, our method maintains strict consistency in semantic category across all frames, demonstrating stronger instance-level temporal consistency. This improvement stems from the instance identity masking mechanism in the instance masking attention module, which effectively eliminates category-level semantic drift by explicitly binding identity features to corresponding instance identifiers.
[0085] Instance attribute propagation capability (color consistency) : exist Figure 1 In case (b), MagicDrive-V2 exhibits significant color inconsistency: the same car changes from black to red between different frames. In contrast, our method maintains stable color and texture attributes throughout the video, demonstrating its superior attribute propagation capabilities over time. This advantage stems from the application of instance trajectory masks, a mechanism that effectively prevents appearance feature drift by constraining cross-frame attention to occur only within the same instance trajectory.
[0086] Foreground detail enhancement : exist Figure 1 In case (c), Panacea generates blurred results for small-scale challenging objects (such as pedestrians), while our method significantly improves detail fidelity. This improvement stems from the instance mask loss supervision mechanism, which prioritizes supervision signals from the foreground region to ensure that foreground details are not diluted by background noise, even in scenes where the foreground space occupies a very small proportion and the background pixels dominate, thereby significantly improving the generated sharpness of small objects.
[0087] Three sets of comparative experiments can intuitively verify that this method is significantly better than the baseline in terms of instance-level semantic attribute binding, appearance feature propagation, and foreground detail preservation, fully demonstrating its technical advantage of achieving instance identity preservation through a dual masking mechanism.
[0088] (3) Ablation test The experiment systematically verified the effectiveness and robustness of the three key components of this method through a combination of qualitative analysis and quantitative evaluation. Qualitative comparison results are as follows: Figure 11 As shown, detailed quantitative data can be found in [link to data]. Figure 12 , Figure 12 The method is named ConsisDrive.
[0089] The role of the instance identity mask in verification : To evaluate the specific contribution of the instance identity mask in the instance mask attention module, the experiment removed the global instance identity condition (i.e., set the instance identity mask value to...). Ablation experiments were performed. Quantitative results showed (e.g.) Figure 12 The lack of global identity criteria resulted in a 2.96 percentage point decrease in the NDS metric for the perception task. This data clearly confirms the crucial role of this component in accurately binding category and size criteria to the corresponding instances, effectively ensuring the reliability of instance attribute binding.
[0090] Figure 11 (a) Qualitatively demonstrates the impact of removing the instance identity mask: when the instance identity mask is removed, it leads to incorrect instance category rendering. As shown in the figure, a traffic cone instance is incorrectly generated as a crouching pedestrian, indicating that the model cannot maintain the correct semantic identity binding.
[0091] Functional analysis of instance trajectory mask : Ablation experiments were conducted on the instance trajectory mask (i.e., the trajectory mask was set to...). (With trajectory-based attention mechanisms disabled), the results showed a significant increase of 542 ID switching times in multi-object tracking tasks, while the FVD metric deteriorated by 15.6 percentage points (e.g. Figure 12 These data highlight the component's indispensable importance in propagating across frames and maintaining instance properties such as color consistency.
[0092] Figure 11 (b) Qualitatively, the impact of removing the instance trajectory mask is shown: After removing the instance trajectory mask, the same vehicle instance exhibits color shifts between different frames. This verifies the crucial role of the trajectory mask in maintaining the consistency of instance appearance attributes (such as color) across frames.
[0093] Performance testing of instance mask loss supervision : A comparative experiment, involving removing the instance mask loss supervision and retaining only the standard denoising loss, reveals a 3.66 percentage point decrease in the NDS metric (e.g., ...). Figure 12 ). Figure 11 (c) Qualitatively, the impact of removing foreground supervision is shown: After removing instance mask loss supervision for the foreground, the generation quality of small-scale objects (such as pedestrians) is significantly reduced, resulting in a blurry effect.
[0094] The above demonstrates that this module plays a crucial role in enhancing foreground region supervision. Its mechanism lies in the fact that when the foreground space occupies a relatively small area, this loss effectively prevents the foreground signal from being overwhelmed, thereby significantly improving the generation fidelity of small-scale and visually challenging objects.
[0095] A series of ablation experiments show that the three core components work together from the three dimensions of identity binding, trajectory preservation, and foreground focusing to jointly ensure the realization of instance-level temporal consistency.
[0096] In summary, the temporal consistency method and apparatus for driving scenario video generation provided in the embodiments of this application solve the semantic drift problem caused by missing identity conditions by constructing an instance identity condition generation mechanism to establish a unique identity representation with rich semantics for each instance. Through the instance mask attention mechanism, instance identity masks and instance trajectory masks are applied in self-attention calculation to limit the interaction range of visual features, thereby achieving instance feature isolation in the spatiotemporal dimension and completely solving the problem of information leakage between different instances, ensuring that the features of each instance only propagate within its own spatiotemporal trajectory. By adopting a probabilistic dynamic masking strategy to adjust the loss function and strengthen the supervision weight of the foreground region covered by the instance mask, differentiated supervision of the foreground region is achieved, effectively alleviating the supervision dilution problem caused by background pixel dominance and significantly improving the generation quality of small-scale instances. Finally, through the synergistic integration of the above technical features, an end-to-end temporal consistency guarantee system is formed, thereby providing a high-quality, low-cost simulation data solution for autonomous driving.
[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding descriptions in the foregoing device embodiments, and will not be repeated here.
[0098] Although the subject matter described herein is provided in the general context of execution on a computer system in conjunction with an operating system and applications, those skilled in the art will recognize that other implementations can also be executed in conjunction with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform specific tasks or implement specific abstract data types. Those skilled in the art will understand that the subject matter described herein can be practiced using other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframes, etc., and can also be used in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may reside on both local and remote memory storage devices.
[0099] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0100] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of this application and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of this application should be included within the protection scope of this application. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A training method for a temporal consistency video generation model for driving scenarios, characterized in that, include: Obtain a training dataset, which includes multimodal driving scenario control conditions and corresponding real video sequences. The multimodal driving scenario control conditions include at least the three-dimensional bounding box information of the instances. Based on the 3D bounding box information, an instance mask is generated, wherein the instance mask includes at least an instance identity mask and an instance trajectory mask. The instance identity mask is used to bind visual features to their corresponding instance identities in attention calculation, and the instance trajectory mask is used to restrict the interaction of visual features to the spatiotemporal trajectory of the same instance. An initial video generation model based on a diffusion model is constructed. The training dataset is input into the model and forward propagation is performed to generate video data. During the forward propagation process, the instance mask is applied in the self-attention calculation of the model to limit the interaction range of visual features, so that the visual features of each instance only interact spatiotemporally with its own features. Based on the difference between the generated video data and the real video sequence, a loss function is calculated in conjunction with the instance mask to strengthen the supervision weight of the foreground region covered by the instance mask; The model parameters are updated based on the loss function to obtain a video generation model with temporal consistency generation capability.
2. The method according to claim 1, characterized in that: The multimodal driving scenario control conditions also include road maps and scenario text descriptions.
3. The method according to claim 1, characterized in that, Before generating the instance mask based on the 3D bounding box information, the process further includes: Based on the instance's category label, size, and tracking ID, a global identity conditional embedding is generated for each instance through encoding and feature fusion.
4. The method according to claim 3, characterized in that: The category labels are encoded using the CLIP text encoder; The dimensions and tracking ID are embedded using Fourier encoding.
5. The method according to claim 3, characterized in that: The instance identity mask is used to bind visual features with corresponding instance identity conditions in self-attention computation; The instance trajectory mask is used in self-attention computation to constrain the interaction range of visual features, so that the interaction is limited to visual features of the same instance in different frames.
6. The method according to claim 1, characterized in that, The step of generating the corresponding instance mask based on the 3D bounding box information includes: Project the three-dimensional bounding box of the example onto a two-dimensional image plane; The projection result is rasterized and then spatially downsampled to obtain the corresponding instance mask.
7. The method according to claim 1, characterized in that, The method of limiting the interaction range of visual features by applying the instance mask in the self-attention calculation of the model includes: By applying a mask matrix in self-attention computation to limit the interaction range of visual features, the attention weights between visual features that do not belong to the same instance are set to negative infinity.
8. The method according to claim 1, characterized in that, The loss function calculated using the instance mask includes: A loss mask is generated based on the instance mask; Whether to apply the loss mask is dynamically determined with a preset probability. When applied, the loss mask is multiplied by the original loss tensor element by element-wise multiplication to calculate the final loss value; otherwise, the standard loss is calculated.
9. A method for generating time-consistent video for driving scenarios, characterized in that, include: Obtain the multimodal control conditions of the target driving scenario, wherein the multimodal control conditions include the three-dimensional bounding box information of the instance; The multimodal control conditions are input into the video generation model trained by the method according to any one of claims 1-8, and the video of the target driving scene with temporal consistency is output.
10. The method according to claim 9, characterized in that: The video generation model includes a dual-stream MMDiT backbone network; The multimodal control conditions are injected into the video generation process through the ControlNet architecture, wherein the ControlNet architecture is configured to: replicate multiple base blocks of the dual-stream MMDiT backbone network as dedicated control blocks, and each control block fuses the conditional features with the output of the corresponding base block to modulate the feature stream.
