An event visual self-supervised optical flow estimation method and system for quadruped robots
By employing an event-visual self-supervised optical flow estimation method, the problem of unstable optical flow estimation in high-dynamic motion scenarios of quadruped robots is solved. Multi-scale optical flow prediction and multi-constraint loss training are used to achieve accurate output and stability of dense optical flow, making it suitable for real-time applications in complex environments.
Patent Information
- Application Number
- CN202611410421.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-27
AI Technical Summary
In high-dynamic motion scenarios, the optical flow estimation of quadruped robots suffers from problems such as insufficient alignment, unstable prediction of forward and backward optical flow, and a large number of local pseudo-optical flows. Existing methods are difficult to achieve accurate continuity and stability of the optical flow field under conditions of severe vibration, foot impact, and changes in illumination.
We employ an event-based visual self-supervised optical flow estimation method. By dividing the event time window, multi-scale optical flow prediction, event back-projection, and multi-constraint loss calculation, we construct a multi-scale optical flow estimation network. We use event voxel tensors and count maps for self-supervised training of the optical flow field, and combine contrast maximization, cycle consistency, and smoothing regularization loss for network optimization.
It improves the accuracy and stability of optical flow estimation without requiring pixel-level real optical flow labels, adapts to different terrains, movement speeds and lighting conditions, and meets the real-time requirements of online deployment of quadruped robots.
Smart Images

