A method and system for adaptive optical flow estimation for targets of different scales

By introducing a multi-scale feature and cost volume generation module into optical flow estimation, combined with context coding, the problem of loss of fine details caused by a single cost volume is solved and the accuracy of optical flow estimation is improved.

CN115690170BActive Publication Date: 2024-10-15SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211221511.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-08
Publication Date
2024-10-15
Estimated Expiration
2042-10-08

AI Technical Summary

Technical Problem

Existing optical flow estimation methods lose fine details of objects of different scales due to their single cost, resulting in poor estimation performance.

Method used

By inputting two adjacent frames of images into a convolutional neural network, shallow features are extracted and processed into multi-scale features, including coarse, medium and fine-scale features. The information interaction between these features is used to generate multi-scale cost volumes and combined with the context. The encoding performs optical flow estimation and is fitted using the optical flow endpoint error as the loss function.

Benefits of technology

The accuracy of optical flow estimation is improved and objects of different scales can be learned more accurately, thereby improving the performance of optical flow estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690170B_ABST
    Figure CN115690170B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and system for adaptive optical flow estimation for targets of different scales, the method comprising inputting two adjacent frames of images into a convolutional neural network, and extracting features of the two frames of images to obtain shallow features of the two frames of images; processing the shallow features of the two frames of images to obtain multi-scale features of the two frames of images; obtaining a multi-scale cost volume by using the information interaction between the coarse-scale features, medium-scale features and fine-scale features of the two frames of images; context encoding the first frame of the two frames of images, and calculating the optical flow estimation result in combination with the multi-scale cost volume; using the endpoint error of the optical flow as a loss function to fit the optical flow estimation result. The present invention solves the problem of losing fine details of objects of different scales due to a single cost volume, thereby resulting in poor estimation performance, and improves the accuracy of optical flow estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an optical flow estimation method and system adaptive to targets of different scales. Background Art

[0002] Optical flow estimation is the task of estimating the per-pixel motion between video frames. It is a fundamental technique for a wide range of computer vision applications, such as motion segmentation, action recognition, and autonomous driving. Optical flow estimation has traditionally been viewed as a knowledge-driven technique. Traditional methods typically construct optical flow as an energy function optimization problem that specifies various constraints by considering prior knowledge (e.g., corner points). However, optimizing such a constraint function usually takes too long and runs too slowly to be used in real-time systems. On the other hand, it is difficult to design an optimization objective that is robust to various corner points.

[0003] In recent years, with the development of convolutional neural networks, optical flow estimation technology has made significant progress. Compared with knowledge-driven methods, methods based on convolutional neural networks provide a powerful ability to learn from large amounts of data, which makes these techniques data-driven strategies. To learn optical flow, many methods use encoder-decoder or spatial pyramid structures. A pioneering work is FlowNet proposed by Dosovitskiy et al. in 2015, in which two models, FlowNet and FlowNetC, were proposed. Spynet introduced a feature pyramid module, which uses a spatial pyramid network to distort the image at each level and decompose large displacements into small displacements. Therefore, only a little displacement needs to be calculated at each pyramid level, which greatly reduces the amount of calculation. Teed and Deng proposed RAFT, in which a lightweight recurrent module is coupled with a GRU module as an update operator.

[0004] In the above network, during the feature extraction process, the receptive fields of artificial neurons in each layer are usually designed to be of the same size. Since they all use a single network structure, the cost volume is generated in a single way. However, the cost volume represents the similarity between two adjacent frames, and an accurate cost volume is the key to obtaining accurate optical flow estimation. Unfortunately, this practice may cause the loss of fine details of objects of different scales, resulting in poor estimation performance. Summary of the invention

[0005] The embodiments of the present invention provide a method and system for adaptive optical flow estimation for objects of different scales, which are used to solve the problem in the prior art that fine details of objects of different scales are lost due to a single cost amount, thereby resulting in poor estimation performance.

[0006] An embodiment of the present invention provides a method for adaptively estimating optical flow for objects of different scales, the method comprising:

[0007] S1: Input two adjacent frames of images into a convolutional neural network, and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images;

