WO2023178951A1 - 图像分析方法、模型的训练方法、装置、设备、介质及程序 - Google Patents
图像分析方法、模型的训练方法、装置、设备、介质及程序 Download PDFInfo
- Publication number
- WO2023178951A1 WO2023178951A1 PCT/CN2022/119646 CN2022119646W WO2023178951A1 WO 2023178951 A1 WO2023178951 A1 WO 2023178951A1 CN 2022119646 W CN2022119646 W CN 2022119646W WO 2023178951 A1 WO2023178951 A1 WO 2023178951A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sample
- image
- optical flow
- updated
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/269—Analysis of motion using gradient-based methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Definitions
- the present disclosure relates to the field of computer vision technology, and in particular, to an image analysis method, a model training method, a device, an equipment, a medium and a program.
- Simultaneous localization and mapping is one of the most basic tasks in the field of computer vision and robotics. Its application scope includes but is not limited to: augmented reality (Augmented Reality, AR), virtual reality (Virtual Reality, VR), autonomous driving, etc.
- augmented reality Augmented Reality
- VR Virtual Reality
- AR Augmented Reality
- VR Virtual Reality
- autonomous driving etc.
- monocular dense SLAM has attracted much attention due to the simplicity of monocular video acquisition, but compared with dense SLAM of depth images (Red Green Blue-Depth, RGB-D), it is a difficult task.
- RGB-D dense SLAM of depth images
- Embodiments of the present disclosure provide an image analysis method, a model training method, a device, equipment, a medium and a program.
- Embodiments of the present disclosure provide an image analysis method, which includes: acquiring an image sequence, optical flow data, and reference data of each image in the image sequence; wherein each image includes a first image and a second image that have a common view relationship, and the optical flow data includes: The flow data includes static optical flow and overall optical flow between the first image and the second image.
- the static optical flow is caused by the motion of the camera device, the overall optical flow is caused by the motion of the camera device and the motion of the photographed object, and the reference data includes pose and depth; based on the image sequence and optical flow data, the analysis results are predicted; among them, the analysis results include optical flow calibration data of static optical flow; based on the static optical flow and optical flow calibration data, the pose and depth are optimized to obtain an updated position posture and updated depth.
- the image sequence, the optical flow data and the reference data of each image in the image sequence are obtained, and each image includes a first image and a second image having a common view relationship, and the optical flow data includes the first image and the second image.
- Static optical flow and overall optical flow Static optical flow is caused by the movement of the camera device.
- Overall optical flow is caused by the movement of the camera device and the movement of the photographed object.
- the reference data includes pose and depth.
- prediction and analysis results are obtained, and the analysis results include optical flow calibration data of static optical flow, and based on the static optical flow and optical flow calibration data, the pose and depth are optimized to obtain an updated pose and an updated depth.
- the overall optical flow is considered to be caused by the motion of the camera device and the motion of the photographed object.
- the overall optical flow and the static optical flow caused by the motion of the camera device are referenced to predict
- the optical flow calibration data of the static optical flow can be obtained, so that in the subsequent pose and depth optimization process, the static optical flow and its optical flow calibration data can be combined to reduce the impact caused by the motion of the subject as much as possible, thereby improving the pose and depth. Depth accuracy.
- Embodiments of the present disclosure provide a training method for an image analysis model, which includes: obtaining a sample image sequence, sample optical flow data, and sample reference data of each sample image in the sample image sequence; wherein each sample image includes a common view relationship.
- the first sample image and the second sample image, the sample optical flow data include the sample static optical flow and the sample overall optical flow between the first sample image and the second sample image, the sample static optical flow is caused by the movement of the camera device, the sample The overall optical flow is caused by the motion of the camera device and the motion of the photographed object, and the sample reference data includes the sample pose and sample depth;
- the sample image sequence and sample optical flow data are analyzed and predicted to obtain the sample analysis results;
- the sample analysis results include sample optical flow calibration data of the sample static optical flow; based on the sample static optical flow and sample optical flow calibration data, the sample pose and sample depth are optimized to obtain an updated sample pose and an updated sample depth; based on The updated sample pose and updated sample depth are used for loss measurement to obtain the predicted loss of
- the overall optical flow is considered to be caused by both the motion of the camera device and the motion of the photographed object, and during the image analysis process, the overall optical flow and the motion of the camera device are referenced
- the static optical flow caused by the static optical flow is predicted to predict the optical flow calibration data of the static optical flow, so that in the subsequent pose and depth optimization process, the static optical flow and its optical flow calibration data can be combined to reduce the impact caused by the motion of the subject as much as possible. , can improve the model performance of the image analysis model, help improve the accuracy of the analysis results obtained by using the image analysis model in the inference stage, and thus improve the accuracy of the pose and depth in the inference stage.
- An embodiment of the present disclosure provides an image analysis device, including: an acquisition part configured to acquire an image sequence, optical flow data, and reference data of each image in the image sequence; wherein each image includes a first image with a common view relationship and the second image, the optical flow data includes static optical flow and overall optical flow between the first image and the second image, the static optical flow is caused by the movement of the camera device, and the overall optical flow is caused by the movement of the camera device and the movement of the photographed object, And the reference data includes pose and depth; the analysis part is configured to predict the analysis results based on the image sequence and optical flow data; where the analysis results include optical flow calibration data of static optical flow; the optimization part is configured to predict the analysis results based on the static optical flow. Flow and optical flow calibration data are used to optimize pose and depth to obtain updated pose and updated depth.
- An embodiment of the present disclosure provides a training device for an image analysis model, including: a sample acquisition part configured to acquire a sample image sequence, sample optical flow data, and sample reference data of each sample image in the sample image sequence; wherein, each sample The image includes a first sample image and a second sample image that have a common viewing relationship, and the sample optical flow data includes a sample static optical flow and a sample overall optical flow between the first sample image and the second sample image, and the sample static optical flow Caused by the motion of the camera device, the overall optical flow of the sample is caused by the motion of the camera device and the motion of the photographed object, and the sample reference data includes the sample pose and sample depth; the sample analysis part is configured to analyze the sample image sequence and sample based on the image analysis model The optical flow data is analyzed and predicted to obtain sample analysis results; among which, the sample analysis results include sample optical flow calibration data of the sample static optical flow; the sample optimization part is configured to optimize the sample based on the sample static optical flow and sample optical flow calibration data.
- the pose and sample depth are optimized to obtain an updated sample pose and an updated sample depth;
- the loss measurement part is configured to perform loss measurement based on the updated sample pose and updated sample depth to obtain the predicted loss of the image analysis model;
- the parameter adjustment part is configured to adjust the network parameters of the image analysis model based on the prediction loss.
- Embodiments of the present disclosure provide an electronic device, including a memory and a processor coupled to each other.
- the processor is configured to execute program instructions stored in the memory to implement the above image analysis method or the image analysis model training method.
- Embodiments of the present disclosure provide a computer-readable storage medium on which program instructions are stored.
- the program instructions are executed by a processor, the above-mentioned image analysis method or the training method of the image analysis model is implemented.
- An embodiment of the present disclosure provides a computer program.
- the computer program includes computer readable code.
- the processor of the electronic device executes to implement the above image analysis method, or image analysis method. Analytical model training methods.
- the image analysis method, model training method, device, equipment, medium and program provided by the embodiments of the present disclosure firstly obtain the image sequence, optical flow data and reference data of each image in the image sequence, and each image includes a co-view relationship
- the first image and the second image the optical flow data includes the static optical flow and the overall optical flow between the first image and the second image.
- the static optical flow is caused by the movement of the camera device
- the overall optical flow is caused by the movement of the camera device and the photographed object.
- the reference data includes pose and depth.
- the analysis results are predicted, and the analysis results include optical flow calibration data of static optical flow, and are based on static optical flow and optical flow Calibrate the data, optimize the pose and depth, and obtain the updated pose and updated depth. Therefore, by imitating the way humans perceive the real world, the overall optical flow is considered to be caused by the motion of the camera device and the motion of the photographed object.
- the overall optical flow and the static optical flow caused by the motion of the camera device are referenced to predict
- the optical flow calibration data of the static optical flow can be obtained, so that in the subsequent pose and depth optimization process, the static optical flow and its optical flow calibration data can be combined to reduce the impact caused by the motion of the subject as much as possible, thereby improving the pose and depth. Depth accuracy.
- Figure 1 is a schematic flow chart of an embodiment of the image analysis method of the present disclosure
- Figure 2 is a schematic diagram of an embodiment of overall optical flow decomposition
- Figure 3a is a schematic process diagram of an embodiment of the image analysis method of the present disclosure
- Figure 3b is a schematic framework diagram of an embodiment of a dynamic update network
- Figure 4a is a schematic diagram comparing the trajectory determined by the image analysis method of the present disclosure with the actual trajectory and the trajectory determined by the prior art according to an embodiment
- Figure 4b is a schematic diagram comparing the trajectory determined by the image analysis method of the present disclosure with the actual trajectory and the trajectory determined by the prior art in another embodiment;
- Figure 5a is a schematic diagram comparing the trajectory determined by the disclosed image analysis method with the actual trajectory and the trajectory determined by the prior art in another embodiment
- Figure 5b is a schematic diagram comparing the trajectory determined by the disclosed image analysis method with the actual trajectory and the trajectory determined by the prior art in another embodiment
- Figure 5c is a schematic diagram comparing the trajectory determined by the disclosed image analysis method with the actual trajectory and the trajectory determined by the prior art in another embodiment
- Figure 5d is a schematic diagram of map reconstruction using the image analysis method of the present disclosure applied to various data sets;
- Figure 5e is a schematic diagram of the image analysis method of the present disclosure applied to the motion segmentation task
- Figure 5f is a schematic comparison diagram of the image analysis method of the present disclosure and the prior art respectively applied to AR;
- Figure 6 is a schematic flow chart of an embodiment of the training method of the image analysis model of the present disclosure
- Figure 7 is a schematic diagram of an embodiment of a dynamic scene
- Figure 8 is a schematic framework diagram of an embodiment of the image analysis device of the present disclosure.
- Figure 9 is a schematic framework diagram of an embodiment of the training device of the image analysis model of the present disclosure.
- Figure 10 is a schematic framework diagram of an embodiment of the electronic device of the present disclosure.
- FIG. 11 is a schematic diagram of an embodiment of a computer-readable storage medium of the present disclosure.
- system and "network” are often used interchangeably in this article.
- the term “and/or” in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
- the character "/” in this article generally indicates that the related objects are an “or” relationship.
- "many” in this article means two or more than two.
- FIG. 1 is a schematic flowchart of an embodiment of the image analysis method of the present disclosure. May include the following steps:
- Step S11 Obtain the image sequence, optical flow data and reference data of each image in the image sequence.
- each image includes a first image and a second image that have a common view relationship.
- a certain pixel point in the first image is back-projected to a three-dimensional point in the three-dimensional space. If the three-dimensional point can be projected into the second image, it can be considered that the first image and the second image have a common viewing relationship, that is, if the three-dimensional If a certain three-dimensional point in space exists in both the first image and the second image, it can be considered that the first image and the second image have a common viewing relationship. That is to say, when the viewing angles of the first image and the second image at least partially overlap, it can be considered that the first image and the second image have a co-viewing relationship.
- the number of second images having a common view relationship with the first image may be one or more, and at least one second image and the first image may form an image sequence.
- the optical flow data may include static optical flow and overall optical flow between the first image and the second image.
- the static optical flow is caused by the movement of the camera device
- the overall optical flow is caused by the movement of the camera device and the movement of the photographed object. cause.
- a certain three-dimensional point in the three-dimensional space is located at P1 (u1, v1) in the first image captured by the camera device at time t1, and the object to which the three-dimensional point belongs is a stationary object.
- the static optical flow value located at the pixel position P1 (u1, v1) in the static optical flow can be recorded as (u2-u1 , v2-v1)
- the static optical flow between the first image and the second image includes the static optical flow value of each pixel in the first image, so the pixel position of the pixel in the first image plus its static optical flow
- the flow value can be used to obtain the three-dimensional point to which the pixel belongs.
- the camera device Due to the movement of the camera device itself, it theoretically corresponds to the pixel position in the second image, and if the three-dimensional point to which the pixel belongs is located on a stationary object and the static optical flow is also completely accurate , then theoretically the corresponding pixel position in the second image is also the projection position of the three-dimensional point to which the pixel point belongs in the second image; or, the third image captured by the camera device at time t1 is still based on a certain three-dimensional point in the three-dimensional space.
- the three-dimensional point will be captured by the camera device at time t2.
- the second image it is located at P3 (u3, v3).
- the overall optical flow value located at the pixel position P1 (u1, v1) in the overall optical flow can be recorded as (u3-u1, v3-v1).
- the first image and the second The overall optical flow between images includes the overall optical flow value of each pixel in the first image.
- adding the pixel position of the pixel in the first image to its overall optical flow value can obtain the three-dimensional point to which the pixel belongs. Since the motion of the camera device itself and the motion of the photographed object theoretically correspond to the pixel position in the second image, and if the overall optical flow is completely accurate, then theoretically the pixel position corresponding to the second image also belongs to the pixel. The projected position of the 3D point in the second image.
- the static light flow caused by the movement of the camera device at each pixel point in the first image, after coordinate transformation, corresponds to A pixel at a certain pixel position in the second image, and if the pixel belongs to a stationary object and the static optical flow is completely accurate, then the pixel in the first image and the pixel in the second image after coordinate conversion by static optical flow should correspond to For the same three-dimensional point in three-dimensional space, for ease of description, the static optical flow can be recorded as F sij .
- the overall optical flow of each pixel in the first image caused by the motion of the camera device and the photographed object corresponds to the pixel at a certain pixel position in the second image, and if the overall optical flow is completely accurate, then the The pixel point in one image corresponds to the same three-dimensional point in the three-dimensional space after the coordinates of the pixel point in the second image are transformed by the global optical flow.
- the global optical flow can be recorded as F oij .
- the reference data includes pose and depth. Still taking the first image as image i and the second image as image j as an example, the reference data may include the pose G i of the first image i and the pose G j of the second image, and the reference data may also include the first The depth value of each pixel in image i and the depth value of each pixel in second image j.
- the depth of the first image includes the depth value of each pixel in the first image.
- the depth of the second image includes the second image.
- the depth value of each pixel in For ease of description, the depth of the first image can be denoted as d i , and similarly, the depth of the second image can be denoted as d j .
- pose is the collective name of position and attitude, which describes the conversion relationship between the world coordinate system and the camera coordinate system.
- the depth represents the distance between the object and the camera device.
- the depth can be represented by inverse depth parameterization.
- the embodiment of the present disclosure can loop iterate N times (such as 10 times, 15 times, etc.) to optimize the depth and pose as much as possible and improve the accuracy of both.
- N times such as 10 times, 15 times, etc.
- An initial value can be assigned to the pose.
- the pose can be represented by a 4*4 matrix.
- the pose can be initialized as a matrix with the main diagonal element being 1 and other elements being 0.
- the pose input by the i-th iteration can be the pose output by the i-1 iteration.
- a similar method can be used to assign an initial value to the depth during the first loop iteration.
- the specific value of the depth is not limited here.
- static objects such as buildings, street lights, etc.
- feature matching is performed on the first image and the second image based on the static objects to obtain several matching point pairs, and
- the matching point pair includes a first pixel point belonging to the stationary object in the first image, and a second pixel point belonging to the stationary object in the second image, and the first pixel point and the second pixel point correspond to the same three-dimensional point in the three-dimensional space.
- the three-dimensional position of the first pixel in the three-dimensional space can be determined based on the pose of the first image, the depth value of the first pixel and the pixel position of the first pixel in the first image.
- the position of the second pixel in the three-dimensional space can be determined based on the pose of the second image, the depth value of the second pixel in the same matching point as the first pixel and its pixel position in the second image.
- Three-dimensional position Since the three-dimensional position corresponding to the first pixel point and the three-dimensional position corresponding to the second pixel point should be the same, a series of depth values of the first pixel point and the depth value of the second pixel point can be constructed through several matching point pairs.
- the value is an equation of unknown quantity.
- the depth of the i-th iteration input can be the depth of the i-1th iteration output.
- the pixel position p i of the pixel point in the first image i, the depth di and the relative position between the first image and the second image can be Project the pose G ij to obtain the pixel position p ij projected from the pixel point in the first image to the second image, as shown in formula (1):
- ⁇ c represents the camera model used to map three-dimensional points to images
- ⁇ c -1 represents the back-projection function used to map two-dimensional points to three-dimensional points based on pixel position p i and depth p i
- the relative pose G ij can be expressed as:
- the pixel position p i of each pixel point in the first image i can be represented by a two-channel image of H*W, that is, p i ⁇ R H ⁇ W ⁇ 2 .
- the pixel position p ij projected from the pixel point in the first image to the second image can also be represented by the two-channel image of H*W, that is, p ij ⁇ R H ⁇ W ⁇ 2 .
- the pixel position p i of any pixel point in the first image i its corresponding position p j in the second image can be obtained, and the corresponding position is assuming that the camera device is not moving.
- the spatial point that is, the three-dimensional point
- the static optical flow F sij can be obtained based on the difference between the corresponding position p j of the pixel point in the first image in the second image and its projected pixel position p ij in the second image:
- the overall optical flow is caused by the operation of the camera device and the movement of the subject, and the optical flow caused by the movement of the camera device is called static optical flow.
- the movement of the subject can be The optical flow caused is called dynamic optical flow.
- the dynamic optical flow can be initialized to an all-0 matrix, and the all-0 matrix can represent a two-channel image representation using H*W.
- the aforementioned static optical flow F sij can be added to the dynamic optical flow represented by an all-0 matrix to obtain the overall optical flow F oij . That is to say, in this embodiment, the overall optical flow can be decomposed into static optical flow and dynamic optical flow.
- the overall optical flow of the sample in the disclosed embodiments described below can also be decomposed into the static optical flow of the sample and the dynamic optical flow of the sample.
- FIG. 2 is a schematic diagram of an embodiment of overall optical flow decomposition.
- the optical flow caused by the movement of the camera device and the subject i.e., the overall optical flow
- the optical flow caused by the movement of the camera device and the subject can be decomposed into the optical flow caused by the movement of the camera device (i.e., static optical flow) and the optical flow caused by the movement of the subject (i.e., dynamic light flow).
- Step S12 Based on the image sequence and optical flow data, predict and obtain the analysis results.
- the analysis results include optical flow calibration data of static optical flow
- the optical flow calibration data may include calibration values of each static optical flow value in the static optical flow.
- static optical flow can be represented by a two-channel image of H*W
- the optical flow calibration data can also be represented by a two-channel image of H*W.
- the optical flow calibration data can be recorded as r sij ⁇ R H ⁇ W ⁇ 2 .
- feature correlation data between the first image and the second image can be obtained based on the image features of the first image and the image features of the second image, and the pixels in the first image can be processed based on static optical flow. Project to obtain the first projection position of the pixel in the first image in the second image. On this basis, the feature-related data can be searched based on the first projection position to obtain the target-related data, and the analysis results can be obtained based on the target-related data, static optical flow, and overall optical flow.
- the static optical flow caused by the movement of the imaging device can be referred to, which can reduce the impact of the movement of the photographed object, and thus can Improve the accuracy of subsequent optimization poses and depths.
- FIG. 3a is a schematic process diagram of an embodiment of the image analysis method of the present disclosure.
- an image analysis model can be pre-trained, and the image analysis model can include an image encoder 301 for feature encoding for the first image i and an image encoder 301 for encoding the second image j.
- Image encoder 302 for feature encoding.
- the two image encoders 301 and 302 can share network parameters.
- the image encoder 301 and the image encoder 302 may include several (eg, 6, 7, etc.) residual blocks and several (eg, 3, 4, etc.) downsampling layers, where the image encoder 301 and the image
- the network structure of the encoder 302 is not limited.
- the resolution of the image features obtained after processing by the image encoder 301 and the image encoder 302 may be 1/8, 1/12, 1/16, etc. of the input image, which is not limited here.
- the feature-related data can be obtained by dot multiplying the image features of the first image i and the image features of the second image j, and the feature-related data can be expressed as a 4-bit vector.
- the image feature of the first image can be recorded as
- the image features of the second image can be recorded as
- feature-related data can be obtained through dot product calculations
- u i v i u j v j respectively represent the pixel coordinates in the first image i and the second image j.
- ⁇ ,> represents the dot product.
- the last two dimensions of the above feature correlation matrix can be processed by average pooling of different sizes (e.g., 1, 2, 4, 8, etc.) to form a multi-layer feature correlation pyramid, as the feature correlation data.
- RAFT Recurrent All-Pairs Field Transforms for Optical Flow
- the feature-related data C ij can be regarded as the degree of visual consistency between the first image i and the second image j.
- a correlation search function can be defined, and the input parameters of the correlation search function include the coordinate grid and radius r.
- the target related data L r can be searched:
- This function takes as input an H ⁇ W coordinate grid, which is the image dimension of static optical flow.
- the pixel coordinates of each pixel in the first image can be directly added to the static optical flow value of the pixel in the static optical flow to obtain the first projection position of the pixel in the second image.
- target-related data can be obtained from feature-related data through linear interpolation.
- the correlation search function acts on each layer in the aforementioned feature correlation pyramid, and can splice the target-related data obtained by searching at each layer to obtain the final target-related data.
- RAFT the technical details of RAFT.
- an image analysis model in order to improve the efficiency of image analysis, an image analysis model can be pre-trained.
- the image analysis model may include a dynamic update network 303, which may include but is not limited to a semantic extraction sub-network 3033, such as ConvGRU (gated recurrent unit combined with convolution), etc., in This does not limit the network structure of the dynamic update network 303.
- the dynamic update network 303 After obtaining the target related data (which can be searched from the feature related data 305 through linear interpolation), the static optical flow 3063 and the overall optical flow 3062, the dynamic update network 303 can be input to obtain the analysis results.
- the target related data which can be searched from the feature related data 305 through linear interpolation
- the static optical flow 3063 and the overall optical flow 3062 the dynamic update network 303 can be input to obtain the analysis results.
- the dynamic update network 303 After obtaining the target related data (which can be searched from the feature related data 305 through linear interpolation), the static optical flow 3063 and the overall optical
- Figure 3b is a schematic framework diagram of an embodiment of a dynamic update network.
- the dynamic update network 303 can include an optical flow encoder 3031 and a correlation encoder 3032, which can be encoded based on the target related data respectively to obtain the first encoding feature, and based on the static optical flow 3063 and the overall optical flow 3062 Encoding is performed to obtain the second encoding feature, the first encoding feature and the second encoding feature, and the analysis result is predicted.
- the first encoding feature and the second encoding feature can be input into a gated recurrent unit (ConvGRU) combined with convolution to obtain deep semantic features, and predictions can be made based on the deep semantic features to obtain analysis results.
- ConvGRU gated recurrent unit
- the hidden layer vector can be averaged in the image space dimension as a global context feature, and the global context feature can be used as an additional input to ConvGRU.
- the global context feature at the k+1th loop iteration can be recorded as h (k+1) .
- encoding is performed based on target-related data to obtain the first encoding feature
- encoding is performed based on static optical flow and overall optical flow to obtain the second encoding feature.
- the prediction can obtain the analysis results, so that the deep feature information of the optical flow data and related data can be extracted before prediction, which can help improve the accuracy of subsequent prediction analysis.
- the dynamic update network 303 can also include a static optical flow convolution layer 3035. By processing the aforementioned deep semantic features through the static optical flow convolution layer 3035, the static optical flow 3062 can be obtained.
- the reference data can also include dynamic masks, and the dynamic masks can be used to indicate moving objects in the image. For example, when a certain pixel in the image belongs to a moving object, the pixel value at the pixel position corresponding to the pixel in the dynamic mask of the image can be the first value.
- the pixel value at the pixel position corresponding to the pixel point in the dynamic mask of the image can be a second value, and the first value and the second value are different.
- the first value can be set to 0
- the second value can be set to 1.
- the dynamic mask can be initialized to an all-zero matrix.
- the first image i and the second image j are still two-dimensional images of W*H as an example.
- the dynamic mask can be expressed as a two-channel image of H*W, that is, the dynamic mask M dij ⁇ R H ⁇ W ⁇ 2 . Please refer to Figure 3a or Figure 3b in combination.
- the dynamic mask is referred to, and the dynamic mask is used to indicate moving objects in the image, so it can provide guidance for subsequent optical flow decomposition, which is beneficial to improving the accuracy of optimized pose and depth.
- the mask calibration data of the dynamic mask may include dynamic masks of both the first image and the second image.
- the mask calibration value of each mask value in the film, then the mask calibration data can also be expressed as a two-channel image of H*W, that is, the mask calibration data of the dynamic mask ⁇ M dij ⁇ R H ⁇ W ⁇ 2 .
- the dynamic mask 3061 can be added to the dynamic mask's mask calibration data 3064 to obtain an updated dynamic mask 3065. Therefore, the dynamic mask that needs to be input during the i-th loop iteration can be the dynamic mask that updates the output during the i-1th loop iteration.
- an image analysis model in order to improve the efficiency of image analysis, an image analysis model can be pre-trained.
- encoding can be performed based on the static optical flow 3063, the overall optical flow 3062 and the dynamic mask 3061 to obtain the second encoding feature.
- an image analysis model in order to improve the efficiency of image analysis, can be pre-trained.
- the dynamic update network 303 can also include a convolution layer, which can process the deep semantic features output by ConvGRU to obtain the mask calibration data 3064 of the dynamic mask 3061.
- Step S13 Based on the static optical flow and optical flow calibration data, optimize the pose and depth to obtain an updated pose and an updated depth.
- the analysis results may also include a confidence map, and the confidence map includes the confidence of each pixel in the image.
- the confidence map can be expressed as a two-channel image of H*W, that is, the confidence map w ij ⁇ R H ⁇ W ⁇ 2 .
- the first projection position can be calibrated based on the optical flow calibration data to obtain the calibration position.
- the first projection position is the pixel position of the pixel in the first image projected on the second image based on static optical flow.
- the first projection position can be recorded as p sij
- the optical flow calibration data of the static optical flow can be recorded as r sij
- the updated pose and updated depth can be optimized based on the calibration position. For example, based on the calibration position p * sij , an optimization function with the updated pose and updated depth as the optimization object can be constructed:
- diag represents the element on the main diagonal of the matrix
- G i ' j represents the relative pose between the updated pose of the first image and the updated pose of the second image
- d i ' represents the depth of the first image update.
- ⁇ represents Mahalanobis distance (mahalanobis), which can be found in the relevant technical details about Mahalanobis distance.
- (i,j) ⁇ represents the first image i and the second image j having a common view relationship.
- the dynamic update network 303 may include a convolutional layer for processing the deep semantic features extracted by ConvGRU to obtain the confidence map w ij 3034 .
- the Gauss-Newton algorithm can be used to process the changes in depth and pose.
- Shure compensation can be used to calculate the change in pose, and then calculate the change in depth.
- the change in depth can be recorded as ⁇ d, and the change in pose can be recorded as ⁇ .
- the following formula (7) can be used to obtain the updated depth:
- ⁇ (k) represents the input depth of the k-th loop iteration
- ⁇ (k) represents the change in depth of the k-th loop iteration output
- ⁇ (k+1) represents the input k+1
- the depth of the loop iteration that is, the depth of the update. That is, for the depth, the depth can be directly added to the depth change to obtain the updated depth.
- the updated pose can be obtained in the following ways:
- G (k) represents the input pose of the k-th loop iteration
- G (k+1) represents the input pose of the k+1-th loop iteration, that is, the updated pose.
- the pose needs to be stretched in the SE3 manifold based on the change in the pose.
- the reference data may also include a dynamic mask
- the analysis result may also include mask calibration data of the dynamic mask, for which please refer to the above related description.
- the dynamic mask, mask calibration data and confidence map can be fused to obtain the importance map
- the first projection position can be calibrated based on the optical flow calibration data to obtain the calibration position.
- the updated pose and updated depth are optimized.
- dynamic masks used to indicate moving objects are introduced, and the importance map is obtained by combining the confidence map to provide guidance for subsequent optical flow decomposition, which is beneficial to improving the optimization of pose and depth. accuracy.
- the optical flow calibration data includes the calibration optical flow of the pixel in the first image, then the calibration optical flow of the pixel in the first image can be added to the calibration optical flow of the pixel in the second image.
- the first projection position is to obtain the calibration position of the pixel.
- the calibrated position of the pixel after being moved only by the camera device can be obtained through a simple addition operation, which in turn can greatly reduce the need to determine the pixel point only by the camera.
- the computational complexity of the calibration position after device movement is beneficial to improving the efficiency of optimizing pose and depth.
- the dynamic mask can be calibrated based on the mask calibration data to obtain a calibration mask
- the calibration mask includes the correlation between the pixels in the image and the moving objects, and the correlation is related to the correlation between the pixels in the image belonging to the moving objects.
- the possibility is positively correlated, that is, the higher the possibility that a pixel belongs to a moving object, the greater the correlation.
- the lower the possibility that a pixel belongs to a moving object the smaller the correlation.
- the importance map can be obtained by fusion based on the confidence map and the calibration mask. It can weight and normalize the confidence map and calibration mask to obtain the importance map.
- the importance map w dij of the first image i and the second image j can be expressed as:
- sigmoid represents the normalization function
- M dij represents the updated dynamic mask, which is updated by adding the mask calibration data ⁇ M dij to the dynamic mask M dij . That is, it can be updated by referring to the above formula (7).
- the dynamic mask of ⁇ (k+1) represents the input dynamic mask of the k+1th loop iteration, that is, the updated dynamic mask.
- 1-M dij represents the calibration mask
- w ij represents the confidence map
- eta represents the weighting coefficient, which can be set to 10, 20, etc., and is not limited here.
- the above method can jointly measure the importance of pixels from two aspects: the confidence of the pixel itself and the correlation between the pixel and the moving object, which can help improve the accuracy of subsequent optimization poses and depths.
- the optimization function can be constructed by referring to the implementation provided by the above formula (5) and formula (6).
- the updated depth can be obtained by solving and updated poses.
- the importance map removes the suppression of moving objects and increases the number of pixels available in the optimization function.
- the confidence map can be responsible for removing some other pixels that affect the calculation, such as pixels caused by poor lighting effects and other reasons.
- the analysis results may also include dynamic optical flow 3081, and the dynamic optical flow is caused by the motion of the photographed object.
- the updated static optical flow 3082 can be obtained based on the updated pose 3072 and the updated depth 3073, and based on the dynamic optical flow 3081 and the updated static optical flow 3082, an updated overall optical flow 3071 can be obtained, and based on The updated static optical flow 3082 and the updated overall optical flow 3071 are used to obtain updated optical flow data, and based on the updated pose 3072 and the updated depth 3073, updated reference data is obtained, so that the aforementioned image sequence and optical flow can be re-executed. Data, predict the steps to obtain the analysis results and subsequent steps until the number of re-executions meets the preset conditions.
- the overall optical flow is decomposed into static optical flow and dynamic optical flow, and the optimization steps are cycled multiple times to solve the problem of poor single optimization effect, and the old variables are used as input Guiding the generation of new variables can make the input features more diverse, so it can help improve the accuracy of pose and depth.
- the overall optical flow is decomposed into static optical flow and dynamic optical flow, and multiple iterative optimization steps are cycled to solve the problem of poor single optimization effect, and old variables are used as input to guide new ones.
- the generation of variables can make the input features more diverse, so it can help improve the accuracy of pose and depth.
- projection can be performed based on the updated pose, the updated depth and the pixel position of the pixel in the first image, to obtain the second projection position of the pixel in the first image projected on the second image, and based on the The difference between the second projection position of the pixels in one image in the second image and the corresponding position of the pixels in the first image in the second image is used to obtain an updated static optical flow, and the corresponding position is the position of the pixel that is not in the camera device.
- the spatial point to which the pixel point in the first image belongs is projected on the pixel position of the second image.
- the dynamic optical flow predicted in the analysis results can be directly added to the updated static optical flow to obtain the updated overall optical flow, that is:
- F st represents the updated static optical flow
- F dt represents the dynamic optical flow predicted in the analysis results
- F ot represents the updated overall optical flow.
- the updated overall optical flow can be obtained by adding the predicted dynamic optical flow and the updated static optical flow. That is, the updated overall optical flow can be determined through a simple addition operation, which is beneficial to improving the optimization pose and posture. Deep efficiency.
- the preset conditions can be set to include: the number of re-executions is not less than the preset threshold (such as 9, 10, etc.), so that the pose and depth can be continuously optimized and the pose can be continuously optimized through multiple loop iterations. and depth accuracy.
- the preset threshold such as 9, 10, etc.
- Figure 4a is a schematic diagram comparing the trajectory determined by the image analysis method of the present disclosure with the actual trajectory and the trajectory determined by the prior art.
- Figure 4b is the trajectory determined by the image analysis method of the disclosure.
- Figure 4a shows the test results of image sequence 09 in the computer vision algorithm evaluation data set (KITTI data set) in the autonomous driving scenario, and
- Figure 4b shows the test results of image sequence 10 in the KITTI data set.
- both image sequence 09 and image sequence 10 contain moving objects, which are difficult dynamic scenes, and the dotted line represents the actual trajectory of the camera device during the shooting process, the dark line represents the trajectory determined by the existing technology, and the light line represents Trajectories are determined by the disclosed image analysis method.
- the accuracy of the disclosed image analysis method is almost twice that of the existing technology, and in the test scene of the KITTI data set image sequence 10, the trajectory determined by the disclosed image analysis method is almost the same as the actual one. The trajectories coincide.
- Figure 5a is a schematic diagram comparing the trajectory determined by the image analysis method of the present disclosure with the actual trajectory and the trajectory determined by the prior art in another embodiment.
- Figure 5b is an image of the disclosure.
- Figure 5c is a schematic diagram comparing the trajectory determined by the image analysis method and the actual trajectory and the trajectory determined by the prior art according to another embodiment of the disclosure.
- Figure 5a shows the test results of image sequence 01 in the KITTI data set
- Figure 5b shows the test results of image sequence 02 in the KITTI data set
- Figure 5c shows the test results of image sequence 20 in the KITTI data set.
- image sequence 01, image sequence 02 and image sequence 20 all contain moving objects, which are difficult dynamic scenes.
- the dotted line represents the actual trajectory of the camera device during the shooting process
- the dark line represents the trajectory determined by the existing technology
- the light-colored lines represent the trajectories determined by the image analysis method of the present disclosure.
- the trajectory determined by the image analysis method of the present disclosure and the trajectory determined by the prior art maintain a relatively consistent trend with the actual trajectory, but this method
- the trajectory determined by the public image analysis method is closer to the actual trajectory; at the same time, as shown in Figure 5b, in the test scene of image sequence 02 in the KITTI data set, the trajectory determined by the disclosed image analysis method maintains a relatively consistent trend with the actual trajectory.
- the disclosed embodiments can be applied to the front end of the SLAM system to determine the pose and depth of the image in real time, or can also be applied to the back end of the SLAM system to globally optimize the pose and depth of each image.
- the SLAM system can include front-end threads and back-end threads, both of which can run at the same time.
- the task of the front-end thread is to receive new images and select key frames. On this basis, obtain the pose, depth and other variable results of the key frames through the embodiment of the present disclosure.
- the task of the back-end thread is to globally pass Embodiments of the present disclosure perform global optimization on variable results such as pose and depth of each key frame, so that on this basis, a three-dimensional map of the environment scanned by the camera device can be constructed.
- the SLAM system during initialization, will continuously collect images until M (eg, 12, etc.) frames are collected. Among them, the SLAM system of the embodiment of the present disclosure only retains the current frame when the estimated average static optical flow of the current frame is greater than a first numerical value (eg, 16, etc.) pixels.
- M frames Once M frames are accumulated, the SLAM system creates edges between these frames to initialize the factor graph 304 (as shown in Figure 3a).
- the nodes in the factor graph 304 represent each frame image, and the time difference between the images corresponding to the nodes that create edges should be within a second numerical value (eg, 3, etc.) time steps.
- the SLAM system will use the disclosed image analysis method to dynamically update the pose and depth of the images in the image sequence.
- the front end of the SLAM system of the embodiment of the present disclosure can directly process the incoming image sequence, and it maintains a set of key frames and a factor graph that stores edges between mutually visible key frames.
- the pose and depth of keyframes are continuously optimized.
- the SLAM system extracts its feature map and then uses the nearest neighbor frames of L (e.g., 3, etc.) frames to construct a factor map.
- L e.g., 3, etc.
- the distance between frames can be measured as the average static optical flow between frames.
- the pose corresponding to the new input frame can be given an initial value by the linear motion model.
- the SLAM system iterates through several loops to optimize the pose and depth corresponding to the key frame. Among them, the poses corresponding to the first two frames can be fixed to eliminate scale uncertainty. After processing new frames, redundant frames can be deleted based on distance from static optical flow. If there are no suitable frames to delete, the SLAM system can delete the oldest keyframes.
- the backend of the SLAM system can perform global optimization on a set of all key frames.
- the average static optical flow between key frames can be used as the distance between frames to generate an inter-frame distance matrix for easy search.
- the factor graph can be reconstructed based on the distance matrix. For example, you can first select edges composed of temporally adjacent frames and add them to the factor graph; then select new edges based on the distance matrix, with smaller distances being given priority.
- the embodiments of the present disclosure can be used to modify the factor graph All edges are optimized to update pose and depth for all frames.
- Figure 5d is a schematic diagram of map reconstruction of the image analysis method of the present disclosure applied to various data sets.
- the embodiments of the present disclosure can be well promoted and applied on the above data sets.
- the embodiments of the present disclosure can also be applied to motion segmentation tasks, that is, to segment moving objects in images, and the embodiments of the present disclosure have significant segmentation effects.
- motion segmentation tasks that is, to segment moving objects in images
- the embodiments of the present disclosure have significant segmentation effects.
- Figure 5e is a schematic diagram of the image analysis method of the present disclosure applied to the motion segmentation task. As shown in Figure 5e, the column on the left represents the real dynamic mask, and the column on the right represents the predicted dynamic mask.
- FIG. 5f is a schematic comparison diagram of the image analysis method of the present disclosure and the prior art applied to AR respectively.
- the lower right corner represents the original image 501 captured by the camera device
- the upper left corner represents the desired effect 502 of adding a virtual object (such as the tree contained in the dotted box) in the original image
- the upper right corner represents the embodiment of the present disclosure.
- the effect of adding a virtual object to the original image is shown 503.
- the lower left corner shows the effect of adding a virtual object to the original image using the prior art 504.
- the effect of the present disclosure after adding virtual objects through precise positioning in a sports scene is closer to the expected effect.
- adding virtual objects to the original image through the existing technology produces serious drift.
- Embodiments of the present disclosure achieve precise positioning even in moving scenes through optical flow decomposition, and can be widely used in such things as the above-mentioned SLAM system, motion segmentation tasks, scene editing (AR applications as shown in Figure 5f), etc.
- the above scheme by imitating the way humans perceive the real world, regards the overall optical flow as caused by the movement of the camera device and the movement of the photographed object, and during the image analysis process, reference is made to the overall optical flow and the static optical flow caused by the movement of the camera device , predict the optical flow calibration data of the static optical flow, so that in the subsequent pose and depth optimization process, the static optical flow and its optical flow calibration data can be combined to reduce the impact caused by the motion of the subject as much as possible, thereby improving the position. pose and depth accuracy.
- FIG. 6 is a schematic flow chart of an embodiment of the training method of the image analysis model of the present disclosure. May include the following steps:
- Step S61 Obtain the sample image sequence, sample optical flow data, and sample reference data of each sample image in the sample image sequence.
- each sample image includes a first sample image and a second sample image that have a common view relationship
- the sample optical flow data includes the sample static optical flow and sample between the first sample image and the second sample image.
- the static optical flow of the sample is caused by the motion of the camera device
- the overall optical flow of the sample is caused by the motion of the camera device and the motion of the photographed object
- the sample reference data includes the sample pose and sample depth.
- Step S62 Analyze and predict the sample image sequence and sample optical flow data based on the image analysis model to obtain sample analysis results.
- the sample analysis results include sample optical flow calibration data of the sample static optical flow.
- sample optical flow calibration data of the sample static optical flow.
- Step S63 Based on the sample static optical flow and the sample optical flow calibration data, optimize the sample pose and sample depth to obtain an updated sample pose and an updated sample depth.
- Step S64 Perform loss measurement based on the updated sample pose and updated sample depth to obtain the predicted loss of the image analysis model.
- the sample reference data may also include a sample dynamic mask, which is used to indicate moving objects in the sample image
- the sample analysis results also include sample dynamic optical flow and sample Sample mask calibration data of the dynamic mask
- the sample dynamic optical flow is caused by the motion of the photographed object
- the prediction loss may include a mask prediction loss.
- the mask prediction loss can be denoted as L art_mask .
- sample dynamic mask, sample dynamic optical flow, and sample mask calibration data please refer to the relevant descriptions of dynamic mask, dynamic optical flow, and mask calibration data in the aforementioned disclosed embodiments respectively.
- the updated overall optical flow of the sample can be obtained based on the sample dynamic optical flow, updated sample pose and updated sample depth.
- the first prediction mask obtained by updating the sample dynamic mask in the model dimension can be obtained based on the sample mask calibration data and the sample dynamic mask.
- the second prediction mask obtained by updating the sample dynamic mask in the optical flow dimension is obtained, so that the mask prediction loss can be obtained based on the difference between the first prediction mask and the second prediction mask.
- dynamic mask labels can be constructed through the updated overall optical flow of the sample, the updated sample pose, and the updated sample depth to achieve self-supervised training. It is conducive to reducing the requirements for sample annotation during the training process on the premise of improving model performance.
- obtaining the updated overall optical flow is similar.
- the process can be referred to the above "Based on the updated pose and updated depth, obtaining the updated static optical flow, and based on the dynamic optical flow and the updated static optical flow.” , get the updated overall optical flow" related description.
- obtaining an updated dynamic mask is similar.
- the first prediction mask can be denoted as M di .
- the second prediction mask it can be projected based on the updated sample pose, the updated sample depth and the sample pixel position of the sample pixel point in the first sample image to obtain the first sample
- the sample pixel point in the image is projected at the first sample projection position p cam of the second sample image:
- G ij represents the relative pose between the updated pose of the first sample image and the updated pose of the second sample image.
- p i represents the sample pixel position of the sample pixel in the first sample image, Indicates the depth of update of sample pixels in the first sample image.
- ⁇ c and operators For the specific meaning, please refer to the relevant descriptions in the foregoing disclosed embodiments.
- projection can be performed based on the updated overall optical flow of the sample and the sample pixel position of the sample pixel point in the first sample image, to obtain a second sample projection of the sample pixel point in the first sample image projected onto the second sample image.
- F oij represents the updated sample overall optical flow. That is to say, the sample overall optical flow value corresponding to the sample pixel can be directly queried in the updated sample overall optical flow, and it can be compared with the sample pixel. The sample pixel positions of are added to obtain the second sample projection position. On this basis, the second prediction mask can be obtained based on the difference between the projection position of the first sample and the projection position of the second sample. Therefore, the pixel position of the projection using pose and depth and the overall optical flow can be obtained. The difference between the two projection positions is used to identify the sample pixels belonging to the moving object to obtain the second prediction mask, which is beneficial to improving the accuracy of constructing dynamic mask labels.
- the sample mask value of the sample pixel point can be obtained based on the distance between the first sample projection position and the second sample projection position by comparing the preset threshold, and the sample mask value is used to indicate whether the sample pixel point belongs to Moving objects. For example, when the distance between the first sample projection position and the second sample projection position is greater than a preset threshold, the sample pixel point can be considered to belong to the moving object, and at this time, the sample mask value of the sample pixel point can be determined to be the first A value (such as 0). On the contrary, when the distance between the first sample projection position and the second sample projection position is not greater than the preset threshold, it can be considered that the sample pixel does not belong to the moving object. In this case, The sample mask value of the sample pixel is determined to be a second value (eg, 1). On this basis, the second prediction mask can be obtained based on the sample mask value of each sample pixel.
- ⁇ represents the preset threshold
- 2 represents the Euclidean distance.
- the preset threshold ⁇ can be set to 0.5, which is not limited here.
- N represents the set of pixel points in the first prediction mask or the second prediction mask
- represents the total number of pixel points in the first prediction mask or the second prediction mask
- the model training can be supervised through supervised training.
- the mask prediction loss can be obtained based on the difference between the first predicted mask and the real dynamic mask.
- the cross-entropy loss function can also be used to measure the difference between the first predicted mask and the real dynamic mask to obtain the mask prediction loss.
- the mask prediction loss in supervised training can be recorded as L gt_mask :
- Mi represents the real dynamic mask.
- other parameters please refer to the related description of self-supervised training mentioned above.
- the sample reference data also includes a sample dynamic mask
- the sample dynamic mask is used to indicate moving objects in the sample image
- the predicted loss includes a geometric photometric loss.
- the geometric photometric loss can be denoted as L geo_ph .
- the sample dynamic mask please refer to the relevant descriptions about the dynamic mask in the aforementioned disclosed embodiments. Please refer to FIG. 7 , which is a schematic diagram of an embodiment of a dynamic scene.
- the sample fusion mask can be obtained by fusion based on the sample dynamic masks of the second sample images that have a common view relationship with the first sample image.
- projection can be performed based on the updated sample pose, the updated sample depth and the sample pixel position of the sample pixel in the first sample image, to obtain the projection of the sample pixel in the first sample image on the second sample image.
- the first sample projection position is 702. Based on this, the first sample pixel value of the sample pixel point in the first sample image can be obtained based on the sample pixel position of the sample pixel point in the first sample image, and based on the first sample pixel value of the sample pixel point in the first sample image A sample projection position is used to obtain the second sample pixel value of the sample pixel point in the first sample image, and based on the sample fusion mask, the fusion mask value of the sample pixel point in the first sample image is obtained, so that the second sample pixel value of the sample pixel point in the first sample image is obtained.
- One sample pixel value, the second sample pixel value and the fused mask value are used to obtain the geometric photometric loss.
- the sample fusion mask is obtained by fusing the sample dynamic mask of the second sample image that has a common view relationship with the first sample image, and the sample fusion mask is considered in the geometric photometric loss measurement process, which is beneficial to the
- the sample fusion mask eliminates erroneous pixel photometric matching due to pixel occlusion as much as possible, can improve the measurement accuracy of geometric photometric loss, and is beneficial to improving the model performance of the image analysis model.
- the sample dynamic masks of these second sample images can be aggregated to obtain a sample fusion mask.
- specific operations of aggregation may include but are not limited to taking unions, etc., which are not limited here.
- the sample fusion mask can be recorded as At the same time, for the projection position of the first sample, please refer to the relevant description in the aforementioned mask prediction loss.
- the first sample pixel value can be obtained by querying the pixel value at the sample pixel position in the first sample image directly based on the sample pixel position of the sample pixel point in the first sample image, where, The first sample pixel value may be denoted I i .
- the second sample pixel value I j ⁇ i can be obtained through bilinear interpolation in the second sample image:
- the pixel difference value pe(I i ,I j ) between the first sample pixel value and the second sample pixel value can be obtained ⁇ i ), and then use the fusion mask value of the sample pixel Perform weighting to obtain the weighted difference
- the geometric photometric loss L geo_ph is obtained:
- N' represents the total number of pixels belonging to stationary objects in the sample fusion mask.
- SSIM represents the structural similarity measure
- 1 represents the absolute value deviation measure
- (1- ⁇ ) represents the weight of the first difference and the second difference respectively.
- ⁇ can be set to 0.85, which is not limited here.
- the above method in the process of measuring pixel difference, combines the two aspects of structural similarity and absolute value deviation to jointly measure, which is conducive to improving the accuracy of pixel difference as much as possible.
- the geometric photometric loss L geo_ph can be expressed as formula (19), where N represents the total number of sample pixels:
- the predicted loss may also include optical flow photometric loss, where the optical flow photometric loss may be recorded as L flow_ph .
- the sample analysis results may also include sample dynamic optical flow, which may be described in the aforementioned mask prediction loss. Based on this, the updated overall optical flow of the sample can be obtained based on the sample dynamic optical flow, the updated sample pose and the updated sample depth. For this, please refer to the relevant description in the aforementioned mask prediction loss. On this basis, projection can be performed based on the updated overall optical flow of the sample and the sample pixel position of the sample pixel point in the first sample image, to obtain a second sample in which the sample pixel point in the first sample image is projected on the second sample image.
- the sample overall optical flow value of the sample pixel point can be directly queried in the updated sample overall optical flow, plus the sample pixel position of the sample pixel point, to obtain the second sample projection position, which can be referred to the aforementioned mask prediction.
- the second sample pixel value I j ⁇ i can be obtained through bilinear interpolation in the second sample image:
- the optical flow photometric loss can be obtained based on the difference between the first sample pixel value and the second sample pixel value.
- the first sample pixel value and the second sample pixel value can be measured based on structural similarity to obtain the first difference value
- the first sample pixel value and the second sample pixel value can be measured based on the absolute value deviation to obtain the first difference value.
- the two differences are then weighted based on the first difference and the second difference to obtain the pixel difference, so that the optical flow photometric loss L flow_ph can be obtained based on the pixel difference of each sample pixel:
- Step S65 Based on the prediction loss, adjust the network parameters of the image analysis model.
- the prediction loss may include at least one of the aforementioned mask prediction loss, geometric photometric loss, and optical flow photometric loss.
- the prediction loss can include the aforementioned mask prediction loss, geometric photometric loss and optical flow photometric loss. Then the prediction loss L self_sup can be obtained by weighting based on these three:
- ⁇ 0 , ⁇ 1 , and ⁇ 2 all represent weighting coefficients. For example, they can be set to 100, 5, and 0.05 respectively, which are not limited here. Please refer to Table 1.
- Table 1 is a comparison table between the test performance of the disclosed image analysis model after training in a self-supervised manner and the test performance of the prior art in an embodiment.
- K09 and K10 represent the test performance of different technical solutions in the test scenario of image sequence 09 and image sequence 10 in the KITTI data set.
- VK01, VK02, VK06, VK18, and VK20 represent image sequence 01, image sequence 02, and image sequence in the KITTI2 data set.
- Table 1 the image analysis model trained by the self-supervised method of the present disclosure has extremely significant model performance compared with other existing technologies in many test scenarios.
- the prediction loss may include at least one of the aforementioned mask prediction loss, geometric photometric loss, and optical flow photometric loss.
- the prediction loss can include the aforementioned mask prediction loss, geometric photometric loss and optical flow photometric loss. Then the prediction loss L semi_sup can be obtained by weighting based on these three:
- ⁇ 0 , ⁇ 1 , and ⁇ 2 all represent weighting coefficients. For example, they can be set to 100, 5, and 0.05 respectively, which are not limited here.
- the network parameters of the image analysis model can be adjusted through optimization methods such as gradient descent.
- optimization methods such as gradient descent.
- the above scheme similar to the inference stage, considers the overall optical flow as caused by the movement of the camera device and the movement of the subject by imitating the way humans perceive the real world, and during the image analysis process, refer to the overall optical flow and the movement of the camera device.
- the static optical flow caused by motion can predict the optical flow calibration data of the static optical flow, so that in the subsequent pose and depth optimization process, the static optical flow and its optical flow calibration data can be combined to reduce the optical flow caused by the motion of the subject as much as possible.
- the impact can improve the model performance of the image analysis model, which is conducive to improving the accuracy of the analysis results obtained by using the image analysis model in the inference stage, thereby improving the accuracy of the pose and depth in the inference stage.
- FIG. 8 is a schematic framework diagram of an embodiment of the image analysis device 80 of the present disclosure.
- the image analysis device 80 includes: an acquisition part 81 configured to acquire an image sequence, optical flow data, and reference data of each image in the image sequence; wherein each image includes a first image and a second image having a common view relationship, and the optical flow
- the data includes static optical flow and overall optical flow between the first image and the second image.
- the static optical flow is caused by the movement of the camera device, the overall optical flow is caused by the movement of the camera device and the movement of the photographed object, and the reference data includes pose and depth;
- the analysis part 82 is configured to predict the analysis results based on the image sequence and optical flow data; wherein the analysis results include optical flow calibration data of static optical flow;
- the optimization part 83 is configured to predict based on the static optical flow and optical flow calibration data , optimize the pose and depth to obtain an updated pose and an updated depth.
- the analysis part 82 includes: a feature correlation sub-part configured to obtain feature correlation data between the first image and the second image based on the image features of the first image and the image features of the second image;
- the first projection sub-part is configured to project the pixels in the first image based on static optical flow to obtain the first projection position of the pixels in the first image in the second image;
- the feature search sub-part is configured to project based on The first projection position is searched in feature-related data to obtain target-related data;
- the data analysis subpart is configured to obtain analysis results based on target-related data, static optical flow, and overall optical flow.
- the data analysis sub-part includes: a first encoding sub-part configured to perform encoding based on target-related data to obtain first encoding features; a second encoding sub-part configured to perform encoding based on static optical flow and overall The optical flow is encoded to obtain the second encoding feature; the prediction sub-part is configured to predict and obtain the analysis result based on the first encoding feature and the second encoding feature.
- the reference data also includes a dynamic mask
- the dynamic mask is used to indicate moving objects in the image
- the analysis results also include a confidence map and mask calibration data of the dynamic mask
- the confidence map includes the Confidence of each pixel
- the optimization part 83 includes: an image fusion subpart, which is configured to fuse based on the dynamic mask, mask calibration data and confidence map to obtain an importance map; a position calibration subpart, which is configured to fuse based on The optical flow calibration data calibrates the first projection position to obtain the calibration position; where the importance map includes the importance of each pixel in the image, and the first projection position is the projection of the pixel in the first image based on the static optical flow on the second The pixel position of the image; the data optimization subsection is configured to optimize the updated pose and updated depth based on the calibration position and importance map.
- the optical flow calibration data includes the calibration optical flow of the pixel point in the first image
- the position calibration sub-part is further configured to add the calibration optical flow of the pixel point in the first image plus the pixel point in the second image.
- the first projected position in the image is used to obtain the calibrated position of the pixel.
- the image fusion sub-part includes: a calibration sub-part configured to calibrate the dynamic mask based on the mask calibration data to obtain a calibration mask; wherein the calibration mask includes pixel points and moving objects in the image The correlation degree is positively related to the possibility that a pixel in the image belongs to a moving object; the fusion sub-part is configured to fuse based on the confidence map and the calibration mask to obtain the importance map.
- the analysis results also include dynamic optical flow, which is caused by the motion of the photographed object;
- the image analysis device 80 includes: a static optical flow update part configured to obtain based on the updated pose and updated depth. Updated static optical flow;
- the overall optical flow update part is configured to be based on dynamic optical flow and updated static optical flow to obtain an updated overall optical flow;
- the data update part is configured to be based on updated static optical flow and updated overall Optical flow, obtain updated optical flow data, and obtain updated reference data based on the updated pose and updated depth;
- the loop part is configured to combine the analysis part 82 and the optimization part 83 to re-execute based on the image sequence and optical flow data, Predict the steps to obtain the analysis results and subsequent steps until the number of re-executions meets the preset conditions.
- the static optical flow update part includes: a second projection subpart configured to perform projection based on the updated pose, the updated depth and the pixel position of the pixel in the first image, to obtain the The pixel point is projected at the second projection position of the second image; the optical flow update sub-section is configured to project the pixel point in the first image at the second projection position of the second image and the pixel point in the first image is at the second projection position of the second image.
- the difference between the corresponding positions in , the updated static optical flow is obtained; where the corresponding position is the pixel position of the second image where the spatial point to which the pixel point in the first image belongs is projected on the assumption that the camera device does not move.
- the overall optical flow updating part is also configured to add the dynamic optical flow and the updated static optical flow to obtain an updated overall optical flow.
- FIG. 9 is a schematic framework diagram of an embodiment of an image analysis model training device 90 .
- the training device 90 of the image analysis model includes: a sample acquisition part 91 configured to acquire the sample image sequence, the sample optical flow data, and the sample reference data of each sample image in the sample image sequence; wherein each sample image includes a common view relationship.
- the first sample image and the second sample image, the sample optical flow data include the sample static optical flow and the sample overall optical flow between the first sample image and the second sample image, the sample static optical flow is caused by the movement of the camera device, the sample The overall optical flow is caused by the motion of the camera device and the motion of the photographed object, and the sample reference data includes sample pose and sample depth; the sample analysis part 92 is configured to analyze and predict the sample image sequence and sample optical flow data based on the image analysis model , obtain the sample analysis results; wherein, the sample analysis results include sample optical flow calibration data of the sample static optical flow; the sample optimization part 93 is configured to calculate the sample pose and sample depth based on the sample static optical flow and the sample optical flow calibration data.
- the loss measurement part 94 is configured to perform loss measurement based on the updated sample pose and updated sample depth to obtain the predicted loss of the image analysis model
- parameter adjustment part 95 is configured to adjust the network parameters of the image analysis model based on the prediction loss.
- the sample reference data also includes a sample dynamic mask
- the sample dynamic mask is used to indicate moving objects in the sample image
- the sample analysis results also include sample dynamic optical flow and sample mask calibration of the sample dynamic mask.
- data, and the sample dynamic optical flow is caused by the motion of the photographed object, and the prediction loss includes the mask prediction loss
- the training device 90 of the image analysis model also includes: a sample overall optical flow update part configured to update the sample based on the sample dynamic optical flow.
- the loss measurement part 94 includes: a first mask update subpart configured to obtain the sample dynamic mask based on the sample mask calibration data and the sample dynamic mask The first prediction mask obtained by updating the model dimension; the second mask update sub-part is configured to obtain the dynamic mask of the sample in the optical flow based on the updated overall optical flow of the sample, the updated sample pose and the updated sample depth. a second prediction mask obtained by dimensionality update; the mask loss metric sub-section is configured to obtain the mask prediction loss based on the difference between the first prediction mask and the second prediction mask.
- the second mask update sub-part includes: a first sample projection sub-part configured to be based on the updated sample pose, the updated sample depth and the sample of the sample pixel point in the first sample image The pixel position is projected to obtain the sample pixel point in the first sample image projected at the first sample projection position of the second sample image; the second sample projection sub-part is configured to be based on the updated overall optical flow of the sample, which is the same as the first sample Project the sample pixel position of the sample pixel point in this image to obtain the second sample projection position of the sample pixel point in the first sample image projected at the second sample image; the mask determination sub-part is configured to be based on the first sample The difference between the projected position and the second sample projected position results in a second prediction mask.
- the mask determination sub-part includes: a distance comparison sub-part configured to obtain a sample of the sample pixel point based on a distance comparison between the first sample projection position and the second sample projection position with a preset threshold.
- Mask value wherein, the sample mask value is used to indicate whether the sample pixel point belongs to a moving object
- the mask acquisition subunit is configured to obtain the second prediction mask based on the sample mask value of each sample pixel point.
- the sample reference data also includes a sample dynamic mask
- the sample dynamic mask is used to indicate moving objects in the sample image
- the prediction loss includes a geometric photometric loss
- the training device 90 of the image analysis model also includes a sample mask
- the film aggregation part is configured to fuse based on the sample dynamic masks of the second sample images that have a common view relationship with the first sample image to obtain the sample fusion mask
- the loss measurement part 94 includes: a first sample projection sub- The part is configured to perform projection based on the updated sample pose, the updated sample depth and the sample pixel position of the sample pixel point in the first sample image, to obtain the projection of the sample pixel point in the first sample image on the second sample image.
- the first sample projection position; the first pixel value determination sub-section is configured to obtain the first sample pixel value of the sample pixel point in the first sample image based on the sample pixel position of the sample pixel point in the first sample image ;
- the second pixel value determination sub-part is configured to obtain the second sample pixel value of the sample pixel in the first sample image based on the first sample projection position of the sample pixel in the first sample image;
- Fusion mask The value acquisition subpart is configured to obtain the fusion mask value of the sample pixel point in the first sample image based on the sample fusion mask;
- the photometric loss measurement subpart is configured to obtain the fusion mask value of the sample pixel point in the first sample image based on the sample fusion mask.
- the pixel values are fused with the mask values to obtain the geometric photometric loss.
- the photometric loss measurement sub-section includes: a pixel difference acquisition sub-section configured to acquire a pixel difference between a first sample pixel value and a second sample pixel value; a numerical weighting sub-section configured to obtain a pixel difference between a first sample pixel value and a second sample pixel value; It is configured to use the fusion mask value to weight the pixel difference to obtain a weighted difference; the loss acquisition sub-part is configured to obtain a geometric photometric loss based on the weighted difference of each sample pixel.
- the pixel difference acquisition sub-section includes: a first difference sub-section configured to measure the first sample pixel value and the second sample pixel value based on structural similarity to obtain the first difference value;
- the second difference sub-section is configured to measure the first sample pixel value and the second sample pixel value based on the absolute value deviation to obtain the second difference value;
- the difference weighting sub-section is configured to measure the first sample pixel value and the second sample pixel value based on the absolute value deviation. The two differences are weighted to obtain the pixel difference value.
- FIG. 10 is a schematic framework diagram of an embodiment of the electronic device 100 of the present disclosure.
- the electronic device 100 includes a memory 101 and a processor 102 coupled to each other.
- the processor 102 is configured to execute program instructions stored in the memory 101 to implement any of the above image analysis methods or any image analysis model training method.
- the electronic device 100 may include but is not limited to: a microcomputer and a server.
- the electronic device 100 may also include mobile devices such as laptop computers and tablet computers, which are not limited here.
- the processor 102 is configured to control itself and the memory 101 to implement any of the above image analysis methods, or to implement any of the above image analysis model training methods.
- the processor 102 may also be called a central processing unit (Central Processing Unit, CPU).
- the processor 102 may be an integrated circuit chip with signal processing capabilities.
- the processor 102 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
- the processor 102 may be implemented by an integrated circuit chip.
- FIG. 11 is a schematic diagram of a framework of an embodiment of the computer-readable storage medium 110 of the present disclosure.
- the computer-readable storage medium 110 stores program instructions 111 that can be executed by the processor.
- the program instructions 111 are configured to implement any of the above image analysis methods, or to implement any of the above image analysis model training methods.
- Embodiments of the present disclosure also provide a computer program.
- the computer program includes computer readable code.
- the processor of the electronic device executes any one of the above-mentioned functions.
- Image analysis methods, or training methods that implement any of the above image analysis models.
- the disclosed methods and devices can be implemented in other ways.
- the device implementation described above is only illustrative.
- the division of parts or units is only a logical function division. In actual implementation, there may be other division methods.
- units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to network units. Some or all of the units can be selected according to actual needs to achieve the purpose of this embodiment.
- each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above integrated units can be implemented in the form of hardware or software functional units.
- Integrated units may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
- the technical solution of the present disclosure is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present disclosure.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .
- the present disclosure relates to the field of augmented reality.
- augmented reality By obtaining image information of target objects in the real environment, and then using various visual related algorithms to detect or identify the relevant features, states and attributes of the target objects, thereby obtaining information that matches specific applications.
- AR effect that combines virtuality and reality.
- the target object may involve the face, limbs, gestures, actions, etc. related to the human body, or the identifiers or markers related to the object, or the sand table, display area or display items related to the venue or place.
- Vision-related algorithms can involve visual positioning, SLAM, three-dimensional reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc.
- Specific applications can not only involve interactive scenes such as tours, navigation, explanations, reconstructions, and virtual effects overlay displays related to real scenes or objects, but also involve special effects processing related to people, such as makeup beautification, body beautification, special effects display, virtual Model display and other interactive scenarios.
- Convolutional neural networks can be used to detect or identify the relevant features, states and attributes of target objects.
- the above-mentioned convolutional neural network is a network model obtained through model training based on a deep learning framework.
- Embodiments of the present disclosure provide an image analysis method, a model training method, a device, a device, a medium and a program, wherein the image analysis method includes: acquiring an image sequence, optical flow data and reference data of each image in the image sequence; wherein , each image includes a first image and a second image that have a common viewing relationship, and the optical flow data includes static optical flow and overall optical flow between the first image and the second image.
- the static optical flow is caused by the movement of the camera device, and the overall optical flow
- the flow is caused by the movement of the camera device and the movement of the photographed object, and the reference data includes pose and depth; based on the image sequence and optical flow data, the analysis results are predicted; among them, the analysis results include optical flow calibration data of static optical flow; based on static optical flow Flow and optical flow calibration data are used to optimize pose and depth to obtain updated pose and updated depth.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
| 分析方式 | K09 | K10 | VK01 | VK02 | VK06 | VK18 | VK20 |
| 现有技术1 | 28.1 | 24.0 | - | - | - | - | - |
| 现有技术2 | 41.91 | 7.519 | 27.830 | X | X | X | 2.807 |
| 现有技术3 | 47.1 | 11.0 | 2.259 | 0.049 | 0.136 | 1.170 | 6.998 |
| 本公开 | 27.8 | 4.2 | 0.591 | 0.021 | 0.13 | 0.400 | 1.039 |
Claims (21)
- 一种图像分析方法,包括:获取图像序列、光流数据和所述图像序列中各个图像的参考数据;其中,所述各个图像包括具有共视关系的第一图像和第二图像,所述光流数据包括所述第一图像与所述第二图像之间的静态光流和整体光流,所述静态光流由摄像器件运动引起,所述整体光流由摄像器件运动和拍摄对象运动共同引起,且所述参考数据包括位姿和深度;基于所述图像序列和所述光流数据,预测得到分析结果;其中,所述分析结果包括所述静态光流的光流校准数据;基于所述静态光流和所述光流校准数据,对所述位姿和所述深度进行优化,得到更新的位姿和更新的深度。
- 根据权利要求1所述的方法,其中,所述基于所述图像序列和所述光流数据,预测得到分析结果,包括:基于所述第一图像的图像特征和所述第二图像的图像特征,得到所述第一图像与所述第二图像之间的特征相关数据,并基于所述静态光流将所述第一图像中像素点进行投影,得到所述第一图像中像素点在所述第二图像中的第一投影位置;基于所述第一投影位置在所述特征相关数据中搜索,得到目标相关数据;基于所述目标相关数据、所述静态光流和所述整体光流,得到所述分析结果。
- 根据权利要求2所述的方法,其中,所述基于所述目标相关数据、所述静态光流和所述整体光流,得到所述分析结果,包括:基于所述目标相关数据进行编码,得到第一编码特征,并基于所述静态光流和所述整体光流进行编码,得到第二编码特征;基于所述第一编码特征和所述第二编码特征,预测得到所述分析结果。
- 根据权利要求1至3任一项所述的方法,其中,所述参考数据还包括动态掩膜,所述动态掩膜用于指示所述图像中的运动对象,所述分析结果还包括置信度图和所述动态掩膜的掩膜校准数据,所述置信度图包括所述图像中各像素点的置信度;所述基于所述静态光流和所述光流校准数据,对所述位姿和所述深度进行优化,得到更新的位姿和更新的深度,包括:基于所述动态掩膜、所述掩膜校准数据和所述置信度图进行融合,得到重要度图,并基于所述光流校准数据对第一投影位置进行校准,得到校准位置;其中,所述重要度图包括所述图像中各像素点的重要度,所述第一投影位置为所述第一图像中像素点基于所述静态光流投影在所述第二图像的像素位置;基于所述校准位置和所述重要度图,优化得到所述更新的位姿和所述更新的深度。
- 根据权利要求4所述的方法,其中,所述光流校准数据包括所述第一图像中像素点的校准光流,所述基于所述光流校准数据对第一投影位置进行校准,得到校准位置,包括:将所述第一图像中像素点的校准光流加上所述像素点在所述第二图像中的第一投影位置,得到所述像素点的校准位置。
- 根据权利要求4所述的方法,其中,所述基于所述动态掩膜、所述掩膜校准数据和所述置信度图进行融合,得到重要度图,包括:基于所述掩膜校准数据对所述动态掩膜进行校准,得到校准掩膜;其中,所述校准掩膜包括所述图像中像素点与所述运动对象的相关度,且所述相关度与所述图像中像素点属于所述运动对象的可能性正相关;基于所述置信度图和所述校准掩膜进行融合,得到所述重要度图。
- 根据权利要求1至6任一项所述的方法,其中,所述分析结果还包括动态光流,所述动态光流由所述拍摄对象运动引起;在所述基于所述静态光流和所述光流校准数据,对所述位姿和所述深度进行优化,得到更新的位姿和更新的深度之后,所述方法还包括:基于所述更新的位姿和所述更新的深度,获取更新的静态光流,并基于所述动态光流和所述更新的静态光流,得到更新的整体光流;基于所述更新的静态光流和所述更新的整体光流,得到更新的光流数据,并基于所述更新的位姿和更新的深度,得到更新的参考数据;重新执行所述基于所述图像序列和所述光流数据,预测得到分析结果的步骤以及后续步骤。
- 根据权利要求7所述的方法,其中,所述基于所述更新的位姿和所述更新的深度,获取更新 的静态光流,包括:基于所述更新的位姿、所述更新的深度和所述第一图像中像素点的像素位置进行投影,得到所述第一图像中像素点投影在所述第二图像的第二投影位置;基于所述第一图像中像素点投影在所述第二图像的第二投影位置和所述第一图像中像素点在所述第二图像中的对应位置之间的差异,得到所述更新的静态光流;其中,所述对应位置为在摄像器件未运动的情况下,所述第一图像中像素点所属的空间点投影在所述第二图像的像素位置。
- 根据权利要求7所述的方法,其中,所述基于所述动态光流和所述更新的静态光流,得到更新的整体光流,包括:将所述动态光流和所述更新的静态光流相加,得到所述更新的整体光流。
- 一种图像分析模型的训练方法,包括:获取样本图像序列、样本光流数据和所述样本图像序列中各个样本图像的样本参考数据;其中,所述各个样本图像包括具有共视关系的第一样本图像和第二样本图像,所述样本光流数据包括所述第一样本图像与所述第二样本图像之间的样本静态光流和样本整体光流,所述样本静态光流由摄像器件运动引起,所述样本整体光流由摄像器件运动和拍摄对象运动共同引起,且所述样本参考数据包括样本位姿和样本深度;基于所述图像分析模型对所述样本图像序列和所述样本光流数据进行分析预测,得到样本分析结果;其中,所述样本分析结果包括所述样本静态光流的样本光流校准数据;基于所述样本静态光流和所述样本光流校准数据,对所述样本位姿和所述样本深度进行优化,得到更新的样本位姿和更新的样本深度;基于所述更新的样本位姿和所述更新的样本深度进行损失度量,得到所述图像分析模型的预测损失;基于所述预测损失,调整所述图像分析模型的网络参数。
- 根据权利要求10所述的方法,其中,所述样本参考数据还包括样本动态掩膜,所述样本动态掩膜用于指示所述样本图像中的运动对象,所述样本分析结果还包括样本动态光流和所述样本动态掩膜的样本掩膜校准数据,且所述样本动态光流由拍摄对象运动引起,所述预测损失包括掩膜预测损失;在所述基于所述样本静态光流和所述样本光流校准数据,对所述样本位姿和所述样本深度进行优化,得到更新的样本位姿和更新的样本深度之后,所述方法还包括:基于所述样本动态光流、所述更新的样本位姿和所述更新的样本深度,得到更新的样本整体光流;所述基于所述更新的样本位姿和所述更新的样本深度进行损失度量,得到所述图像分析模型的预测损失,包括:基于所述样本掩膜校准数据和所述样本动态掩膜,得到所述样本动态掩膜在模型维度更新得到的第一预测掩膜,并基于所述更新的样本整体光流、所述更新的样本位姿和所述更新的样本深度,得到所述样本动态掩膜在光流维度更新得到的第二预测掩膜;基于所述第一预测掩膜和所述第二预测掩膜之间的差异,得到所述掩膜预测损失。
- 根据权利要求11所述的方法,其中,所述基于所述更新的样本整体光流、所述更新的样本位姿和所述更新的样本深度,得到所述样本动态掩膜在光流维度更新得到的第二预测掩膜,包括:基于所述更新的样本位姿、所述更新的样本深度和所述第一样本图像中样本像素点的样本像素位置进行投影,得到所述第一样本图像中样本像素点投影在所述第二样本图像的第一样本投影位置;以及,基于所述更新的样本整体光流和所述第一样本图像中样本像素点的样本像素位置进行投影,得到所述第一样本图像中样本像素点投影在所述第二样本图像的第二样本投影位置;基于所述第一样本投影位置和所述第二样本投影位置之间的差异,得到所述第二预测掩膜。
- 根据权利要求12所述的方法,其中,所述基于所述第一样本投影位置和所述第二样本投影位置之间的差异,得到所述第二预测掩膜,包括:基于所述第一样本投影位置与所述第二样本投影位置之间的距离对比预设阈值,得到所述样本像素点的样本掩膜值;其中,所述样本掩膜值用于表示所述样本像素点是否属于所述运动对象;基于各个所述样本像素点的样本掩膜值,得到所述第二预测掩膜。
- 根据权利要求10所述的方法,其中,所述样本参考数据还包括样本动态掩膜,所述样本动态掩膜用于指示所述样本图像中的运动对象,且所述预测损失包括几何光度损失;在所述基于所述更新的样本位姿和所述更新的样本深度进行损失度量,得到所述图像分析模型的预测损失之前,所述方法还包括:基于各个与所述第一样本图像具有所述共视关系的第二样本图像的样本动态掩膜进行融合,得到样本融合掩膜;所述基于所述更新的样本位姿和所述更新的样本深度进行损失度量,得到所述图像分析模型的预测损失,包括:基于所述更新的样本位姿、所述更新的样本深度和所述第一样本图像中样本像素点的样本像素位置进行投影,得到所述第一样本图像中样本像素点投影在所述第二样本图像的第一样本投影位置;基于所述第一样本图像中样本像素点的样本像素位置,得到所述第一样本图像中样本像素点的第一样本像素值,并基于所述第一样本图像中样本像素点的第一样本投影位置,得到所述第一样本图像中样本像素点的第二样本像素值,以及基于所述样本融合掩膜,得到所述第一样本图像中样本像素点的融合掩膜值;基于所述第一样本像素值、所述第二样本像素值和所述融合掩膜值,得到所述几何光度损失。
- 根据权利要求14所述的方法,其中,所述基于所述第一样本像素值、所述第二样本像素值和所述融合掩膜值,得到所述几何光度损失,包括:获取所述第一样本像素值和所述第二样本像素值之间的像素差值;利用所述融合掩膜值对所述像素差值进行加权,得到加权差值;基于各个所述样本像素点的加权差值,得到所述几何光度损失。
- 根据权利要求15所述的方法,其中,所述获取所述第一样本像素值和所述第二样本像素值之间的像素差值,包括:基于结构相似性度量所述第一样本像素值和所述第二样本像素值,得到第一差值,并基于绝对值偏差度量所述第一样本像素值和所述第二样本像素值,得到第二差值;基于所述第一差值和所述第二差值进行加权,得到所述像素差值。
- 一种图像分析装置,包括:获取部分,被配置为获取图像序列、光流数据和所述图像序列中各个图像的参考数据;其中,所述各个图像包括具有共视关系的第一图像和第二图像,所述光流数据包括所述第一图像与所述第二图像之间的静态光流和整体光流,所述静态光流由摄像器件运动引起,所述整体光流由摄像器件运动和拍摄对象运动共同引起,且所述参考数据包括位姿和深度;分析部分,被配置为基于所述图像序列和所述光流数据,预测得到分析结果;其中,所述分析结果包括所述静态光流的光流校准数据;优化部分,被配置为基于所述静态光流和所述光流校准数据,对所述位姿和所述深度进行优化,得到更新的位姿和更新的深度。
- 一种图像分析模型的训练装置,包括:样本获取部分,被配置为获取样本图像序列、样本光流数据和所述样本图像序列中各个样本图像的样本参考数据;其中,所述各个样本图像包括具有共视关系的第一样本图像和第二样本图像,所述样本光流数据包括所述第一样本图像与所述第二样本图像之间的样本静态光流和样本整体光流,所述样本静态光流由摄像器件运动引起,所述样本整体光流由摄像器件运动和拍摄对象运动共同引起,且所述样本参考数据包括样本位姿和样本深度;样本分析部分,被配置为基于所述图像分析模型对所述样本图像序列和所述样本光流数据进行分析预测,得到样本分析结果;其中,所述样本分析结果包括所述样本静态光流的样本光流校准数据;样本优化部分,被配置为基于所述样本静态光流和所述样本光流校准数据,对所述样本位姿和所述样本深度进行优化,得到更新的样本位姿和更新的样本深度;损失度量部分,被配置为基于所述更新的样本位姿和所述更新的样本深度进行损失度量,得到所述图像分析模型的预测损失;参数调整部分,被配置为基于所述预测损失,调整所述图像分析模型的网络参数。
- 一种电子设备,包括相互耦接的存储器和处理器,所述处理器用于执行所述存储器中存储的程序指令,以实现权利要求1至9任一项所述的图像分析方法,或实现权利要求10至16任一项所述的图像分析模型的训练方法。
- 一种计算机可读存储介质,其上存储有程序指令,所述程序指令被处理器执行时实现权利要求1至9任一项所述的图像分析方法,或实现权利要求10至16任一项所述的图像分析模型的训练方法。
- 一种计算机程序,所述计算机程序包括计算机可读代码,在所述计算机可读代码在电子设备中运行的情况下,所述电子设备的处理器执行用于实现权利要求1至9任一项所述的图像分析方法,或实现权利要求10至16任一项所述的图像分析模型的训练方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210307855.3A CN114612545A (zh) | 2022-03-25 | 2022-03-25 | 图像分析方法及相关模型的训练方法、装置、设备和介质 |
| CN202210307855.3 | 2022-03-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023178951A1 true WO2023178951A1 (zh) | 2023-09-28 |
Family
ID=81867129
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/119646 Ceased WO2023178951A1 (zh) | 2022-03-25 | 2022-09-19 | 图像分析方法、模型的训练方法、装置、设备、介质及程序 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN114612545A (zh) |
| WO (1) | WO2023178951A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118709520A (zh) * | 2024-05-27 | 2024-09-27 | 同济大学 | 面向自动驾驶决策算法的安全关键场景生成系统和方法 |
| CN119251746A (zh) * | 2024-12-05 | 2025-01-03 | 浙江大华技术股份有限公司 | 目标的属性识别方法、计算机设备及存储介质 |
| CN120602799A (zh) * | 2025-08-05 | 2025-09-05 | 浙江蓝影智能技术有限公司 | 一种基于光流引导的前景掩码下相机运动估计方法及系统 |
| CN120894832A (zh) * | 2025-09-26 | 2025-11-04 | 成都格理特电子技术有限公司 | 一种基于行为趋势预测的设备动态避障方法和系统、设备、介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12293535B2 (en) * | 2021-08-03 | 2025-05-06 | Intrinsic Innovation Llc | Systems and methods for training pose estimators in computer vision |
| CN114612545A (zh) * | 2022-03-25 | 2022-06-10 | 浙江商汤科技开发有限公司 | 图像分析方法及相关模型的训练方法、装置、设备和介质 |
| CN118135256A (zh) * | 2023-10-24 | 2024-06-04 | 西北工业大学 | 一种基于边缘引导的从粗到细的异源图像匹配方法 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111311664A (zh) * | 2020-03-03 | 2020-06-19 | 上海交通大学 | 一种深度、位姿与场景流的联合无监督估计方法及系统 |
| US20200211206A1 (en) * | 2018-12-27 | 2020-07-02 | Baidu Usa Llc | Joint learning of geometry and motion with three-dimensional holistic understanding |
| CN111783582A (zh) * | 2020-06-22 | 2020-10-16 | 东南大学 | 一种基于深度学习的无监督单目深度估计算法 |
| CN111797688A (zh) * | 2020-06-02 | 2020-10-20 | 武汉大学 | 一种基于光流和语义分割的视觉slam方法 |
| CN112686952A (zh) * | 2020-12-10 | 2021-04-20 | 中国科学院深圳先进技术研究院 | 一种图像光流计算系统、方法及应用 |
| CN112884813A (zh) * | 2021-02-18 | 2021-06-01 | 北京小米松果电子有限公司 | 图像处理方法、装置及存储介质 |
| CN114612545A (zh) * | 2022-03-25 | 2022-06-10 | 浙江商汤科技开发有限公司 | 图像分析方法及相关模型的训练方法、装置、设备和介质 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110910447B (zh) * | 2019-10-31 | 2023-06-06 | 北京工业大学 | 一种基于动静态场景分离的视觉里程计方法 |
| CN111127522B (zh) * | 2019-12-30 | 2024-02-06 | 亮风台(上海)信息科技有限公司 | 基于单目相机的深度光流预测方法、装置、设备及介质 |
| CN113902802A (zh) * | 2021-09-29 | 2022-01-07 | 浙江商汤科技开发有限公司 | 视觉定位方法及相关装置、电子设备和存储介质 |
-
2022
- 2022-03-25 CN CN202210307855.3A patent/CN114612545A/zh not_active Withdrawn
- 2022-09-19 WO PCT/CN2022/119646 patent/WO2023178951A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200211206A1 (en) * | 2018-12-27 | 2020-07-02 | Baidu Usa Llc | Joint learning of geometry and motion with three-dimensional holistic understanding |
| CN111311664A (zh) * | 2020-03-03 | 2020-06-19 | 上海交通大学 | 一种深度、位姿与场景流的联合无监督估计方法及系统 |
| CN111797688A (zh) * | 2020-06-02 | 2020-10-20 | 武汉大学 | 一种基于光流和语义分割的视觉slam方法 |
| CN111783582A (zh) * | 2020-06-22 | 2020-10-16 | 东南大学 | 一种基于深度学习的无监督单目深度估计算法 |
| CN112686952A (zh) * | 2020-12-10 | 2021-04-20 | 中国科学院深圳先进技术研究院 | 一种图像光流计算系统、方法及应用 |
| CN112884813A (zh) * | 2021-02-18 | 2021-06-01 | 北京小米松果电子有限公司 | 图像处理方法、装置及存储介质 |
| CN114612545A (zh) * | 2022-03-25 | 2022-06-10 | 浙江商汤科技开发有限公司 | 图像分析方法及相关模型的训练方法、装置、设备和介质 |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118709520A (zh) * | 2024-05-27 | 2024-09-27 | 同济大学 | 面向自动驾驶决策算法的安全关键场景生成系统和方法 |
| CN119251746A (zh) * | 2024-12-05 | 2025-01-03 | 浙江大华技术股份有限公司 | 目标的属性识别方法、计算机设备及存储介质 |
| CN120602799A (zh) * | 2025-08-05 | 2025-09-05 | 浙江蓝影智能技术有限公司 | 一种基于光流引导的前景掩码下相机运动估计方法及系统 |
| CN120894832A (zh) * | 2025-09-26 | 2025-11-04 | 成都格理特电子技术有限公司 | 一种基于行为趋势预测的设备动态避障方法和系统、设备、介质 |
| CN120894832B (zh) * | 2025-09-26 | 2025-12-23 | 成都格理特电子技术有限公司 | 一种基于行为趋势预测的设备动态避障方法和系统、设备、介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114612545A (zh) | 2022-06-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Dai et al. | RGB-D SLAM in dynamic environments using point correlations | |
| Labbé et al. | Single-view robot pose and joint angle estimation via render & compare | |
| JP7009399B2 (ja) | ビデオデータの中のオブジェクトの検出 | |
| Walch et al. | Image-based localization using lstms for structured feature correlation | |
| Boniardi et al. | Robot localization in floor plans using a room layout edge extraction network | |
| CN114612545A (zh) | 图像分析方法及相关模型的训练方法、装置、设备和介质 | |
| CN107980150B (zh) | 对三维空间建模 | |
| US20130335528A1 (en) | Imaging device capable of producing three dimensional representations and methods of use | |
| CN113407027B (zh) | 位姿获取方法及装置和电子设备、存储介质 | |
| US12482122B2 (en) | Self-supervised image depth estimation method based on channel self-attention mechanism | |
| CN113570713B (zh) | 一种面向动态环境的语义地图构建方法及装置 | |
| CN112767546B (zh) | 移动机器人基于双目图像的视觉地图生成方法 | |
| Košecka | Detecting changes in images of street scenes | |
| CN111105439A (zh) | 一种使用残差注意力机制网络的同步定位与建图方法 | |
| Chen et al. | StateNet: Deep state learning for robust feature matching of remote sensing images | |
| CN110070578B (zh) | 一种回环检测方法 | |
| Zhang et al. | YGC-SLAM: A visual SLAM based on improved YOLOv5 and geometric constraints for dynamic indoor environments | |
| Jain et al. | Learning robust multi-scale representation for neural radiance fields from unposed images | |
| CN114943747A (zh) | 图像分析方法及其装置、视频编辑方法及其装置、介质 | |
| Lee et al. | Robust uncertainty-aware multiview triangulation | |
| CN116580066A (zh) | 一种低帧率场景下的行人目标跟踪方法及可读存储介质 | |
| Zins et al. | Level set-based camera pose estimation from multiple 2D/3D ellipse-ellipsoid correspondences | |
| Li et al. | Centroid-based graph matching networks for planar object tracking: K. Li et al. | |
| Zhang et al. | Hand-held monocular SLAM based on line segments | |
| Chen et al. | An End‐to‐End Robotic Visual Localization Algorithm Based on Deep Learning |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22933003 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22933003 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22933003 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.03.2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22933003 Country of ref document: EP Kind code of ref document: A1 |