Figure CN123181514A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of robot vision, event camera information processing, and optical flow estimation, and particularly to an event vision self-supervised optical flow estimation method and system for quadruped robots. Background Technology
[0002] Quadruped robots can perform inspection, rescue, exploration, and security tasks in unstructured environments such as building corridors, woodlands, rugged roads, and disaster sites. To achieve autonomous navigation, obstacle avoidance, visual odometry, and environmental understanding, the robot's vision system needs to obtain motion information of the scene structure in the image plane in real time, and optical flow is an important basis for representing this motion information.
[0003] Traditional frame-based cameras expose and image at a fixed frame rate. When a quadruped robot trots, turns, or crosses uneven terrain, the body experiences periodic vibrations, foot contact impacts, and short-term posture fluctuations. Frame-based images are prone to motion blur, overexposure, or underexposure, and the limited frame rate makes it difficult to continuously record fast motion processes, thereby reducing the accuracy and stability of optical flow estimation.
[0004] The event camera asynchronously outputs events when pixel brightness changes exceed a threshold, featuring microsecond-level temporal resolution, low latency, and high dynamic range, making it suitable for high-speed motion and lighting change scenarios. However, the high-frequency vibrations caused by the quadruped robot's movement can lead to irregular shifts in the edges of the same structure within the time window, resulting in event time diffusion and local misalignment. Foot impacts and posture changes can cause inconsistencies in the direction and amplitude of motion within adjacent time windows, causing local jitter in the forward and backward optical flows. Unstructured terrain, near-ground motion, and uneven event triggering can also generate local pseudo-optical flows and high-frequency noise.
[0005] Existing event-based optical flow methods typically employ event temporal alignment or single photometric constraints for self-supervised training, primarily focusing on the focus of the event's back-projected image. They lack sufficient constraints on the reversibility of forward and backward motion in the temporal dimension and the local spatial continuity of the optical flow field. Under conditions of severe vibration, foot impact, and varying illumination in quadruped robots, discontinuities in the optical flow field, broken motion boundaries, and local outliers easily arise. Therefore, a visual optical flow estimation scheme for events is needed that does not require pixel-level real optical flow labels and can simultaneously constrain event temporal focus, forward and backward motion consistency, and local spatial continuity. Summary of the Invention
[0006] To address the problems of insufficient event alignment, unstable forward and backward optical flow prediction, and numerous local pseudo-optical flows in existing technologies for quadruped robots in high-dynamic motion scenarios, this invention provides an event-visual self-supervised optical flow estimation method and system for quadruped robots.
[0007] The objective of this invention is achieved as follows: a self-supervised optical flow estimation method for event vision in quadruped robots, comprising the following steps:
[0008] S1. Event Acquisition and Window Division: Asynchronous event streams are acquired by an event camera installed on the body of the quadruped robot. The asynchronous event streams are divided into multiple event time windows according to a preset time length, and the event timestamps in each event time window are normalized.
[0009] S2. Event Representation Construction: Distribute events within each event time window to multiple time channels according to normalized timestamps, construct event voxel tensors, and construct an event counting graph based on the number of event triggers at each pixel position;
[0010] S3. Multi-scale optical flow prediction: The event voxel tensor and event count map are input into the multi-scale optical flow estimation network, and the forward optical flow and backward optical flow are obtained through the encoder, residual feature extraction unit and decoder.
[0011] S4. Event back projection: Based on the forward optical flow and backward optical flow, positive polarity events and negative polarity events are compensated to the start and end times of the event time window, respectively, to generate corresponding event back projection images and timestamp accumulation maps.
[0012] S5. Multi-constraint loss calculation: Calculate the contrast maximization loss based on the event back-projection image and timestamp cumulative image, calculate the cycle consistency loss based on the forward optical flow and backward optical flow, and calculate the smoothing regularization loss based on the gradient between adjacent pixels in the optical flow field.
[0013] S6. Network parameter update: The contrast maximization loss, cycle consistency loss and smoothing regularization loss are weighted and summed according to preset weights to obtain the total loss. The multi-scale optical flow estimation network is backpropagated and trained based on the total loss.
[0014] S7. Online optical flow output: The trained multi-scale optical flow estimation network is deployed on a quadruped robot computing platform to output a dense optical flow field using real-time acquired event streams.
[0015] As a further improvement of the present invention, the i-th event in the event stream in step S1 is represented as: ,in and For pixel coordinates, For timestamps, The event polarity is defined in step S2. The normalized time coordinates are mapped to B time channels, and linear interpolation is used to assign the same event to adjacent time channels, forming an event voxel tensor of size B×H×W. The event counting map is a single-channel tensor of size 1×H×W, where H and W are the height and width corresponding to the camera resolution of the event, respectively.
[0016] As a further improvement of the present invention, the number of time channels B is 5; the event voxel tensor and the event count map are concatenated in the channel dimension and then input into the multi-scale optical flow estimation network, or the event voxel tensor and the event count map are fused after feature extraction by convolutional layers respectively.
[0017] As a further improvement of the present invention, the multi-scale optical flow estimation network includes a four-level encoder, at least two residual blocks, and a four-level decoder connected in sequence; each encoder includes a convolutional layer, a downsampling layer, and a nonlinear activation layer, used to progressively expand the receptive field to extract event spatiotemporal features at different scales; each residual block is added to the convolutional mapping branch through an identity mapping branch to enhance the expression of local high-speed motion and high-frequency vibration features; each decoder recovers the spatial resolution through bilinear upsampling and convolution, and is spliced or added to the output features of the encoder at the corresponding scale through skip connections; optical flow prediction heads are set at at least two decoding scales, each optical flow prediction head is composed of 1×1 convolution and outputs forward and backward optical flows of the corresponding resolution, wherein the optical flow prediction result of the highest resolution is used as the online dense optical flow output.
[0018] As a further improvement of the present invention, in step S4, forward event back-projection images are generated for positive and negative polarity events respectively. , Back projection image of the back event , The same scattering accumulation is performed on the normalized timestamps to obtain the corresponding timestamp accumulation map. , , , .
[0019] As a further improvement of the present invention, the contrast maximization loss is obtained by summing the squares of the ratios of the cumulative timestamp images and the back-projected images of the corresponding events, so that edge events of the same scene after optical flow compensation are clustered in spatial location.
[0020] As a further improvement of the present invention, the cyclic consistency loss is the average L1 norm of the sum of the forward optical flow and the backward optical flow mapped to the corresponding forward position, so that when the same pixel moves along the forward optical flow and then returns along the backward optical flow, it is close to the original position.
[0021] As a further improvement of the present invention, the smoothing regularization loss is determined based on the gradient of the optical flow field in the horizontal and vertical directions; the total loss is expressed as... In the formula , , Contrast maximization loss Cyclic consistency loss And smoothing regularization loss The weights; where Take 0.3, Take 0.4, The initial learning rate is set to 0.1; the network training uses the Adam optimizer with an initial learning rate of 1*10. -4 The learning rate is updated using cosine annealing.
[0022] As a further improvement of the present invention, a reference optical flow generation step is also included, which is used to quantitatively verify the trained network under the condition of no real optical flow label. The reference optical flow generation step includes: reading the depth map and its timestamp, camera pose trajectory, camera intrinsic parameters, extrinsic parameters between the event camera and the depth camera, and time offset parameters; uniformly correcting the depth map timestamp and pose timestamp and interpolating the pose; back-projecting the depth pixels into three-dimensional points, transforming them to the event camera coordinate system, updating the position of the three-dimensional points according to the relative pose at adjacent times and reprojecting them onto the image plane, and using the pixel displacement before and after reprojection as the reference optical flow.
[0023] This invention also proposes an event-visual self-supervised optical flow estimation system for quadruped robots, comprising:
[0024] The event acquisition module is used to collect asynchronous event streams during the movement of the quadruped robot;
[0025] The event encoding module is used to construct the event stream into an event voxel tensor and an event count graph;
[0026] An optical flow estimation module is used to output forward and backward optical flow based on a multi-scale encoder-decoder network;
[0027] The event backprojection module is used to generate event backprojection images and timestamp accumulation maps based on the predicted optical flow;
[0028] A multi-constraint self-supervised loss module is used to calculate contrast maximization loss, cycle consistency loss, and smoothing regularization loss;
[0029] The training update module is used to update the network parameters of the optical flow estimation module based on the weighted total loss.
[0030] An online output module is used to output a dense optical flow field using the trained network.
[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0032] 1. Network training can be performed without relying on pixel-level real optical flow labels, reducing the cost of optical flow annotation in real-world quadruped robots and adapting to different terrains, movement speeds and lighting conditions.
[0033] 2. The contrast maximization loss directly improves the event aggregation degree after optical flow compensation, and can constrain the event time diffusion and edge misalignment caused by body vibration.
[0034] 3. Cyclic consistency loss, based on the reversible relationship of forward and backward motion, can suppress optical flow jitter in adjacent time windows caused by foot impact and rapid attitude changes, thereby improving timing stability.
[0035] 4. Smoothing regularization loss can reduce local pseudo-optical flow caused by uneven event triggering and background noise, while avoiding over-smoothing of motion boundaries by using smaller weights.
[0036] 5. The combined input of event voxels and event count maps takes into account both the temporal distribution of events and the spatial triggering intensity. The multi-scale encoder-decoder structure can recover dense optical flow and meet the real-time requirements of online deployment of quadruped robots.
[0037] 6. The reference optical flow generation process utilizes depth, pose, intrinsic and extrinsic parameters to form a pixel-level reference result aligned with the event data, facilitating a unified evaluation of optical flow methods for different events. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the overall framework for event vision self-supervised optical flow estimation for quadruped robots provided by the present invention.
[0040] Figure 2 This is a schematic diagram of the event optical flow estimation network structure provided by the present invention.
[0041] Figure 3 The flowchart shows the training process of the self-supervised optical flow estimation method provided by this invention.
[0042] Figure 4 A schematic diagram of the reference optical flow generation process provided by the present invention.
[0043] Figure 5This is a schematic diagram of the deployment of the online optical flow estimation system for quadruped robots provided by the present invention.
[0044] Among them, (101) quadruped robot and event camera, (102) event window partitioning and time normalization, (103) joint encoding of event voxels and count maps, (104) multi-scale optical flow estimation network, (105) dense optical flow output and downstream applications, (106) forward / backward optical flow and event back projection, (107) contrast maximization constraint, (108) cycle consistency constraint, (109) smoothing regularization constraint, (110) weighted total loss and parameter update; (401) depth map and timestamp, (402) robot pose trajectory, (403) camera intrinsic parameters. (404) External parameters and time offset, (405) Time uniform correction and pose interpolation, (406) Depth pixel back projection, (407) Coordinate system transformation and relative pose transformation, (408) Reprojection and pixel displacement calculation, (409) Reference optical flow and effective mask; (5001) Quadruped robot platform, (502) Event stream receiving and buffering module, (503) Event encoding module, (504) Optical flow estimation processor, (505) Visual odometry / pose estimation module, (506) Obstacle detection and motion compensation module, (507) Navigation, obstacle avoidance and path planning module. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] Example 1
[0047] like Figure 1 The following is a self-supervised optical flow estimation method for event vision in quadruped robots, with the following specific steps:
[0048] (1) Event acquisition and window division:
[0049] An event camera is fixedly mounted on the front or top of the quadruped robot platform (501), with the optical axis of the event camera facing the robot's forward direction or the area to be observed. The event camera outputs an asynchronous event stream, which is buffered by the event stream receiving and caching module (502) according to a preset time window. The preset time window can be set according to the robot's speed, event density, and the processing capability of the computing platform, for example, a window of 10ms to 100ms; or the current window can be closed when a preset number of events is reached.
[0050] Events in an event stream are represented as follows:
[0051]
[0052] Where N represents the number of events in the current window, and For pixel coordinates, For event timestamps, ∈{-1, +1} represents the event polarity. To eliminate the influence of different window durations, the timestamp is normalized as follows:
[0053]
[0054] in, and These represent the start and end times of the current event window, respectively, and B represents the number of time channels for the event voxel.
[0055] (2) Joint encoding of event voxels and event count graphs:
[0056] The event encoding module (503) projects events onto adjacent time channels based on normalized time coordinates. Event voxels can be constructed using the following formula:
[0057]
[0058] Where b∈{0,1,…,B-1} is the time channel index. Through linear interpolation, the continuous information of events in the time dimension is preserved. The event count graph is constructed as follows:
[0059]
[0060] Event voxels are used to describe the polarity and temporal evolution of events, while event count maps are used to describe spatial trigger density. Preferably, B=5, and the five-channel event voxels and the single-channel event count map are combined into the network input; alternatively, features can be extracted separately through convolutional layers and then fused in the encoder.
[0061] (3) Multi-scale optical flow estimation network:
[0062] like Figure 2As shown, the optical flow estimation processor (504) stores a multi-scale optical flow estimation network, into which event voxel tensors and event count maps are input. The network includes a four-level encoder, two residual blocks, and a four-level decoder. Each encoder level includes 3×3 convolution, downsampling, and nonlinear activation to progressively expand the receptive field to extract spatiotemporal features under different receptive fields. The residual blocks are added through identity mapping and convolutional mapping to enhance the expression of local high-speed motion and high-frequency vibration features. The decoder recovers the spatial resolution through bilinear upsampling and concatenates or adds the features output by the corresponding encoder. Each decoding scale is equipped with a 1×1 convolutional optical flow prediction head to output optical flow at different resolutions. The highest resolution prediction is output as the online dense optical flow.
[0063] During the training phase, the same network processes both forward-order and reverse-order temporal inputs separately, or outputs forward optical flow through dual prediction heads with shared features. and backward optical flow .
[0064] (4) Event backprojection and contrast maximization loss:
[0065] Based on the predicted optical flow, positive and negative events are compensated to the start and end times of the event window, respectively, forming forward and backward event back-projection images (IWE) and a timestamp accumulation map (TS). Correct optical flow should cause events belonging to the same scene edge to cluster in close spatial locations after compensation, specifically:
[0066] Regarding the event Its compensation position at the target reference time τ can be expressed as:
[0067]
[0068] in, and These represent the horizontal and vertical components of the predicted optical flow, respectively. Event compensation to the end of the window yields the forward backprojection result, and event compensation to the beginning of the window yields the backward backprojection result. These are then generated according to positive and negative polarities, respectively. , , and Bilinear scattering accumulation is performed on each backprojection location to obtain the event backprojection image; the same scattering accumulation is performed on the normalized timestamp to obtain the corresponding timestamp accumulation map TS.
[0069] In one implementation, the contrast maximization loss is expressed as:
[0070]
[0071] When the predicted optical flow matches the actual motion, events generated at the edge of the same object are concentrated in close proximity after backprojection, resulting in a clearer structure and more concentrated timestamp distribution in the backprojected image. By minimizing the loss in the form of temporal dispersion, the network can learn optical flow to compensate for body vibrations and attitude changes. In practical implementation, a very small constant is added to the denominator to avoid numerical instability.
[0072] (5) Cyclic consistency loss and smoothing regularization loss:
[0073] The multi-constraint loss includes contrast maximization loss, cycle consistency loss, and smoothing regularization loss. Contrast maximization loss improves the temporal focus of events by constraining the relationship between the accumulated timestamp map and the event backprojection image.
[0074] Cyclic consistency loss suppresses inconsistencies in predictions caused by short-term oscillations and attitude fluctuations by constraining the forward optical flow and the mapped backward optical flow to form an approximately closed loop. Specifically:
[0075] Backward optical flow According to forward optical flow Mapping to the corresponding forward position yields The cycle consistency loss is expressed as:
[0076]
[0077] This loss causes pixels to move along the forward optical flow and then return along the backward optical flow to approach their original position. Foot impacts and rapid posture changes in quadruped robots can lead to inconsistencies in the predicted direction and amplitude of adjacent time windows. Cyclic consistency loss can suppress this inconsistency based on the reversibility of motion.
[0078] The smoothing regularization loss reduces local event noise and high-frequency jumps caused by pseudo-optical flow by limiting the horizontal and vertical gradients of the optical flow field. Specifically:
[0079] The smoothing regularization loss is expressed as:
[0080]
[0081] in, This indicates the pixel position in the image plane that participated in the smoothing constraint calculation. Represents the set of effective optical flow pixels. Indicates pixel position The predicted optical flow vector at the location; and Let represent the gradients of the predicted optical flow field in the horizontal and vertical directions, respectively. A very small positive number set to avoid numerical instability.
[0082] The total loss is obtained by weighted summation of the three types of losses. The network parameters are updated through backpropagation, and the total loss of the three types of losses is:
[0083]
[0084] In a preferred embodiment, =0.3、 =0.4、 =0.1. The contrast maximization term is used to ensure event focus, and its weight is set to form effective motion compensation; the cycle consistency term is used to ensure closed-loop motion, and its weight is set relatively high in the scenario of periodic motion and posture fluctuation of quadruped robots; the smoothing regularization term is used to suppress local noise, and its weight is set small to preserve motion boundaries.
[0085] (6) Online training:
[0086] like Figure 3 As shown, the event stream is first encoded into event voxels V and event count graph C; then the network parameters are initialized, and V and C are input into the network to obtain... and Based on the backprojected image of the predicted optical flow generation event, calculate sequentially... , and ; Calculate the total loss Then update the network parameters through backpropagation; repeat the above steps until the loss converges or the maximum number of training rounds is reached.
[0087] In one specific embodiment, the training data uses event camera data containing high-speed indoor forward motion, with 5 event voxel time channels, and the optimizer is Adam with an initial learning rate of... The network was trained for 40 epochs, and the current best model was saved after each epoch. A cosine annealing strategy was used to gradually reduce the learning rate. After training, the network was used for inference on quadruped robot event data without needing to input the real optical flow labels of the scene during training.
[0088] (7) Reference optical flow generation:
[0089] like Figure 4 As shown, to quantitatively evaluate the model, the depth map and timestamp (401), robot pose trajectory (402), camera intrinsic and extrinsic parameters, and time offset (403) are read. The depth and pose timestamps are uniformly corrected, and the rotational attitude at any given time is obtained using spherical linear interpolation. The translation vector is obtained using linear interpolation. The relative rotation and translation at adjacent times are respectively expressed as... and .
[0090] For pixels in the depth map The depth value is Z(u, v), the camera intrinsic parameter matrix is K, and its 3D coordinates are:
[0091]
[0092] Using extrinsic parameters from depth camera to event camera and Transform the 3D points to the event camera coordinate system:
[0093]
[0094] After the robot moves in adjacent time intervals, the positions of the three-dimensional points are updated as follows:
[0095]
[0096] P E If the event camera intrinsics are used to reproject to pixel position (u', v'), then the reference optical flow is:
[0097]
[0098] If the reprojection point is within the valid range of the event image and has a positive depth, then the pixel is marked as valid; otherwise, it is marked as invalid in the valid mask. The reference optical flow is only used for model verification and parameter analysis and does not participate in the loss calculation of the self-supervised network of this invention.
[0099] (8) Online optical flow output:
[0100] like Figure 5 As shown, the trained network model is stored in the quadruped robot optical flow estimation processor (504). The event stream receiving and caching module (502) continuously receives events, the event encoding module (503) generates network input, and the processor outputs a dense optical flow field. The dense optical flow field can be sent to the visual odometry / attitude estimation module (505), the obstacle detection and motion compensation module (506), and the navigation, obstacle avoidance, and path planning module (507).
[0101] In one verification embodiment, visual data from real motion events of the CEAR quadruped robot were used for testing. To obtain quantitative evaluation data, a pixel-level reference optical flow aligned with the event flow time was generated using the depth map, camera pose, and sensor intrinsic and extrinsic parameters provided in the dataset. The average endpoint error (AEE) between the predicted optical flow and the reference optical flow on effective pixels was used as the primary accuracy metric. This reference optical flow generation process provides pixel-level quantitative evaluation data for real quadruped robot motion scenarios.
[0102] In this embodiment, the weights in the total loss function are set as follows:
[0103] =0.3、 =0.4、 =0.1
[0104] Among them, the contrast maximization loss is used to improve the focus after event backprojection, the cyclic consistency loss is used to constrain the motion consistency between forward and backward optical flows, and the smoothing regularization loss is used to improve the local continuity of the optical flow field.
[0105] To verify the advantages of the method of this invention over existing event optical flow estimation methods, EV-FlowNet and FireFlowNet were selected as comparison methods, and the corresponding optical flow errors were obtained under the same data conditions. The experimental results are shown in the table below.
[0106]
[0107] Experimental results show that the method of this invention achieves low average endpoint error in various motion scenarios. Specifically, in scenarios involving building corridors, building encirclement, jogging on sidewalks, nighttime woodlands, and combined sidewalk gait, the AEE of the method of this invention reaches 0.7874 pixels, 0.5664 pixels, 1.5539 pixels, 2.7147 pixels, and 0.9615 pixels, respectively, all of which are lower than the comparative methods, indicating that the method of this invention can effectively improve the accuracy of event optical flow estimation in complex dynamic environments.
[0108] Furthermore, to verify the impact of different loss constraints on the optical flow estimation performance, ablation experiments were conducted in the CEAR building corridor scenario. The experimental results are shown in the table below.
[0109]
[0110] The ablation experiment results show that when event focusing constraints, forward and backward motion consistency constraints, and spatial smoothing constraints are introduced simultaneously, the model achieves the lowest average endpoint error and a low proportion of outliers. The weight combination used in this embodiment achieves the best performance, indicating that the three types of loss constraints have a complementary effect and can effectively improve the stability of optical flow estimation during the dynamic motion of the quadruped robot.
[0111] Example 2
[0112] An event-visual self-supervised optical flow estimation system for quadruped robots includes:
[0113] The event acquisition module is used to collect asynchronous event streams during the movement of the quadruped robot;
[0114] The event encoding module is used to construct the event stream into an event voxel tensor and an event count graph;
[0115] An optical flow estimation module is used to output forward and backward optical flow based on a multi-scale encoder-decoder network;
[0116] The event backprojection module is used to generate event backprojection images and timestamp accumulation maps based on the predicted optical flow;
[0117] A multi-constraint self-supervised loss module is used to calculate contrast maximization loss, cycle consistency loss, and smoothing regularization loss;
[0118] The training update module is used to update the network parameters of the optical flow estimation module based on the weighted total loss.
[0119] An online output module is used to output a dense optical flow field using the trained network.
[0120] This invention is not limited to the network structure described above. The number of encoders and decoders can be adjusted according to the performance of the computing platform; the number of event voxel channels can be 3 to 10; the event window can be a fixed time or a fixed number of events; the loss weight can be adjusted within a certain range according to the event density and the intensity of robot motion; the computing platform can be a GPU, NPU, FPGA, or a processor with neural network acceleration capabilities. Any technology that employs the joint constraints of event temporal focus, consistency of preceding and following motion, and continuity of local space falls within the scope of protection of this invention.
[0121] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A self-supervised optical flow estimation method based on event vision for quadruped robots, characterized in that, Includes the following steps: S1. The asynchronous event stream is acquired by an event camera installed on the body of the quadruped robot. The asynchronous event stream is divided into multiple event time windows according to a preset time length, and the event timestamps in each event time window are normalized. S2. Distribute the events within each event time window to multiple time channels according to the normalized timestamp, construct the event voxel tensor, and construct the event count map according to the number of event triggers at each pixel position; S3. Input the event voxel tensor and event count map into the multi-scale optical flow estimation network, and obtain the forward optical flow and backward optical flow through the encoder, residual feature extraction unit and decoder; S4. Based on the forward optical flow and backward optical flow, the positive polarity event and the negative polarity event are compensated to the start time and end time of the event time window, respectively, to generate the corresponding event back projection image and timestamp accumulation image. S5. Calculate the contrast maximization loss based on the event back-projection image and timestamp accumulation image, calculate the cycle consistency loss based on the forward optical flow and backward optical flow, and calculate the smoothing regularization loss based on the gradient between adjacent pixels in the optical flow field. S6. The contrast maximization loss, cycle consistency loss and smoothing regularization loss are weighted and summed according to preset weights to obtain the total loss. The multi-scale optical flow estimation network is backpropagated and trained based on the total loss. S7. Deploy the trained multi-scale optical flow estimation network on a quadruped robot computing platform and output a dense optical flow field using real-time acquired event streams.
2. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, The i-th event in the event stream described in step S1 is represented as: ,in and For pixel coordinates, For timestamps, The event polarity is defined in step S2. The normalized time coordinates are mapped to B time channels, and linear interpolation is used to assign the same event to adjacent time channels, forming an event voxel tensor of size B×H×W. The event counting graph is a single-channel tensor of size 1×H×W.
3. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 2, characterized in that, The number of time channels B is 5; the event voxel tensor and the event count map are concatenated along the channel dimension and then input into the multi-scale optical flow estimation network, or the event voxel tensor and the event count map are fused after feature extraction by convolutional layers respectively.
4. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, The multi-scale optical flow estimation network includes a four-level encoder, at least two residual blocks, and a four-level decoder connected in sequence; each encoder level includes a convolutional layer, a downsampling layer, and a nonlinear activation layer, used to progressively expand the receptive field to extract event spatiotemporal features at different scales; Each residual block is added to the convolutional mapping branch through an identity mapping branch to enhance the representation of local high-speed motion and high-frequency vibration features; each level of the decoder recovers the spatial resolution through bilinear upsampling and convolution, and splices or adds it to the output features of the corresponding scale encoder through skip connections; optical flow prediction heads are set at at least two decoding scales, each optical flow prediction head is composed of 1×1 convolution and outputs forward and backward optical flow of corresponding resolution, wherein the optical flow prediction result of the highest resolution is used as the online dense optical flow output.
5. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, In step S4, forward event back-projection images are generated for positive and negative polarity events respectively. , Back projection image of the back event , The same scattering accumulation is performed on the normalized timestamps to obtain the corresponding timestamp accumulation map. , , , .
6. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, The contrast maximization loss is obtained by summing the squares of the ratios of the cumulative timestamp images and the corresponding event backprojected images, so that edge events of the same scene after optical flow compensation are clustered in spatial location.
7. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, The cycle consistency loss is the average L1 norm of the sum of the forward optical flow and the backward optical flow mapped to the corresponding forward position, so that when the same pixel moves along the forward optical flow and then returns along the backward optical flow, it is close to the original position.
8. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, The smoothing regularization loss is determined based on the gradient of the optical flow field in the horizontal and vertical directions; the total loss is expressed as... In the formula , , Contrast maximization loss Cyclic consistency loss And smoothing regularization loss The weights; where Take 0.3, Take 0.4, The initial learning rate is set to 0.1; the network training uses the Adam optimizer with an initial learning rate of 1*10. -4 The learning rate is updated using cosine annealing.
9. The event-visual self-supervised optical flow estimation method for quadruped robots according to claim 1, characterized in that, It also includes a reference optical flow generation step, used to quantitatively validate the trained network under conditions without real optical flow labels. The reference optical flow generation step includes: reading the depth map and its timestamp, camera pose trajectory, camera intrinsic parameters, extrinsic parameters between the event camera and the depth camera, and time offset parameters; uniformly correcting the depth map timestamp and pose timestamp and interpolating the pose; back-projecting the depth pixels into three-dimensional points, transforming them to the event camera coordinate system, updating the three-dimensional point positions according to the relative poses of adjacent time points, and reprojecting them onto the image plane, using the pixel displacement before and after reprojection as the reference optical flow.
10. An event-visual self-supervised optical flow estimation system for quadruped robots, characterized in that, include: The event acquisition module is used to collect asynchronous event streams during the movement of the quadruped robot; The event encoding module is used to construct the event stream into an event voxel tensor and an event count graph; An optical flow estimation module is used to output forward and backward optical flow based on a multi-scale encoder-decoder network; The event backprojection module is used to generate event backprojection images and timestamp accumulation maps based on the predicted optical flow; A multi-constraint self-supervised loss module is used to calculate contrast maximization loss, cycle consistency loss, and smoothing regularization loss; The training update module is used to update the network parameters of the optical flow estimation module based on the weighted total loss. An online output module is used to output a dense optical flow field using the trained network.