[0008] S2: Processing the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features, and fine-scale features;

[0009] S3: obtaining a multi-scale cost volume by using information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images;

[0010] S4: performing context encoding on the first frame of the two frames of images, and calculating an optical flow estimation result in combination with the multi-scale cost amount;

[0011] S5: Using the endpoint error of the optical flow as a loss function, fitting the optical flow estimation result.

[0012] Preferably, the convolutional neural network adopts a downsampling structure.

[0013] Preferably, the method of performing feature extraction on the two frames of images to obtain shallow features of the two frames of images includes convolution, pooling and normalization.

[0014] Preferably, the method for processing the shallow features of the two frames of images includes a segmentation operation, a fusion operation and a selection operation.

[0015] Preferably, the segmentation operation specifically includes:

[0016] Given an intermediate feature map As input, two convolutional layers are used with kernel sizes of 3 and 5 respectively, and the intermediate feature map is Image features segmented into two different scales and The 5×5 convolution kernel is replaced with a 3×3 convolution kernel, and the dilated convolution with a dilation factor of 2 is set.

[0017] Preferably, the fusion operation specifically includes:

[0018] First, the multi-scale information of two different branches is fused through element summation operation to obtain the features of two scale fusion:

[0019]

[0020] Then, for M fuse Use global average pooling to capture global information in the spatial dimension:

[0021]

[0022] in, represents the global average pooling operation, where H and W are the height and width of the feature dimension respectively;

[0023] Finally, we use a fully connected layer to aggregate the features, and add a batch norm layer and activation function after the fully connected layer:

[0024]

[0025] in, represents the fully connected layer, δ represents the ReLu activation function, Represents a batch normalization layer.

[0026] Preferably, the selection operation specifically includes:

[0027] The feature matrix t is used to guide the use of soft attention across channels to adaptively select different information space scales, where the dimension of t needs to be expanded, and then the softmax operator is used in the channel to obtain the attention weight:

[0028]

[0029] Use the obtained attention weights to generate the final feature map M fine and M coarse , that is, applying the corresponding weight coefficient to the segmented features:

[0030]

[0031] in, and Represents the two scale features obtained after splitting the input M features, and adding them together to obtain the fused feature M fuse .

[0032] Preferably, the method for obtaining the multi-scale cost volume by utilizing the information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images is:

[0033] Using the fine-scale features to generate an initial cost volume, and then using the medium-scale features to enhance the fine-scale features to obtain a cost volume 1;

[0034] Pooling the cost volume 1 to obtain a cost volume 2, wherein the cost volume 2 combines the medium-scale features and the coarse-scale features;

[0035] The cost quantity 2 is pooled to obtain a cost quantity 3.

[0036] The present invention also provides a system for adaptively estimating optical flow for objects of different scales, comprising:

[0037] A shallow feature extraction module is used to input two adjacent frames of images into a convolutional neural network and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images;

[0038] A multi-scale feature extraction module, used to process the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features and fine-scale features;

[0039] A multi-scale cost volume generation module, used for obtaining a multi-scale cost volume by utilizing information interaction between coarse-scale features, medium-scale features and fine-scale features of the two frames of images;

[0040] An optical flow estimation calculation module, used for performing context encoding on the first frame of the two frames of images, and calculating an optical flow estimation result in combination with the multi-scale cost amount;

[0041] The optical flow estimation fitting module is used to fit the optical flow estimation result by using the endpoint error of the optical flow as a loss function.

[0042] An embodiment of the present invention provides a network device, including a processor, a memory and a bus system, wherein the processor and the memory are connected via the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement any one of the methods described above.

[0043] It can be seen from the above technical solutions that the present invention has the following advantages:

[0044] The present invention provides an optical flow estimation method and system which are adaptive to targets of different scales. Firstly, the present invention introduces a feature selectable module into the field of optical flow estimation and integrates it into a network, which helps the network to generate multi-scale feature information, thereby learning more accurate optical flow estimation results for objects of different scales. Secondly, the present invention introduces a multi-scale cost volume generation module, and the multi-scale cost volume strengthens the characterization ability of similarity. Finally, the optical flow estimation method of the present invention utilizes the feature selectable module to enhance the generation of the multi-scale cost volume, and jointly learns the multi-scale cost volume and the encoding of the context, thereby solving the problem that the fine details of objects of different scales are lost due to a single cost volume, thereby leading to poor estimation performance, and improving the accuracy of optical flow estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0046] Figure 1 is a schematic diagram of an optical flow estimation method for objects of different scales that is adaptive according to an embodiment of the present invention;

[0047] Figure 2 is a schematic diagram of an optical flow estimation system adaptive to objects of different scales according to an embodiment of the present invention;

[0048] Figure 3 is a schematic block diagram of a network device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Embodiment 1

[0051] like Figure 1 As shown, an embodiment of the present invention proposes an optical flow estimation method for objects of different scales that is adaptive, and the method includes:

[0052] S101: input two adjacent frames of images into a convolutional neural network, and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images;

[0053] S102: Processing shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features, and fine-scale features;

[0054] S103: Obtaining a multi-scale cost by using information interaction between the coarse-scale features, the medium-scale features, and the fine-scale features of the two frames of images;

[0055] S104: performing context encoding on the first frame of the two frames of images, and calculating an optical flow estimation result in combination with the multi-scale cost amount;

[0056] S105: Using the endpoint error of the optical flow as a loss function, fitting the optical flow estimation result.

[0057] The present invention introduces a feature selectable module into the field of optical flow estimation and integrates it into the network, which helps the network generate multi-scale feature information, thereby learning more accurate optical flow estimation results for objects of different scales; secondly, the present invention introduces a multi-scale cost volume generation module, and the multi-scale cost volume strengthens the characterization ability of similarity; finally, the optical flow estimation method of the present invention utilizes the feature selectable module to enhance the generation of the multi-scale cost volume, and jointly learns the multi-scale cost volume and the encoding of the context, thereby improving the accuracy of optical flow estimation.

[0058] Furthermore, step S101 includes:

[0059] Two adjacent frames of images are input into a convolutional neural network, and features of the two frames of images are extracted to obtain shallow features of the two frames of images; the convolutional neural network adopts a downsampling structure, wherein the feature extraction method includes convolution, pooling and normalization.

[0060] Furthermore, step S102 includes:

[0061] Processing the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, so that the convolutional neural network can selectively use the generated multi-scale features, the multi-scale features include coarse-scale features, medium-scale features and fine-scale features, so that the convolutional neural network can capture objects of different sizes on the image;

[0062] Wherein, the method for processing the shallow features of the two frames of images includes segmentation, fusion and selection operations;

[0063] The segmentation operation specifically includes: given an intermediate feature map As input, two convolutional layers are used with kernel sizes of 3 and 5 respectively, and the intermediate feature map is Image features segmented into two different scales and The 5×5 convolution kernel is replaced with a 3×3 convolution kernel, and the dilated convolution with a dilation coefficient of 2 is set;

[0064] The fusion operation specifically includes the following steps:

[0065] First, the multi-scale information of the above two different branches is fused through the element summation operation to obtain the features of the two scales:

[0066]

[0067] Then, for M fuse Use global average pooling to capture global information in the spatial dimension:

[0068]

[0069] in, represents the global average pooling operation, where H and W are the height and width of the feature dimension respectively;

[0070] Finally, we use a fully connected layer to aggregate features, and add a batch norm layer and activation function after the fully connected layer:

[0071]

[0072] in, represents the fully connected layer, δ represents the ReLu activation function, Represents a batch normalization layer.

[0073] The selection operation specifically includes:

[0074] The feature matrix t is used to guide the use of soft attention across channels to adaptively select different information space scales, where the dimension of t needs to be expanded, and then the softmax operator is used in the channel to obtain the attention weight:

[0075]

[0076] Use the obtained attention weights to generate the final feature map M fine and M coarse , that is, applying the corresponding weight coefficient to the segmented features:

[0077]

[0078] in, and Represents the two scale features obtained after splitting the input M features, and adding them together to obtain the fused feature M fuse .

[0079] Furthermore, step S103 includes:

[0080] The multi-scale cost amount is obtained by utilizing the information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images, specifically comprising: using the fine-scale features to generate an initial cost amount, and then using the medium-scale features to strengthen the fine-scale features to obtain a cost amount 1; pooling the cost amount 1 to obtain a cost amount 2, wherein the cost amount 2 combines the medium-scale features and the coarse-scale features; and pooling the cost amount 2 to obtain a cost amount 3.

[0081] In previous methods, the cost volume generation process is implemented by simply using a set of global average pooling, which will lead to the loss of fine details; the present invention proposes a new cost volume generation process, combined with the extracted multi-scale image features, to strengthen the interaction between information at different scales, thus taking into account the receptive field of each scale.

[0082] Furthermore, step S104 includes:

[0083] Since the optical flow records the position offset of each pixel between the two frames, the context network is used to obtain the context encoding of the first frame image to assist the optical flow network in learning the position information between the two frames; the context information of the first frame image is used to find the correspondence between the two frames on the cost volume, thereby calculating the accurate optical flow estimation result.

[0084] Furthermore, step S105 includes:

[0085] The endpoint error of the optical flow is used as a loss function to supervise the learning of the optical flow, and the estimated optical flow estimation result is fitted. The method of the invention produces good optical flow estimation accuracy and can be applied to fields such as unmanned driving and robots.

[0086] Embodiment 2

[0087] like Figure 2 As shown, the present invention also provides a system for adaptive optical flow estimation for targets of different scales, the system comprising:

[0088] A shallow feature extraction module 201 is used to input two adjacent frames of images into a convolutional neural network and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images;

[0089] A multi-scale feature extraction module 202 is used to process the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features and fine-scale features;

[0090] A multi-scale cost volume generating module 203 is used to obtain a multi-scale cost volume by utilizing information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images;

[0091] An optical flow estimation calculation module 204 is used to perform context encoding on the first frame of the two frames of images, and calculate an optical flow estimation result in combination with the multi-scale cost amount;

[0092] The optical flow estimation fitting module 205 is used to fit the optical flow estimation result by using the endpoint error of the optical flow as a loss function.

[0093] The system is used to implement the method for adaptive optical flow estimation for objects of different scales described in the first embodiment above, which will not be described in detail here to avoid redundancy.

[0094] Embodiment 3

[0095] like Figure 3 As shown, an embodiment of the present invention further provides a network device, which includes a processor 301, a memory 302 and a bus system 303, wherein the processor 301 and the memory 302 are connected via the bus system 303, the memory 302 is used to store instructions, and the processor 301 is used to execute the instructions stored in the memory 302;

[0096] Among them, the processor 301 is used to: input two adjacent frames of images into a convolutional neural network, and extract features of the two frames of images to obtain shallow features of the two frames of images; process the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, and the multi-scale features include coarse-scale features, medium-scale features and fine-scale features; use the information interaction between the coarse-scale features, medium-scale features and fine-scale features of the two frames of images to obtain a multi-scale cost; context encode the first frame of the two frames of images, and calculate the optical flow estimation result in combination with the multi-scale cost; use the endpoint error of the optical flow as a loss function to fit the optical flow estimation result.

[0097] The network device introduces a feature selectable module into the field of optical flow estimation and integrates it into the network, which helps the network generate multi-scale feature information, thereby learning more accurate optical flow estimation results for objects of different scales; secondly, the present invention introduces a multi-scale cost volume generation module, and the multi-scale cost volume strengthens the characterization ability of similarity; finally, the optical flow estimation method of the present invention utilizes the feature selectable module to enhance the generation of the multi-scale cost volume, and jointly learns the multi-scale cost volume and the encoding of the context, thereby improving the accuracy of optical flow estimation.

[0098] Optionally, as an embodiment, an unmanned vehicle includes the above-mentioned network device, and the network device includes a processor 301, a memory 302 and a bus system 303. To avoid repetition, it will not be described in detail here.

[0099] Optionally, as an embodiment, a robot includes the above-mentioned network device, and the network device includes a processor 301, a memory 302 and a bus system 303. To avoid repetition, it will not be described in detail here.

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

[0101] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0102] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0103] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps of the functions specified in one or more boxes. Obviously, the above embodiments are only examples for clear explanation and are not limitations on the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the protection scope of the invention.

Claims

1. A method for adaptive optical flow estimation for targets of different scales, characterized in that: include: S1: Input two adjacent frames of images into a convolutional neural network, and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images; S2: Processing the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features, and fine-scale features; The method for processing the shallow features of the two frames of images includes a segmentation operation, a fusion operation and a selection operation; The segmentation operation specifically includes: Given an intermediate feature map As input, two convolutional layers are used with kernel sizes of 3 and 5 respectively, and the intermediate feature map is Image features segmented into two different scales and The 5×5 convolution kernel is replaced with a 3×3 convolution kernel, and the dilated convolution with a dilation coefficient of 2 is set; The fusion operation specifically includes: First, the multi-scale information of two different branches is fused through element summation operation to obtain the features of two scale fusion: Then, for M fuse Use global average pooling to capture global information in the spatial dimension: in, represents the global average pooling operation, where H and W are the height and width of the feature dimension respectively; Finally, we use a fully connected layer to aggregate the features, and add a batch norm layer and activation function after the fully connected layer: in, represents the fully connected layer, δ represents the ReLu activation function, represents a batch normalization layer; The selection operation specifically includes: The feature matrix t is used to guide the use of soft attention across channels to adaptively select different information space scales, where the dimension of t needs to be expanded, and then the softmax operator is used in the channel to obtain the attention weight: Use the obtained attention weights to generate the final feature map M fine and M coarse , that is, applying the corresponding weight coefficient to the segmented features: in, and Represents the features of two scales obtained after splitting the input M features; S3: obtaining a multi-scale cost volume by using information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images; S4: performing context encoding on the first frame of the two frames of images, and calculating an optical flow estimation result in combination with the multi-scale cost amount; S5: Using the endpoint error of the optical flow as a loss function, fitting the optical flow estimation result.

2. The method for adaptive optical flow estimation for objects of different scales according to claim 1, characterized in that: The convolutional neural network adopts a downsampling structure.

3. The method for adaptive optical flow estimation for objects of different scales according to claim 1, characterized in that: The method of performing feature extraction on the two frames of images to obtain shallow features of the two frames of images includes convolution, pooling and normalization.

4. The method for adaptive optical flow estimation for objects of different scales according to claim 1, characterized in that: The method for obtaining the multi-scale cost volume by utilizing the information interaction between the coarse-scale features, the medium-scale features and the fine-scale features of the two frames of images is as follows: Using the fine-scale features to generate an initial cost volume, and then using the medium-scale features to enhance the fine-scale features to obtain a cost volume 1; Pooling the cost volume 1 to obtain a cost volume 2, wherein the cost volume 2 combines the medium-scale features and the coarse-scale features; The cost quantity 2 is pooled to obtain a cost quantity 3.

5. A system for adaptive optical flow estimation for objects of different scales, characterized in that: The system is used to implement the method for adaptive optical flow estimation for objects of different scales as described in any one of claims 1 to 4, comprising: A shallow feature extraction module is used to input two adjacent frames of images into a convolutional neural network and perform feature extraction on the two frames of images to obtain shallow features of the two frames of images; A multi-scale feature extraction module, used for processing the shallow features of the two frames of images to obtain multi-scale features of the two frames of images, wherein the multi-scale features include coarse-scale features, medium-scale features and fine-scale features; A multi-scale cost volume generation module, used for obtaining a multi-scale cost volume by utilizing information interaction between coarse-scale features, medium-scale features and fine-scale features of the two frames of images; An optical flow estimation calculation module, used for performing context encoding on the first frame of the two frames of images, and calculating an optical flow estimation result in combination with the multi-scale cost amount; The optical flow estimation fitting module is used to fit the optical flow estimation result by using the endpoint error of the optical flow as a loss function.

6. A network device, characterized in that: The invention comprises a processor, a memory and a bus system, wherein the processor and the memory are connected via the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the method described in any one of claims 1 to 4.