EP4379660A1 - Depth estimation method, method for training depth estimation model, and apparatus and system thereof - Google Patents

Depth estimation method, method for training depth estimation model, and apparatus and system thereof Download PDF

Info

Publication number
EP4379660A1
EP4379660A1 EP22874624.4A EP22874624A EP4379660A1 EP 4379660 A1 EP4379660 A1 EP 4379660A1 EP 22874624 A EP22874624 A EP 22874624A EP 4379660 A1 EP4379660 A1 EP 4379660A1
Authority
EP
European Patent Office
Prior art keywords
depth
image
color image
estimation model
depth estimation
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.)
Granted
Application number
EP22874624.4A
Other languages
German (de)
French (fr)
Other versions
EP4379660A4 (en
EP4379660B1 (en
Inventor
Qi Cao
Di Zhang
Shuzhan BI
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yinwang Intelligenttechnologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of EP4379660A1 publication Critical patent/EP4379660A1/en
Publication of EP4379660A4 publication Critical patent/EP4379660A4/en
Application granted granted Critical
Publication of EP4379660B1 publication Critical patent/EP4379660B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/088Non-supervised learning, e.g. competitive learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/098Distributed learning, e.g. federated learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/564Depth or shape recovery from multiple images from contours
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle

Definitions

  • This application relates to the field of artificial intelligence, and more specifically, to a depth estimation method and apparatus, a method and an apparatus for training a depth estimation model, and a system.
  • an unsupervised depth estimation algorithm is one of main algorithms of intelligent driving (intelligent driving, ID) and artificial intelligence (artificial intelligence, AI).
  • ID intelligent driving
  • AI artificial intelligence
  • the algorithm can estimate, by using a neural network model, depth information of an image shot by a color camera, and is widely used because the algorithm does not need tolabel a training set.
  • the current unsupervised depth estimation algorithm does not make full use of prior information of color images, resulting in poor quality of a depth estimation image.
  • the current unsupervised depth estimation algorithm eliminates a limitation on a training label to some extent, and limits training costs, once an algorithm model is deployed, the quality of the depth estimation image is also poor when a scenario that is not encountered in a training phase is encountered.
  • This application provides a depth estimation method and apparatus, a method and an apparatus for training a depth estimation model, and a system, to help improve quality of a depth estimation image.
  • a depth estimation method including: obtaining a first color image; inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image; and inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, where the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image.
  • the intermediate depth image corresponding to the color image is obtained based on the color image
  • the target depth image corresponding to the color image is obtained based on the color image and the intermediate depth image corresponding to the color image.
  • the inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image includes: obtaining a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtaining the first target depth image based on the common edge image and the first intermediate depth image.
  • the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image
  • the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image.
  • the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • the inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image includes: obtaining a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtaining a first target feature vector based on the first depth feature vector and a first weight value, and obtaining a second target feature vector based on the second depth feature vector and a second weight value; and obtaining the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • the color image includes a left view or a right view.
  • the color image is shot by one or more cameras disposed on a terminal device.
  • the camera is a binocular camera.
  • the method further includes: calculating gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image; and sending the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the gradient information is sent to the first device, and used by the first device to train and update a depth estimation model. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • the method further includes: receiving the updated first depth estimation model and the updated second depth estimation model from the first device.
  • the method further includes: obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the depth estimation model is trained and updated based on the gradient information. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • a training method for a depth estimation model including: processing a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image; processing the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image; training the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model; and training the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • the first depth estimation model is obtained through training by using a color image
  • the second depth estimation model is obtained through training by using the color image and an intermediate depth image corresponding to the color image.
  • the depth estimation model obtained through training can fully use prior information, namely, the color image, to help improve precision of a target depth estimation image.
  • the updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • the updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • the color image includes a left view or a right view.
  • the color image is shot by one or more cameras disposed on a terminal device.
  • the camera is a binocular camera.
  • the training method further includes: receiving gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image; and obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the first device may train and update the depth estimation model based on the gradient information calculated by the terminal device based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • the training method further includes: sending the updated first depth estimation model and the updated second depth estimation model.
  • a depth estimation apparatus including: an obtaining unit, configured to obtain a first color image; and a processing unit, configured to: input the first color image into a first depth estimation model, to obtain a first intermediate depth image; and input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, where the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image.
  • the processing unit is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • the processing unit is specifically configured to: splice the first color image and the first intermediate depth image, to obtain an input matrix; perform dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtain the common edge image based on the first matrix and the second matrix.
  • the processing unit is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • the color image includes a left view or a right view.
  • the color image is shot by one or more cameras disposed on a terminal device.
  • the camera is a binocular camera.
  • the processing unit is further configured to calculate gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image.
  • the apparatus further includes a sending unit.
  • the sending unit is configured to send the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • the obtaining unit is further configured to receive the updated first depth estimation model and the updated second depth estimation model from the first device.
  • an apparatus for training a depth estimation model including: an obtaining unit, configured to: process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image; and a training unit, configured to: train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model, and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • the updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • the training unit is specifically configured to: splice the first color image and the first intermediate depth image, to obtain an input matrix; perform dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtain the common edge image based on the first matrix and the second matrix.
  • the updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • a color image includes a left view or a right view.
  • the color image is shot by one or more cameras disposed on a terminal device.
  • the camera is a binocular camera.
  • the obtaining unit is further configured to receive gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image.
  • the training unit is further configured to obtain the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the training apparatus further includes a sending unit, where the sending unit is configured to send the updated first depth estimation model and the updated second depth estimation model.
  • a depth estimation apparatus includes a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the method in any implementation of the first aspect.
  • the apparatus may be disposed in various devices or systems that require depth estimation, such as a vehicle-mounted terminal, a mobile terminal, a high definition map system, and an intelligent transportation system.
  • the apparatus may alternatively be a chip.
  • an apparatus for training a depth estimation model includes a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the training method in any implementation of the second aspect.
  • the training apparatus may be a device that can perform model training, for example, a host, a computer, a server, or a cloud device.
  • the training apparatus may alternatively be a chip.
  • a computer-readable medium stores program code to be executed by a device, and the program code is used for performing the method in any one of the implementations of the first aspect or the second aspect.
  • a computer program product including instructions is provided.
  • the computer program product runs on a computer, the computer is enabled to perform the method in any one of the implementations of the first aspect or the second aspect.
  • the first storage medium may be encapsulated together with a processor, or may be encapsulated separately from a processor. This is not specifically limited in this embodiment of this application.
  • a chip includes a processor and a data interface.
  • the processor performs the method in any one of the implementations of the first aspect or the second aspect by reading, through the data interface, instructions stored in a memory.
  • the chip may further include the memory.
  • the memory stores the instructions
  • the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to perform the method according to any one of the implementations of the first aspect.
  • Embodiments of this application relate to a neural network. To better understand a method in embodiments of this application, the following first describes terms and concepts related to the neural network.
  • Neural network neural network, NN
  • the neural network may include a neuron.
  • the neuron may be an operation unit that uses x s and an intercept 1 as an input.
  • the f is an activation function (activation function) of the neuron, and the activation function is used to perform non-linear transformation on a feature of the neural network, to convert an input signal in the neuron into an output signal.
  • the output signal of the activation function may be used as an input of a next convolutional layer, and the activation function may be a sigmoid function.
  • the neural network is a network constituted by linking a plurality of single neurons together. To be specific, an output of one neuron may be an input of another neuron. An input of each neuron may be connected to a local receptive field of a previous layer to extract a feature of the local receptive field.
  • the local receptive field may be a region including several neurons.
  • a deep neural network also referred to as a multi-layer neural network, may be understood as a neural network including a plurality of hidden layers.
  • the DNN is divided based on locations of different layers, so that the neural network in the DNN may be classified into three types: an input layer, a hidden layer, and an output layer.
  • the first layer is the input layer
  • the last layer is the output layer
  • the middle layer is the hidden layer.
  • the layers are fully connected, that is, each neuron at an i th layer is connected to a neuron at an (i+1) th layer.
  • the coefficient W is used as an example. It is assumed that in a three-layer DNN, a linear coefficient from a 4 th neuron at a second layer to a 2 nd neuron at a third layer is defined as W 24 3 .
  • the superscript 3 represents a quantity of layers at which the coefficient W is located, and the subscript corresponds to an output third-layer index 2 and an input second-layer index 4.
  • a coefficient from a k th neuron at an (L-1) th layer to a j th neuron at an L th layer is defined as W jk L .
  • the input layer has no weight W.
  • more hidden layers make the network more capable of describing a complex case in the real world.
  • a model with more weights has higher complexity and a larger "capacity”. It indicates that the model can complete a more complex learning task.
  • Training the deep neural network is a process of learning a weight, and a final objective of the training is to obtain weights (for example, a weight matrix including coefficients W of a plurality of layers) of all layers of the trained deep neural network.
  • a convolutional neural network is a deep neural network of a convolutional structure.
  • the convolutional neural network includes a feature extractor that includes a convolutional layer and a subsampling layer, and the feature extractor may be considered as a filter.
  • the convolutional layer is a neuron layer that is in the convolutional neural network and at which convolution processing is performed on an input signal. At the convolutional layer of the convolutional neural network, one neuron may be connected only to some adjacent-layer neurons.
  • One convolutional layer usually includes several feature planes, and each feature plane may include some neural units that are in a rectangular arrangement. Neural units in a same feature plane share a weight, and the weight shared herein is a convolution kernel.
  • Weight sharing may be understood as that an image information extraction manner is irrelevant to a location.
  • the convolution kernel may be initialized in a form of a random-size matrix. In a process of training the convolutional neural network, the convolution kernel may obtain an appropriate weight through learning.
  • benefits directly brought by weight sharing are that connections between layers of the convolutional neural network are reduced, and an overfitting risk is reduced.
  • a predicted value of a current network and a target value that is actually expected may be compared, and then a weight of each layer of the neural network is updated based on a difference between the predicted value and the target value (certainly, there is usually an initialization process before the first update, to be specific, weights are preconfigured for all layers of the deep neural network). For example, if the predicted value of the network is large, the weight vector is adjusted to decrease the predicted value, and adjustment is continuously performed, until the deep neural network can predict the target value that is actually expected or a value that is very close to the target value that is actually expected.
  • a difference between the predicted value and the target value is predefined.
  • This is a loss function or an objective function (objective function).
  • the loss function and the objective function are important equations that measure the difference between the predicted value and the target value.
  • the loss function is used as an example. A higher output value (loss) of the loss function indicates a larger difference. Therefore, training of the deep neural network is a process of minimizing the loss as much as possible.
  • a neural network may use an error back propagation algorithm to correct a value of a weight in an initial neural network model in a training process, so that a reconstruction error loss of the neural network model becomes smaller. Specifically, an input signal is forward transferred until the error loss is generated in an output, and the weight of the initial neural network model is updated through back propagation of information about the error loss, to converge the error loss.
  • the back propagation algorithm is an error-loss-centered back propagation motion intended to obtain a weight, such as a weight matrix, of an optimal neural network model.
  • a depth estimation model is usually obtained through training by using color image data.
  • use of a common edge part of a color image and a depth image is ignored. Consequently, quality of a depth estimation image obtained by using the depth estimation model is poor.
  • the current unsupervised depth estimation algorithm eliminates a limitation on a training label to some extent, and limits training costs
  • the quality of the depth estimation image is also poor when a scenario that is not encountered in a training phase is encountered.
  • a depth estimation model used for depth estimation includes a common edge extraction module that can extract a common edge of a color image and a depth image. Therefore, the depth estimation model can use prior information of the color image to improve estimation precision of the depth image.
  • a federated learning method is combined with an unsupervised learning method, so that an algorithm model is periodically updated after being deployed, and quality of the depth image output by the model is further improved.
  • the solutions in embodiments of this application can be applied to various depth estimation use scenarios such as image recognition, image processing, a high definition map, intelligent driving, intelligent transportation, and autonomous driving.
  • FIG. 1 is a schematic diagram of a main artificial intelligence framework according to an embodiment of this application.
  • the main framework describes an overall working procedure of an artificial intelligence system, and is applicable to a general requirement of the field of artificial intelligence.
  • an "intelligent information chain” (a horizontal axis) and an “information technology (information technology, IT) value chain” (a vertical axis).
  • the "intelligent information chain” reflects a series of processes from data obtaining to processing.
  • the process may be a general process of intelligent information perception, intelligent information representation and formation, intelligent inference, intelligent decision making, and intelligent execution and output.
  • the data undergoes a refinement process of "data-information-knowledge-intelligence".
  • the infrastructure provides computing capability support for the artificial intelligence system, implements communication with the external world, and implements support by using a basic platform.
  • the infrastructure can communicate with the outside by using a sensor, and a calculation capability of the infrastructure can be provided by an intelligent chip.
  • the intelligent chip herein may be a hardware acceleration chip, for example, a central processing unit (central processing unit, CPU), a neural-network processing unit (neural-network processing unit, NPU), a graphics processing unit (graphics processing unit, GPU), an application-specific integrated circuit (application-specific integrated circuit, ASIC), or a field programmable gate array (field programmable gate array, FPGA).
  • CPU central processing unit
  • NPU neural-network processing unit
  • NPU graphics processing unit
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the basic platform of the infrastructure may include related platforms assurance and support such as a distributed computing framework and a network, and may include cloud storage and computing, an interconnection and interworking network, and the like.
  • the infrastructure can communicate with the outside by using the sensor, to obtain data. Then, the data is provided to an intelligent chip in a distributed computing system provided by the basic platform, for computing.
  • Data at an upper layer of the infrastructure indicates a data source in the artificial intelligence field.
  • the data relates to at least one of a graph, an image, a voice, a text, and the like.
  • the data is different in different application fields, and may have different representation forms.
  • content of the data is related to a specific internet of things connection terminal, for example, may include sensing data like a force, a displacement, a liquid level, a temperature, or humidity.
  • the data is, for example, a color image.
  • the foregoing data processing usually includes a processing manner such as data training, machine learning, deep learning, search, inference, or decision-making.
  • Machine learning and deep learning may mean performing symbolic and formal intelligent information modeling, extraction, preprocessing, training, and the like on data.
  • Inference is a process in which human intelligent inference is simulated in a computer or an intelligent system, and machine thinking and problem resolving are performed by using formal information according to an inference control policy.
  • a typical function is searching and matching.
  • Decision-making is a process of making a decision after intelligent information is inferred, and usually provides functions such as classification, ranking, and prediction.
  • a data processing result for example, an algorithm or a general system, such as translation, text analysis, computer vision processing, voice recognition, and image recognition.
  • the intelligent product and industry application are a product and an application of the artificial intelligence system in various fields, and are package of an overall solution of the artificial intelligence, so that decision-making for intelligent information is productized and an application is implemented.
  • Application fields mainly include intelligent manufacturing, intelligent transportation, intelligent home, intelligent healthcare, intelligent security protection, autonomous driving, a safe city, an intelligent terminal, or the like.
  • FIG. 2 shows a specific application scenario of an example of a depth estimation method according to an embodiment of this application.
  • a vehicle 220 and a cloud service system 210 may be included, and the vehicle 220 and the cloud service system 210 may communicate with each other through a network.
  • the computing platform 221 may include at least one processor 222.
  • the processor 222 may execute instructions 224 stored in a non-transitory computer-readable medium such as a memory 223.
  • the computing platform 221 may alternatively be a plurality of computing devices that control individual components or subsystems of the vehicle 220 in a distributed manner.
  • the processor 222 may be any conventional processor, such as a central processing unit (central processing unit, CPU).
  • the processor 222 may further include an image processor (graphic process unit, GPU), a field programmable gate array (field programmable gate array, FPGA), a system on chip (system on chip, SOC), an application-specific integrated circuit (application-specific integrated circuit, ASIC) or a combination thereof.
  • the memory 223 may further store data, for example, road map and path information; a position, a direction, a velocity, and other vehicle data of a vehicle; and other information. Such information may be used by the vehicle 220 and the computing platform 221 during operation of the vehicle 220 in autonomous, semi-autonomous, and/or manual modes.
  • the vehicle 220 may include one or more different types of transportation, or may include one or more different types of transportation tools or movable objects that operate or move on land (for example, a highway, a road, or a railway), water surface (for example, a waterway, a river, or an ocean), or in space.
  • the vehicle may include a car, a bicycle, a motorcycle, a train, a subway, an airplane, a ship, an aircraft, a robot, another type of transportation tool or a movable object, or the like. This is not limited in embodiments of this application.
  • the application scenario shown in FIG. 2 may further include a cloud server.
  • the cloud server may perform perception fusion and computational inference based on the gradient information uploaded by the vehicle and other information (for example, information about another vehicle and road condition information) in the cloud server, to train and update a network gradient, so as to improve accuracy of the depth estimation model.
  • the cloud server may alternatively be implemented by using a virtual machine.
  • Embodiments of this application may be further applied to many fields of artificial intelligence, for example, image recognition, image processing, high definition map, intelligent driving, intelligent transportation, and autonomous driving.
  • embodiments of this application are applied to a branch part that is in these artificial intelligence fields and that requires depth estimation.
  • a branch part that is in these artificial intelligence fields and that requires depth estimation.
  • the high definition map field richer information may be obtained through depth estimation, so that map information with higher accuracy can be provided.
  • a road condition faced by the vehicle may be further determined through depth estimation, so that a driver can be assisted in performing a correct driving operation based on an actual situation.
  • road condition information may be obtained after depth estimation is performed on an input color image, to assist a driver in making a correct decision.
  • current road condition information may be obtained, for example, traffic light information, information about another vehicle, pedestrian information, and the like.
  • the road condition information is input into a driving decision-making module.
  • the driving decision-making module further determines an operation to be performed. For example, when the current traffic light information is a red light, the driving decision-making module sends stop indication information. Further, in some products, the driving decision-making module may further perform an automatic braking operation.
  • the driving decision-making module when it is found in the current road condition information that there is a crosswalk in the front, the driving decision-making module sends deceleration indication information.
  • a depth estimation phase is used to improve safety of intelligent driving, and effectively prevent a driver from performing an incorrect operation because the driver neglects observation.
  • FIG. 4 is a schematic diagram of a system architecture according to an embodiment of this application.
  • the system architecture may be used to train a neural network model, for example, an image recognition model or a depth estimation model.
  • a data collection device 460 is configured to collect training data.
  • the training data when a first depth estimation model is trained, the training data may include a color image; and when a second depth estimation model is trained, the training data may include a color image and a first depth estimation image.
  • the data collection device 460 After collecting the training data, the data collection device 460 stores the training data in a database 430, and a training device 420 obtains a target model/rule 401 through training based on the training data maintained in the database 430.
  • A/B describes an association relationship for describing associated objects and represents that three relationships may exist. For example, A/B may represent the following three cases: Only A exists, both A and B exist, and only B exists.
  • the training device 420 processes an input original image, and compares an output image with the original image until a difference between the image output by the training device 420 and the original image is less than a specific threshold, to complete training of the target model/rule 401.
  • the depth estimation model in embodiments of this application may be obtained through training, that is, a trained basic neural network (namely, the second depth estimation model) is obtained, so that the first depth estimation model is obtained subsequently through further training by using the basic neural network.
  • the training device 420 processes the input color image and a first depth image until accuracy of a category output by the training device 420 is greater than or equal to a specific threshold, to complete training of the target model/rule 401.
  • the depth estimation model in embodiments of this application may be obtained through training, that is, the depth estimation model is obtained through further training based on the basic neural network.
  • the target model/rule 401 can be used to implement the method in embodiments of this application.
  • the target model/rule 401 in embodiments of this application may be specifically a neural network.
  • the training data maintained in the database 430 is not necessarily all collected by the data collection device 460, or may be received from another device.
  • the training device 420 does not necessarily train the target model/rule 401 completely based on the training data maintained in the database 430, or may obtain training data from a cloud or another place to perform model training.
  • the foregoing descriptions should not be construed as a limitation on embodiments of this application.
  • the target model/rule 401 obtained through training by the training device 420 may be applied to different systems or devices, for example, an execution device 410 shown in FIG. 4 .
  • the execution device 410 may be a terminal, for example, a mobile phone terminal, a tablet, a laptop computer, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) terminal, or a vehicle-mounted terminal, or may be a server, a cloud, or the like.
  • the execution device 410 configures an input/output (input/output, I/O) interface 412, configured to exchange data with an external device.
  • I/O input/output
  • a user may input data to the I/O interface 412 by using a client device 440, where the input data in this embodiment of this application may include a color image input by the client device.
  • a preprocessing module 413 and a preprocessing module 414 are configured to preprocess the input data (for example, the color image) received by the I/O interface 412.
  • the preprocessing module 413 and the preprocessing module 414 may not exist (or there may be only one preprocessing module), and a calculation module 411 is directly used to process the input data.
  • the execution device 410 may invoke data, code, and the like in a data storage system 450 for corresponding processing, and may further store, in the data storage system 450, data, instructions, and the like that are obtained through corresponding processing.
  • the I/O interface 412 returns a processing result to the client device 440, to provide the processing result for the user.
  • the training device 420 may generate corresponding target models/rules 401 for different targets or different tasks based on different training data.
  • the corresponding target models/rules 401 may be used to implement the foregoing targets or complete the foregoing tasks, to provide a required result for the user.
  • FIG. 5 is a schematic flowchart of an example of a depth estimation method according to this application.
  • the first color image is a left view or a right view.
  • the first color image may be shot by one or more cameras disposed on a second device.
  • the second device may be a vehicle, an airplane, a mobile phone, or another possible mobile device. This is not limited in this application.
  • the camera may be a binocular camera.
  • S520 Input the first color image into a first depth estimation model, to obtain a first intermediate depth image.
  • the first depth estimation model is obtained through training based on a color image and an intermediate depth image corresponding to the color image.
  • a relationship between the color image and the first color image is not limited.
  • the first color image may be one of the color images.
  • the first color image does not belong to any one of the foregoing color images, that is, the first color image is not data in a model training data set. As described in the background of this application, a scenario that does not occur in model training may be encountered in a model use process.
  • the inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image may include: obtaining a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtaining a first target feature vector based on the first depth feature vector and a first weight value, and obtaining a second target feature vector based on the second depth feature vector and a second weight value; and obtaining the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • S530 Input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image.
  • the second depth estimation model is obtained through training based on the color image and a target depth image corresponding to the color image.
  • the inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image may include: obtaining a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtaining the first target depth image based on the common edge image and the first intermediate depth image.
  • the obtaining a common edge image based on the first color image and the first intermediate depth image may include: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image
  • the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image.
  • the method further includes: calculating gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image; and sending the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • the method may further include: receiving the updated first depth estimation model and the updated second depth estimation model from the first device.
  • gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the gradient information is sent to the first device, and used by the first device to train and update a depth estimation model. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • the method further includes: obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the depth estimation model is trained and updated based on the gradient information. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • the intermediate depth image corresponding to the color image is obtained based on the color image
  • the target depth image corresponding to the color image is obtained based on the color image and the intermediate depth image corresponding to the color image.
  • FIG. 6 is an input and output diagram of an example of a depth estimation method according to this application.
  • a first color image 610 is used as an input and is input into a first depth estimation model, to obtain a first intermediate depth image 620, and the first intermediate depth image 620 and the first color image 610 are used as inputs and are input into a second depth estimation model, to obtain a first target depth image 630.
  • the first color image 610 is the first color image obtained in S510 in FIG. 5 .
  • the first color image 610 is a right view obtained through shooting by a binocular camera disposed on a vehicle.
  • the first color image 610 is input into the first depth estimation model, that is, S520 in FIG. 5 is performed, to obtain the first depth image 620.
  • the first depth estimation model is trained based on a color image and an intermediate depth image corresponding to the color image.
  • a structure of the first depth estimation model may be shown in FIG. 7 , and the first depth estimation model may include an encoder side and a decoder side.
  • the first depth estimation model may perform three downsampling operations on the first color image 610 on the encoder side, and perform three upsampling operations on the decoder side, to obtain the first intermediate depth image 620.
  • the first depth estimation model may extract a depth feature vector X n-1 from the first color image 610, and perform MSB processing on the depth feature vector X n-1 , to obtain a target feature vector X n .
  • the first color image is uniformly expressed as I in the formula, and quantities of MSBs in the formulas (11), (13), (15), and (17) are respectively 4, 5, 8, and 8.
  • a depth estimation image depth comse ⁇ H*W*1 that is, the first intermediate depth image, in the encoding and decoding phase is output by using a 3*3 convolution layer of channel 1.
  • a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • this application further provides a second depth estimation model, to further improve precision of the depth estimation image.
  • step S530 may be performed, that is, the first color image 610 and the first intermediate depth image 620 are processed by using the second depth estimation model, to obtain the first target depth image 630.
  • a specific process of obtaining the first target depth image 630 based on the first color image 610 and the first intermediate depth image 620 may be shown in FIG. 9 (the first color image is numbered 610 in FIG. 6 , and is numbered 910 in FIG. 9 ; the first intermediate depth image is numbered 620 in FIG. 6 , and is numbered 920 in FIG. 9 ; and the first target depth image is numbered 630 in FIG. 6 , and is numbered 930 in FIG. 9 ).
  • the input matrix inputEH*W*16 is separately input into a channel attention module (channel attention) and a spatial attention module (spatial attention) for processing, and according to formula (24) and formula (25):
  • attention _ c concat max pool input
  • avgpool input attention _ s ⁇ 1 * 1 concat relu bn ⁇ 3 * 3 relu bn ⁇ 1 * 1 input
  • relu bn ⁇ 5 * 5 relu bn ⁇ 1 * 1 input
  • depth refine depth corase * attention _ map a final refined depth image depth refine ⁇ H*W*1, that is, the first target depth image, is obtained based on the first intermediate depth image (depth corase ⁇ H*W*1) and the common edge image attention_mapEH*W*1.
  • the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image
  • the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image.
  • FIG. 10 is a schematic flowchart of an example of a method for training a depth estimation model according to this application.
  • S1010 Process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image.
  • the color image includes a left view or a right view.
  • the color image is shot by one or more cameras disposed on a terminal device.
  • the camera is a binocular camera.
  • S1020 Train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model; and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • the updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • the first depth estimation model is obtained through training by using a color image
  • the second depth estimation model is obtained through training by using the color image and an intermediate depth image corresponding to the color image.
  • the depth estimation model obtained through training can fully use prior information, namely, the color image, to help improve precision of a target depth estimation image.
  • the updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • a first device trains the first depth estimation model and the second depth estimation model, refer to the training method shown in FIG. 4 . Details are not described herein again.
  • the common edge image may be obtained based on the color image and the intermediate depth image corresponding to the color image
  • the target depth image may be obtained based on the common edge image and the intermediate depth image corresponding to the color image.
  • the method for training a depth estimation model further includes interaction between the first device and the terminal device.
  • the first device sends a trained depth estimation model to a second device (for example, the terminal device).
  • the second device may reversely calculate gradient information, and feed back the gradient information to the first device, so that the first device obtains an updated depth estimation model through training.
  • the second device calculates gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image.
  • the second device may encounter a large quantity of scenarios that do not exist in a training dataset.
  • the second device is a vehicle equipped with a computing power platform.
  • a binocular camera disposed in the vehicle may shoot a first color image that does not exist in the training dataset, and inference may be performed on the first color image by using the first depth estimation model and the second depth estimation model that are deployed on the computing power platform, to obtain the first target depth image.
  • the computing power platform may reversely calculate a network gradient, to obtain the gradient information.
  • the second device sends the gradient information of the first depth estimation model and the second depth estimation model to the first device, where the gradient information is used by the first device to train to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • the first device obtains the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the second device receives the updated first depth estimation model and the updated second depth estimation model from the first device.
  • the first device may obtain an updated depth estimation model through training based on gradient information calculated by the second device based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • the second device may perform S1150, to obtain the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • the second device may train and update the depth estimation model based on the gradient information calculated based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • each device includes a corresponding hardware structure and/or a corresponding software module for performing each function.
  • a person skilled in the art should be able to be aware that, in combination with the examples described in embodiments disclosed in this specification, units and algorithm steps can be implemented by hardware or a combination of hardware and computer software in this application. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
  • FIG. 12 is a schematic diagram of a structure of an example of a depth estimation apparatus according to this application.
  • the depth estimation apparatus 1200 shown in FIG. 12 includes an obtaining unit 1210, a processing unit 1220, and a transceiver unit 1230.
  • the obtaining unit 1210, the processing unit 1220, and the transceiver unit 1230 may be configured to perform the depth estimation method in embodiments of this application.
  • the processing unit 1220 can implement functions of the first depth estimation model and the second depth estimation model in FIG. 5 to FIG. 9 .
  • the obtaining unit 1210 is configured to obtain a first color image.
  • the processing unit 1220 is configured to: input the first color image into a first depth estimation model, to obtain a first intermediate depth image; and input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image.
  • the transceiver unit 1230 is configured to send gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • processing unit 1220 in the apparatus 1200 may be equivalent to a processor 1320 in an apparatus 1300 in the following descriptions.
  • FIG. 13 is a schematic diagram of a hardware structure of a depth estimation apparatus according to an embodiment of this application.
  • the depth estimation apparatus 1300 shown in FIG. 13 includes a memory 1310, a processor 1320, a communication interface 1330, and a bus 1340.
  • the memory 1310, the processor 1320, and the communication interface 1330 implement communication connection between each other through the bus 1340.
  • the communication interface may further implement communication with another device, for example, communication with a first device.
  • the memory 1310 may be a read-only memory (read only memory, ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM).
  • the memory 1310 may store a program. When the program stored in the memory 1310 is executed by the processor 1320, the processor 1320 and the communication interface 1330 are configured to perform steps of the depth estimation method in embodiments of this application.
  • the processor 1320 may be a general-purpose CPU, a microprocessor, an application-specific integrated circuit (application-specific integrated circuit, ASIC), a graphics processing unit (graphics processing unit, GPU), or one or more integrated circuits configured to execute a related program, to implement a function that needs to be executed by a unit in the depth estimation apparatus in embodiments of this application, or perform the depth estimation method in the method embodiments of this application.
  • ASIC application-specific integrated circuit
  • GPU graphics processing unit
  • the processor 1320 may be an integrated circuit chip and has a signal processing capability. In an implementation process, steps of the depth estimation method in embodiments of this application may be completed by using a hardware integrated logic circuit in the processor 1320 or instructions in a form of software.
  • the processor 1320 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field programmable gate array (field programmable gate array, FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • DSP digital signal processing
  • ASIC application-programmable gate array
  • FPGA field programmable gate array
  • the processor may implement or perform the methods, steps, and logical block diagrams that are disclosed in embodiments of this application.
  • the general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
  • the steps in the methods disclosed with reference to embodiments of this application may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of hardware and software modules in the decoding processor.
  • a software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register.
  • the storage medium is located in the memory 1310.
  • the processor 1320 reads information in the memory 1310, and completes, in combination with hardware of the processor, a function that needs to be performed by a unit included in the depth estimation apparatus in embodiments of this application, or performs the depth estimation method in the method embodiments of this application.
  • the communication interface 1330 uses, for example, but not limited to, a transceiver-like apparatus, to implement communication between the apparatus 1300 and another device or a communication network.
  • the first depth estimation model and/or the second depth estimation model may be obtained through the communication interface 1330.
  • the bus 1340 may include a path for transmitting information between components (for example, the memory 1310, the processor 1320, and the communication interface 1330) of the apparatus 1300.
  • FIG. 14 is a schematic block diagram of an apparatus for training a depth estimation model according to an embodiment of this application.
  • the apparatus 1400 for training a depth estimation model shown in FIG. 14 includes an obtaining unit 1410, a training unit 1420, and a transceiver unit 1430.
  • the obtaining unit 1410, the training unit 1420, and the transceiver unit 1430 may be configured to perform the method for training a depth estimation model in embodiments of this application.
  • the obtaining unit 1410 is configured to: process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image.
  • the training unit 1420 is configured to: train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model, and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • the transceiver unit 1430 is configured to: receive gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image; and send the updated first depth estimation model and the updated second depth estimation model to the second device.
  • training unit 1420 in the apparatus 1400 may be equivalent to a processor 1520 in an apparatus 1500 in the following descriptions.
  • FIG. 15 is a schematic diagram of a hardware structure of an apparatus for training a depth estimation model according to an embodiment of this application.
  • the apparatus 1500 for training a depth estimation model shown in FIG. 15 includes a memory 1510, a processor 1520, a communication interface 1530, and a bus 1540.
  • the memory 1510, the processor 1520, and the communication interface 1530 implement communication connection between each other through the bus 1540.
  • the communication interface may further implement communication with another device, for example, communication with a second device.
  • the memory 1510 may be a ROM, a static storage device, a dynamic storage device, or a RAM.
  • the memory 1510 may store a program.
  • the processor 1520 and the communication interface 1530 are configured to perform steps of the method for training a depth estimation model in embodiments of this application.
  • the processor 1520 may be a CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits configured to execute a related program, to implement a function that needs to be performed by a unit in the apparatus for training a depth estimation model in embodiments of this application, or perform the method for training a depth estimation model in the method embodiments of this application.
  • the processor 1520 may be an integrated circuit chip and has a signal processing capability. In an implementation process, steps of the method for training a depth estimation model in embodiments of this application may be completed by using a hardware integrated logic circuit in the processor 1520 or instructions in a form of software.
  • the processor 1520 may alternatively be a general-purpose processor, a DSP, an ASIC, an FPGA or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • the processor may implement or perform the methods, steps, and logical block diagrams that are disclosed in embodiments of this application.
  • the general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
  • a software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register.
  • the storage medium is located in the memory 1510.
  • the processor 1520 reads information in the memory 1510, and completes, in combination with hardware of the processor, a function that needs to be performed by a unit included in the apparatus for training a depth estimation model in embodiments of this application, or performs the method for training a depth estimation model in the method embodiments of this application.
  • the communication interface 1530 uses, for example, but not limited to, a transceiver-like apparatus, to implement communication between the apparatus 1500 and another device or a communication network.
  • first training data may be obtained through the communication interface 1530.
  • the bus 1540 may include a path for transmitting information between components (for example, the memory 1510, the processor 1520, and the communication interface 1530) of the apparatus 1500.
  • the apparatus 1300 and the apparatus 1500 further include other components required for normal running.
  • the apparatus 1300 and the apparatus 1500 each may further include a hardware component for implementing another additional function.
  • the apparatus 1300 and the apparatus 1500 each may include only components necessary for implementing embodiments of this application, but not necessarily include all the components shown in FIG. 13 and FIG. 15 .
  • the disclosed system, method, and apparatus may be implemented in other manners.
  • the described apparatus embodiment is merely an example.
  • division into the units is merely logical function division and may be other division in actual implementation.
  • a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed.
  • the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces.
  • the indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
  • the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be positioned in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions in embodiments.
  • function units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.
  • the functions When the functions are implemented in the form of a software function unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device) to perform all or some of the steps of the methods described in embodiments of this application.
  • the foregoing storage medium includes any medium that can store program code, such as a universal serial bus flash disk (USB flash disk, UFD), where the UFD may also be referred to as a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disc.
  • USB flash disk universal serial bus flash disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

This application provides a depth estimation method and apparatus, a method and an apparatus for training a depth estimation model, and a system. The method includes: obtaining a first color image; inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image; and inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, where the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image. According to the technical solution of this application, the intermediate depth image corresponding to the color image is obtained by using the color image, and the target depth image corresponding to the color image is obtained based on the color image and the intermediate depth image corresponding to the color image. This can fully utilize prior information, namely, the color image, and help improve precision of a target depth estimation image.

Description

  • This application claims priority to Chinese Patent Application No. 202111154326.6, filed with the China National Intellectual Property Administration on September 29, 2021 and entitled "DEPTH ESTIMATION METHOD AND APPARATUS, METHOD AND APPARATUS FOR TRAINING DEPTH ESTIMATION MODEL, AND SYSTEM", which is incorporated herein by reference in its entirety.
  • TECHNICAL FIELD
  • This application relates to the field of artificial intelligence, and more specifically, to a depth estimation method and apparatus, a method and an apparatus for training a depth estimation model, and a system.
  • BACKGROUND
  • Currently, an unsupervised depth estimation algorithm is one of main algorithms of intelligent driving (intelligent driving, ID) and artificial intelligence (artificial intelligence, AI). The algorithm can estimate, by using a neural network model, depth information of an image shot by a color camera, and is widely used because the algorithm does not need tolabel a training set.
  • However, the current unsupervised depth estimation algorithm does not make full use of prior information of color images, resulting in poor quality of a depth estimation image. In addition, although the current unsupervised depth estimation algorithm eliminates a limitation on a training label to some extent, and limits training costs, once an algorithm model is deployed, the quality of the depth estimation image is also poor when a scenario that is not encountered in a training phase is encountered.
  • Therefore, how to improve the quality of the depth estimation image is a technical problem to be urgently resolved.
  • SUMMARY
  • This application provides a depth estimation method and apparatus, a method and an apparatus for training a depth estimation model, and a system, to help improve quality of a depth estimation image.
  • According to a first aspect, a depth estimation method is provided, including: obtaining a first color image; inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image; and inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, where the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image.
  • According to the technical solution of this application, the intermediate depth image corresponding to the color image is obtained based on the color image, and the target depth image corresponding to the color image is obtained based on the color image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, and help improve precision of a target depth estimation image.
  • With reference to the first aspect, in some implementations of the first aspect, the inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image includes: obtaining a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtaining the first target depth image based on the common edge image and the first intermediate depth image.
  • According to the technical solution of this application, the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image, and the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, to obtain the common edge image, and effectively use a favorable common edge part in the color image and the intermediate depth image corresponding to the color image, to help improve precision of the target depth estimation image.
  • With reference to the first aspect, in some implementations of the first aspect, the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • With reference to the first aspect, in some implementations of the first aspect, the inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image includes: obtaining a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtaining a first target feature vector based on the first depth feature vector and a first weight value, and obtaining a second target feature vector based on the second depth feature vector and a second weight value; and obtaining the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • According to the technical solution of this application, a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • Optionally, the color image includes a left view or a right view.
  • Optionally, the color image is shot by one or more cameras disposed on a terminal device.
  • Optionally, the camera is a binocular camera.
  • With reference to the first aspect, in some implementations of the first aspect, the method further includes: calculating gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image; and sending the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • According to the technical solution of this application, gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the gradient information is sent to the first device, and used by the first device to train and update a depth estimation model. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • With reference to the first aspect, in some implementations of the first aspect, the method further includes:
    receiving the updated first depth estimation model and the updated second depth estimation model from the first device.
  • With reference to the first aspect, in some implementations of the first aspect, the method further includes:
    obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • According to the technical solution of this application, the gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the depth estimation model is trained and updated based on the gradient information. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • According to a second aspect, a training method for a depth estimation model is provided, including: processing a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image; processing the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image; training the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model; and training the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • According to the technical solution of this application, the first depth estimation model is obtained through training by using a color image, and the second depth estimation model is obtained through training by using the color image and an intermediate depth image corresponding to the color image. The depth estimation model obtained through training can fully use prior information, namely, the color image, to help improve precision of a target depth estimation image.
  • With reference to the second aspect, in some implementations of the second aspect, the updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • With reference to the second aspect, in some implementations of the second aspect, the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • With reference to the second aspect, in some implementations of the second aspect, the updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • Optionally, the color image includes a left view or a right view.
  • Optionally, the color image is shot by one or more cameras disposed on a terminal device.
  • Optionally, the camera is a binocular camera.
  • With reference to the second aspect, in some implementations of the second aspect, the training method further includes: receiving gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image; and obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • According to the technical solution of this application, the first device may train and update the depth estimation model based on the gradient information calculated by the terminal device based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • With reference to the second aspect, in some implementations of the second aspect, the training method further includes: sending the updated first depth estimation model and the updated second depth estimation model.
  • According to a third aspect, a depth estimation apparatus is provided, including: an obtaining unit, configured to obtain a first color image; and a processing unit, configured to: input the first color image into a first depth estimation model, to obtain a first intermediate depth image; and input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, where the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image.
  • With reference to the third aspect, in some implementations of the third aspect, the processing unit is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • With reference to the third aspect, in some implementations of the third aspect, the processing unit is specifically configured to: splice the first color image and the first intermediate depth image, to obtain an input matrix; perform dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtain the common edge image based on the first matrix and the second matrix.
  • With reference to the third aspect, in some implementations of the third aspect, the processing unit is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • Optionally, the color image includes a left view or a right view.
  • Optionally, the color image is shot by one or more cameras disposed on a terminal device.
  • Optionally, the camera is a binocular camera.
  • With reference to the third aspect, in some implementations of the third aspect, the processing unit is further configured to calculate gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image. The apparatus further includes a sending unit. The sending unit is configured to send the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • With reference to the third aspect, in some implementations of the third aspect, the obtaining unit is further configured to receive the updated first depth estimation model and the updated second depth estimation model from the first device.
  • According to a fourth aspect, an apparatus for training a depth estimation model is provided, including: an obtaining unit, configured to: process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image; and a training unit, configured to: train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model, and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • With reference to the fourth aspect, in some implementations of the fourth aspect, the updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • With reference to the fourth aspect, in some implementations of the fourth aspect, the training unit is specifically configured to: splice the first color image and the first intermediate depth image, to obtain an input matrix; perform dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtain the common edge image based on the first matrix and the second matrix.
  • With reference to the fourth aspect, in some implementations of the fourth aspect, the updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • Optionally, a color image includes a left view or a right view.
  • Optionally, the color image is shot by one or more cameras disposed on a terminal device.
  • Optionally, the camera is a binocular camera.
  • With reference to the fourth aspect, in some implementations of the fourth aspect, the obtaining unit is further configured to receive gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image. The training unit is further configured to obtain the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • With reference to the fourth aspect, in some implementations of the fourth aspect, the training apparatus further includes a sending unit, where the sending unit is configured to send the updated first depth estimation model and the updated second depth estimation model.
  • According to a fifth aspect, a depth estimation apparatus is provided, where the apparatus includes a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the method in any implementation of the first aspect.
  • Optionally, the apparatus may be disposed in various devices or systems that require depth estimation, such as a vehicle-mounted terminal, a mobile terminal, a high definition map system, and an intelligent transportation system.
  • Optionally, the apparatus may alternatively be a chip.
  • According to a sixth aspect, an apparatus for training a depth estimation model is provided, where the apparatus includes a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the training method in any implementation of the second aspect.
  • Optionally, the training apparatus may be a device that can perform model training, for example, a host, a computer, a server, or a cloud device.
  • Optionally, the training apparatus may alternatively be a chip.
  • According to a seventh aspect, a computer-readable medium is provided. The computer-readable medium stores program code to be executed by a device, and the program code is used for performing the method in any one of the implementations of the first aspect or the second aspect.
  • According to an eighth aspect, a computer program product including instructions is provided. When the computer program product runs on a computer, the computer is enabled to perform the method in any one of the implementations of the first aspect or the second aspect.
  • It should be noted that all or some of computer program code may be stored in a first storage medium. The first storage medium may be encapsulated together with a processor, or may be encapsulated separately from a processor. This is not specifically limited in this embodiment of this application.
  • According to a ninth aspect, a chip is provided. The chip includes a processor and a data interface. The processor performs the method in any one of the implementations of the first aspect or the second aspect by reading, through the data interface, instructions stored in a memory.
  • Optionally, in an implementation, the chip may further include the memory. The memory stores the instructions, the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to perform the method according to any one of the implementations of the first aspect.
  • BRIEF DESCRIPTION OF DRAWINGS
    • FIG. 1 is a schematic diagram of a main artificial intelligence framework according to an embodiment of this application;
    • FIG. 2 shows an application scenario of an example of a depth estimation method according to this application;
    • FIG. 3 shows an application scenario of another example of a depth estimation method according to this application;
    • FIG. 4 is a schematic diagram of a system architecture according to an embodiment of this application;
    • FIG. 5 is a schematic flowchart of an example of a depth estimation method according to this application;
    • FIG. 6 is an input and output diagram of an example of a depth estimation method according to this application;
    • FIG. 7 is a schematic diagram of a structure of an example of a first depth estimation model according to this application;
    • FIG. 8 is a schematic diagram of a structure of an example of an improved multi-scale block MSB according to this application;
    • FIG. 9 is a schematic flowchart of an example of a second depth estimation model according to this application;
    • FIG. 10 is a schematic flowchart of an example of a method for training a depth estimation model according to this application;
    • FIG. 11 is a schematic interaction diagram of an example of a method for training a depth estimation model according to this application;
    • FIG. 12 is a schematic block diagram of an example of a depth estimation apparatus according to this application;
    • FIG. 13 is a schematic diagram of a structure of an example of a hardware structure of a depth estimation apparatus according to this application;
    • FIG. 14 is a schematic block diagram of an example of an apparatus for training a depth estimation model according to this application; and
    • FIG. 15 is a schematic diagram of a structure of an example of a hardware structure of an apparatus for training a depth estimation model according to this application.
    DESCRIPTION OF EMBODIMENTS
  • The following describes technical solutions of this application with reference to accompanying drawings.
  • The following describes technical solutions of this application with reference to accompanying drawings.
  • Embodiments of this application relate to a neural network. To better understand a method in embodiments of this application, the following first describes terms and concepts related to the neural network.
  • (1) Neural network (neural network, NN)
  • The neural network may include a neuron. The neuron may be an operation unit that uses xs and an intercept 1 as an input. For example, an output of the operation unit may be shown in the following formula: h W , b x = ƒ W T x ƒ s = 1 n W s x s + b
    Figure imgb0001
    s=1, 2, ..., n, n is a natural number greater than 1, representing a quantity of layers of the neural network, Ws is a weight of xs, and may also be referred to as a parameter or a coefficient of the neural network, xs is an input of the neural network, and b is a bias of the neuron. f is an activation function (activation function) of the neuron, and the activation function is used to perform non-linear transformation on a feature of the neural network, to convert an input signal in the neuron into an output signal. The output signal of the activation function may be used as an input of a next convolutional layer, and the activation function may be a sigmoid function. The neural network is a network constituted by linking a plurality of single neurons together. To be specific, an output of one neuron may be an input of another neuron. An input of each neuron may be connected to a local receptive field of a previous layer to extract a feature of the local receptive field. The local receptive field may be a region including several neurons.
  • (2) Deep neural network (deep neural network, DNN)
  • A deep neural network, also referred to as a multi-layer neural network, may be understood as a neural network including a plurality of hidden layers. The DNN is divided based on locations of different layers, so that the neural network in the DNN may be classified into three types: an input layer, a hidden layer, and an output layer. Generally, the first layer is the input layer, the last layer is the output layer, and the middle layer is the hidden layer. The layers are fully connected, that is, each neuron at an ith layer is connected to a neuron at an (i+1)th layer.
  • Although the DNN seems complex, work at each layer is actually not complex. Briefly, the work is the following non-linear relationship expression: y = α(W x + b ), where x is an input vector, y is an output vector, b is a bias vector, W is a weight, and may also be referred to as a coefficient or a parameter, where the weight may be in a form of a weight matrix, and α( ) is an activation function. At each layer, only a simple operation is performed on the input vector x to obtain the output vector y . Because there are a large quantity of DNN layers, there are also a large quantity of weights W and bias vectors b . A meaning of the weight (referred to as a coefficient for ease of description) at each layer in the DNN is described as follows: The coefficient W is used as an example. It is assumed that in a three-layer DNN, a linear coefficient from a 4th neuron at a second layer to a 2nd neuron at a third layer is defined as W 24 3
    Figure imgb0002
    . The superscript 3 represents a quantity of layers at which the coefficient W is located, and the subscript corresponds to an output third-layer index 2 and an input second-layer index 4.
  • In conclusion, a coefficient from a kth neuron at an (L-1)th layer to a jth neuron at an Lth layer is defined as W jk L
    Figure imgb0003
    .
  • The input layer has no weight W. In the deep neural network, more hidden layers make the network more capable of describing a complex case in the real world. Theoretically, a model with more weights has higher complexity and a larger "capacity". It indicates that the model can complete a more complex learning task. Training the deep neural network is a process of learning a weight, and a final objective of the training is to obtain weights (for example, a weight matrix including coefficients W of a plurality of layers) of all layers of the trained deep neural network.
  • (3) Convolutional neural network (convolutional neural network, CNN)
  • A convolutional neural network is a deep neural network of a convolutional structure. The convolutional neural network includes a feature extractor that includes a convolutional layer and a subsampling layer, and the feature extractor may be considered as a filter. The convolutional layer is a neuron layer that is in the convolutional neural network and at which convolution processing is performed on an input signal. At the convolutional layer of the convolutional neural network, one neuron may be connected only to some adjacent-layer neurons. One convolutional layer usually includes several feature planes, and each feature plane may include some neural units that are in a rectangular arrangement. Neural units in a same feature plane share a weight, and the weight shared herein is a convolution kernel. Weight sharing may be understood as that an image information extraction manner is irrelevant to a location. The convolution kernel may be initialized in a form of a random-size matrix. In a process of training the convolutional neural network, the convolution kernel may obtain an appropriate weight through learning. In addition, benefits directly brought by weight sharing are that connections between layers of the convolutional neural network are reduced, and an overfitting risk is reduced.
  • (4) Loss function (loss function)
  • In a process of training the deep neural network, because it is expected that an output of the deep neural network is as much as possible close to a predicted value that is actually expected, a predicted value of a current network and a target value that is actually expected may be compared, and then a weight of each layer of the neural network is updated based on a difference between the predicted value and the target value (certainly, there is usually an initialization process before the first update, to be specific, weights are preconfigured for all layers of the deep neural network). For example, if the predicted value of the network is large, the weight vector is adjusted to decrease the predicted value, and adjustment is continuously performed, until the deep neural network can predict the target value that is actually expected or a value that is very close to the target value that is actually expected. Therefore, "how to obtain, through comparison, a difference between the predicted value and the target value" is predefined. This is a loss function or an objective function (objective function). The loss function and the objective function are important equations that measure the difference between the predicted value and the target value. The loss function is used as an example. A higher output value (loss) of the loss function indicates a larger difference. Therefore, training of the deep neural network is a process of minimizing the loss as much as possible.
  • (5) Back propagation (back propagation, BP)
  • A neural network may use an error back propagation algorithm to correct a value of a weight in an initial neural network model in a training process, so that a reconstruction error loss of the neural network model becomes smaller. Specifically, an input signal is forward transferred until the error loss is generated in an output, and the weight of the initial neural network model is updated through back propagation of information about the error loss, to converge the error loss. The back propagation algorithm is an error-loss-centered back propagation motion intended to obtain a weight, such as a weight matrix, of an optimal neural network model.
  • In a conventional solution, a depth estimation model is usually obtained through training by using color image data. However, in the conventional solution, use of a common edge part of a color image and a depth image is ignored. Consequently, quality of a depth estimation image obtained by using the depth estimation model is poor.
  • In addition, although the current unsupervised depth estimation algorithm eliminates a limitation on a training label to some extent, and limits training costs, after an algorithm model is deployed, the quality of the depth estimation image is also poor when a scenario that is not encountered in a training phase is encountered.
  • For the foregoing problem, this application provides a depth estimation method. In the method, a depth estimation model used for depth estimation includes a common edge extraction module that can extract a common edge of a color image and a depth image. Therefore, the depth estimation model can use prior information of the color image to improve estimation precision of the depth image. In addition, during training of the depth estimation model, a federated learning method is combined with an unsupervised learning method, so that an algorithm model is periodically updated after being deployed, and quality of the depth image output by the model is further improved.
  • The solutions in embodiments of this application can be applied to various depth estimation use scenarios such as image recognition, image processing, a high definition map, intelligent driving, intelligent transportation, and autonomous driving.
  • FIG. 1 is a schematic diagram of a main artificial intelligence framework according to an embodiment of this application. The main framework describes an overall working procedure of an artificial intelligence system, and is applicable to a general requirement of the field of artificial intelligence.
  • The following describes in detail the foregoing artificial intelligence main framework from two dimensions: an "intelligent information chain" (a horizontal axis) and an "information technology (information technology, IT) value chain" (a vertical axis).
  • The "intelligent information chain" reflects a series of processes from data obtaining to processing. For example, the process may be a general process of intelligent information perception, intelligent information representation and formation, intelligent inference, intelligent decision making, and intelligent execution and output. In this process, the data undergoes a refinement process of "data-information-knowledge-intelligence".
  • The "IT value chain", from the underlying artificial intelligence infrastructure and information (provision and processing of technical realizations) to the system's industry ecosystem, reflects the value that artificial intelligence contributes to the information technology industry.
  • (1) Infrastructure
  • The infrastructure provides computing capability support for the artificial intelligence system, implements communication with the external world, and implements support by using a basic platform.
  • The infrastructure can communicate with the outside by using a sensor, and a calculation capability of the infrastructure can be provided by an intelligent chip.
  • The intelligent chip herein may be a hardware acceleration chip, for example, a central processing unit (central processing unit, CPU), a neural-network processing unit (neural-network processing unit, NPU), a graphics processing unit (graphics processing unit, GPU), an application-specific integrated circuit (application-specific integrated circuit, ASIC), or a field programmable gate array (field programmable gate array, FPGA).
  • The basic platform of the infrastructure may include related platforms assurance and support such as a distributed computing framework and a network, and may include cloud storage and computing, an interconnection and interworking network, and the like.
  • For example, the infrastructure can communicate with the outside by using the sensor, to obtain data. Then, the data is provided to an intelligent chip in a distributed computing system provided by the basic platform, for computing.
  • (2) Data
  • Data at an upper layer of the infrastructure indicates a data source in the artificial intelligence field. The data relates to at least one of a graph, an image, a voice, a text, and the like. The data is different in different application fields, and may have different representation forms. For example, when the data relates to the internet of things field, content of the data is related to a specific internet of things connection terminal, for example, may include sensing data like a force, a displacement, a liquid level, a temperature, or humidity.
  • In an embodiment of this application, the data is, for example, a color image.
  • (3) Data processing
  • The foregoing data processing usually includes a processing manner such as data training, machine learning, deep learning, search, inference, or decision-making.
  • Machine learning and deep learning may mean performing symbolic and formal intelligent information modeling, extraction, preprocessing, training, and the like on data.
  • Inference is a process in which human intelligent inference is simulated in a computer or an intelligent system, and machine thinking and problem resolving are performed by using formal information according to an inference control policy. A typical function is searching and matching.
  • Decision-making is a process of making a decision after intelligent information is inferred, and usually provides functions such as classification, ranking, and prediction.
  • (4) General capability
  • After data processing mentioned above is performed on data, some general capabilities may be further formed based on a data processing result, for example, an algorithm or a general system, such as translation, text analysis, computer vision processing, voice recognition, and image recognition.
  • (5) Intelligent product and industrial application
  • The intelligent product and industry application are a product and an application of the artificial intelligence system in various fields, and are package of an overall solution of the artificial intelligence, so that decision-making for intelligent information is productized and an application is implemented. Application fields mainly include intelligent manufacturing, intelligent transportation, intelligent home, intelligent healthcare, intelligent security protection, autonomous driving, a safe city, an intelligent terminal, or the like.
  • FIG. 2 shows a specific application scenario of an example of a depth estimation method according to an embodiment of this application. In this application scenario, a vehicle 220 and a cloud service system 210 may be included, and the vehicle 220 and the cloud service system 210 may communicate with each other through a network.
  • Some or all functions of the vehicle 220 are controlled by a computing platform 221. The computing platform 221 may include at least one processor 222. The processor 222 may execute instructions 224 stored in a non-transitory computer-readable medium such as a memory 223.
  • In some embodiments, the computing platform 221 may alternatively be a plurality of computing devices that control individual components or subsystems of the vehicle 220 in a distributed manner. The processor 222 may be any conventional processor, such as a central processing unit (central processing unit, CPU). Alternatively, the processor 222 may further include an image processor (graphic process unit, GPU), a field programmable gate array (field programmable gate array, FPGA), a system on chip (system on chip, SOC), an application-specific integrated circuit (application-specific integrated circuit, ASIC) or a combination thereof.
  • In addition to the instructions 224, the memory 223 may further store data, for example, road map and path information; a position, a direction, a velocity, and other vehicle data of a vehicle; and other information. Such information may be used by the vehicle 220 and the computing platform 221 during operation of the vehicle 220 in autonomous, semi-autonomous, and/or manual modes.
  • It should be understood that a structure of the vehicle in FIG. 2 should not be construed as a limitation on embodiments of this application.
  • Optionally, the vehicle 220 may include one or more different types of transportation, or may include one or more different types of transportation tools or movable objects that operate or move on land (for example, a highway, a road, or a railway), water surface (for example, a waterway, a river, or an ocean), or in space. For example, the vehicle may include a car, a bicycle, a motorcycle, a train, a subway, an airplane, a ship, an aircraft, a robot, another type of transportation tool or a movable object, or the like. This is not limited in embodiments of this application.
  • In addition, the application scenario shown in FIG. 2 may further include a cloud server. In this embodiment of this application, the cloud server may perform perception fusion and computational inference based on the gradient information uploaded by the vehicle and other information (for example, information about another vehicle and road condition information) in the cloud server, to train and update a network gradient, so as to improve accuracy of the depth estimation model.
  • In an embodiment, the cloud server may alternatively be implemented by using a virtual machine.
  • Embodiments of this application may be further applied to many fields of artificial intelligence, for example, image recognition, image processing, high definition map, intelligent driving, intelligent transportation, and autonomous driving. In particular, embodiments of this application are applied to a branch part that is in these artificial intelligence fields and that requires depth estimation. For example, in the high definition map field, richer information may be obtained through depth estimation, so that map information with higher accuracy can be provided. For another example, in the intelligent driving field, a road condition faced by the vehicle may be further determined through depth estimation, so that a driver can be assisted in performing a correct driving operation based on an actual situation.
  • The following briefly describes an application scenario of intelligent driving.
  • In an intelligent driving scenario, road condition information may be obtained after depth estimation is performed on an input color image, to assist a driver in making a correct decision. As shown in FIG. 3, when a color image collected by a camera is input into a depth estimation model, current road condition information may be obtained, for example, traffic light information, information about another vehicle, pedestrian information, and the like. The road condition information is input into a driving decision-making module. For the road condition information, the driving decision-making module further determines an operation to be performed. For example, when the current traffic light information is a red light, the driving decision-making module sends stop indication information. Further, in some products, the driving decision-making module may further perform an automatic braking operation. For another example, when it is found in the current road condition information that there is a crosswalk in the front, the driving decision-making module sends deceleration indication information. In other words, in FIG. 3, a depth estimation phase is used to improve safety of intelligent driving, and effectively prevent a driver from performing an incorrect operation because the driver neglects observation.
  • FIG. 4 is a schematic diagram of a system architecture according to an embodiment of this application. The system architecture may be used to train a neural network model, for example, an image recognition model or a depth estimation model. As shown in FIG. 4, a data collection device 460 is configured to collect training data. For the method in embodiments of this application, when a first depth estimation model is trained, the training data may include a color image; and when a second depth estimation model is trained, the training data may include a color image and a first depth estimation image.
  • After collecting the training data, the data collection device 460 stores the training data in a database 430, and a training device 420 obtains a target model/rule 401 through training based on the training data maintained in the database 430. "A/B" describes an association relationship for describing associated objects and represents that three relationships may exist. For example, A/B may represent the following three cases: Only A exists, both A and B exist, and only B exists.
  • The following describes how the training device 420 obtains the target model/rule 401 based on the training data. In one case, the training device 420 processes an input original image, and compares an output image with the original image until a difference between the image output by the training device 420 and the original image is less than a specific threshold, to complete training of the target model/rule 401. In this case, the depth estimation model in embodiments of this application may be obtained through training, that is, a trained basic neural network (namely, the second depth estimation model) is obtained, so that the first depth estimation model is obtained subsequently through further training by using the basic neural network. In another case, the training device 420 processes the input color image and a first depth image until accuracy of a category output by the training device 420 is greater than or equal to a specific threshold, to complete training of the target model/rule 401. In this case, the depth estimation model in embodiments of this application may be obtained through training, that is, the depth estimation model is obtained through further training based on the basic neural network.
  • The target model/rule 401 can be used to implement the method in embodiments of this application. The target model/rule 401 in embodiments of this application may be specifically a neural network. It should be noted that, during actual application, the training data maintained in the database 430 is not necessarily all collected by the data collection device 460, or may be received from another device. In addition, it should be noted that the training device 420 does not necessarily train the target model/rule 401 completely based on the training data maintained in the database 430, or may obtain training data from a cloud or another place to perform model training. The foregoing descriptions should not be construed as a limitation on embodiments of this application.
  • The target model/rule 401 obtained through training by the training device 420 may be applied to different systems or devices, for example, an execution device 410 shown in FIG. 4. The execution device 410 may be a terminal, for example, a mobile phone terminal, a tablet, a laptop computer, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) terminal, or a vehicle-mounted terminal, or may be a server, a cloud, or the like. In FIG. 4, the execution device 410 configures an input/output (input/output, I/O) interface 412, configured to exchange data with an external device. A user may input data to the I/O interface 412 by using a client device 440, where the input data in this embodiment of this application may include a color image input by the client device.
  • A preprocessing module 413 and a preprocessing module 414 are configured to preprocess the input data (for example, the color image) received by the I/O interface 412. In this embodiment of this application, the preprocessing module 413 and the preprocessing module 414 may not exist (or there may be only one preprocessing module), and a calculation module 411 is directly used to process the input data.
  • In a process in which the execution device 410 preprocesses the input data, or in a process in which the calculation module 411 of the execution device 410 performs related processing such as calculation, the execution device 410 may invoke data, code, and the like in a data storage system 450 for corresponding processing, and may further store, in the data storage system 450, data, instructions, and the like that are obtained through corresponding processing.
  • Finally, the I/O interface 412 returns a processing result to the client device 440, to provide the processing result for the user.
  • It should be noted that the training device 420 may generate corresponding target models/rules 401 for different targets or different tasks based on different training data. The corresponding target models/rules 401 may be used to implement the foregoing targets or complete the foregoing tasks, to provide a required result for the user.
  • FIG. 5 is a schematic flowchart of an example of a depth estimation method according to this application.
  • S510: Obtain a first color image.
  • Optionally, the first color image is a left view or a right view.
  • Optionally, the first color image may be shot by one or more cameras disposed on a second device. The second device may be a vehicle, an airplane, a mobile phone, or another possible mobile device. This is not limited in this application.
  • Optionally, the camera may be a binocular camera.
  • S520: Input the first color image into a first depth estimation model, to obtain a first intermediate depth image.
  • The first depth estimation model is obtained through training based on a color image and an intermediate depth image corresponding to the color image.
  • In embodiments of this application, a relationship between the color image and the first color image is not limited. For example, the first color image may be one of the color images. For another example, the first color image does not belong to any one of the foregoing color images, that is, the first color image is not data in a model training data set. As described in the background of this application, a scenario that does not occur in model training may be encountered in a model use process.
  • Specifically, the inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image may include: obtaining a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtaining a first target feature vector based on the first depth feature vector and a first weight value, and obtaining a second target feature vector based on the second depth feature vector and a second weight value; and obtaining the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • In this way, according to the technical solution of this application, a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • S530: Input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image.
  • The second depth estimation model is obtained through training based on the color image and a target depth image corresponding to the color image.
  • Specifically, the inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image may include: obtaining a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtaining the first target depth image based on the common edge image and the first intermediate depth image.
  • Specifically, the obtaining a common edge image based on the first color image and the first intermediate depth image may include: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • In this way, according to the technical solution of this application, the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image, and the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, to obtain the common edge image, and effectively use a favorable common edge part in the color image and the intermediate depth image corresponding to the color image, to help improve precision of the target depth estimation image.
  • Optionally, the method further includes: calculating gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image; and sending the gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • Optionally, the method may further include: receiving the updated first depth estimation model and the updated second depth estimation model from the first device.
  • In this way, according to the technical solution of this application, gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the gradient information is sent to the first device, and used by the first device to train and update a depth estimation model. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • Optionally, the method further includes: obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • In this way, according to the technical solution of this application, the gradient information is calculated based on the color image and the target depth image corresponding to the color image, and the depth estimation model is trained and updated based on the gradient information. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • According to the technical solution of this application, the intermediate depth image corresponding to the color image is obtained based on the color image, and the target depth image corresponding to the color image is obtained based on the color image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, and help improve precision of a target depth estimation image.
  • FIG. 6 is an input and output diagram of an example of a depth estimation method according to this application.
  • As shown in FIG. 6, in this embodiment of this application, a first color image 610 is used as an input and is input into a first depth estimation model, to obtain a first intermediate depth image 620, and the first intermediate depth image 620 and the first color image 610 are used as inputs and are input into a second depth estimation model, to obtain a first target depth image 630.
  • The first color image 610 is the first color image obtained in S510 in FIG. 5. By way of example, and not limitation, the first color image 610 is a right view obtained through shooting by a binocular camera disposed on a vehicle.
  • The first color image 610 is input into the first depth estimation model, that is, S520 in FIG. 5 is performed, to obtain the first depth image 620. The first depth estimation model is trained based on a color image and an intermediate depth image corresponding to the color image.
  • In a possible implementation, a structure of the first depth estimation model may be shown in FIG. 7, and the first depth estimation model may include an encoder side and a decoder side. By way of example, and not limitation, the first depth estimation model may perform three downsampling operations on the first color image 610 on the encoder side, and perform three upsampling operations on the decoder side, to obtain the first intermediate depth image 620. On the encoder side, the three downsampling operations may include a convolutional network of four phases, for example, black columnar bars Xi (i=1, 2, 3) and X4. The convolution network Xi (i=1, 2, 3) includes n (n=4, 5, 8) improved multi-scale blocks (multi-scale block, MSB) and one 3*3 convolution layer whose step value is 2, where a value of i is in a one-to-one correspondence with a value of n. For example, the convolution network X1 (i=1) includes four (n=4) improved MSBs and one 3*3 convolution layer whose step value is 2, and X4 includes eight MSBs.
  • Correspondingly, on the decoder side, three upsampling operations are performed, and the first depth estimation model may include three deconvolutional networks and one convolution network, for example, white columnar bars Yi (i=1, 2, 3) and Y4. The deconvolution network Yi (i=1, 2, 3) includes one deconvolution layer whose convolution kernel size is 3, and the convolution network Y4 includes a 3*3 convolution layer.
  • In an embodiment of this application, the first depth estimation model may extract a depth feature vector Xn-1 from the first color image 610, and perform MSB processing on the depth feature vector Xn-1, to obtain a target feature vector Xn.
  • The following uses Xn-1∈h*w*c as an example to describe in detail an MSB processing process with reference to FIG. 8.
  • A split (split) operation may be first performed on the depth feature vector Xn-1∈h*w*c input into the first depth estimation model according to the following formula (1): feature 3 * 3 , feature 5 * 5 = Split X n 1
    Figure imgb0004
    and
    • the depth feature vector Xn-1 is split into two parts along a channel, to obtain Xsplit-1∈h*w*1/2c and Xsplit-2∈h*w*1/2c. Xsplit-1∈h*w*1/2c and Xsplit-2∈h*w*1/2c are respectively input into respective multi-scale feature paths according to the following formulas (2) and (3): feature 3 * 3 = relu bn ω 1 * 3 relu bn ω 3 * 1 X split_1
      Figure imgb0005
      feature 5 * 5 = relu bn ω 1 * 5 relu bn ω 5 * 1 X split_2
      Figure imgb0006
    • to obtain a first depth feature vector feature3*3∈h*w*1/2c and a second depth feature vector feature5*5∈h*w*1/2c. In the formula (2), w1*3 and w3*1 represent convolution, bn represents a normalized layer, and relu represents an activation layer (rectified linear unit). In addition, Xsplit-1∈h*w*1/2c and Xsplit-2∈h*w*1/2c are respectively input into respective weight paths according to the following formulas (4) and (5): pool 3 * 3 = Sigmoid ω 1 * 1 relu ω 1 * 1 avgpool X split_1
      Figure imgb0007
      pool 5 * 5 = Sigmoid ω 1 * 1 relu ω 1 * 1 avgpool X split_2
      Figure imgb0008
    • to obtain a first weight value and a second weight value, where the weight value may be used to distinguish importance of features of different channels. Then, the first depth feature vector feature3*3∈h*w*1/2c, the second depth feature vector feature5*5∈h*w*1/2c, and corresponding weight values are calculated according to the following formulas (6) and (7): feature _ attention 3 * 3 = feature 3 * 3 * pool 3 * 3
      Figure imgb0009
      feature _ attention 5 * 5 = feature 5 * 5 * pool 5 * 5
      Figure imgb0010
    • to obtain a first target depth feature vector feature_attention3*3∈h*w* 1/2c and a second target depth feature vector feature_attention5*5∈h*w*1/2c. Then, according to the following formula (8): msb = concat feature _ attention 3 * 3 , feature _ attention 5 * 5
      Figure imgb0011
    • feature_attention3*3 and feature_attention5*5 are spliced along a channel dimension, to obtain msbEh*w*c. Finally, an element plus operation is performed once on the input depth feature vector Xn-1∈h*w*c and msbEh*w*c according to a formula (9): X n = msb + X n 1
      Figure imgb0012
    • to obtain an output Xn∈h*w*c of the MSB module.
  • The following briefly describes corresponding processing processes on the encoder side and the decoder side of the first depth estimation model in this application. For this part, refer to an existing technology.
  • On the encoder side, the first color image 610 is first input into a convolution layer whose convolution kernel size is 3*3, an initial feature featureinit∈H*W*16 is extracted, and encoding of layers X1 to X4 are performed on the initial feature, as shown in the following formula (10) to formula (17): feature init = relu bn ω 3 * 3 I
    Figure imgb0013
    X 1 = msb feature init
    Figure imgb0014
    Down 1 = relu bn ω 3 * 3 , stride = 2 X 1
    Figure imgb0015
    X 2 = msb Down 1
    Figure imgb0016
    Down 2 = relu bn ω 3 * 3 , stride = 2 X 2
    Figure imgb0017
    X 3 = msb Down 2
    Figure imgb0018
    Down 3 = relu bn ω 3 * 3 , stride = 2 X 3
    Figure imgb0019
    X 4 = msb Down 3
    Figure imgb0020
  • For ease of description, the first color image is uniformly expressed as I in the formula, and quantities of MSBs in the formulas (11), (13), (15), and (17) are respectively 4, 5, 8, and 8.
  • On the decoder side, features corresponding to the encoder side are spliced to a corresponding phase, and upsampling is performed by using a deconvolution operation, as shown in formula (18) to formula (22): Up 1 = relu bn Cvtω 3 * 3 , stride = 2 X 4
    Figure imgb0021
    Up 2 = relu bn Cvtω 3 * 3 , stride = 2 concat ( Up 1 , X 3
    Figure imgb0022
    Up 3 = relu ( bn Cvtω 3 * 3 , stride = 2 concat Up 2 X 2
    Figure imgb0023
    Up 4 = relu ( bn Cvtω 3 * 3 , stride = 2 concat Up 3 X 1
    Figure imgb0024
    depth corase = ω 3 * 3 Up 4
    Figure imgb0025
  • Finally, a depth estimation image depthcomse∈H*W*1, that is, the first intermediate depth image, in the encoding and decoding phase is output by using a 3*3 convolution layer of channel 1.
  • After the foregoing processing, S520 shown in FIG. 5 is completed. The first color image is input into the first depth estimation model, to obtain the first intermediate depth image 620.
  • According to the technical solution of this application, a target vector is obtained based on the depth feature vector and a weight value corresponding to the depth feature vector, so as to obtain the intermediate depth image. This helps improve precision of the depth image.
  • However, in the foregoing process, as described in the background of this application, prior information, namely, the color image is not well used, resulting in poor quality of the depth estimation image. Based on this, this application further provides a second depth estimation model, to further improve precision of the depth estimation image.
  • As shown in FIG. 6, in this application, after the first intermediate depth image 620 is obtained, step S530 may be performed, that is, the first color image 610 and the first intermediate depth image 620 are processed by using the second depth estimation model, to obtain the first target depth image 630.
  • A specific process of obtaining the first target depth image 630 based on the first color image 610 and the first intermediate depth image 620 may be shown in FIG. 9 (the first color image is numbered 610 in FIG. 6, and is numbered 910 in FIG. 9; the first intermediate depth image is numbered 620 in FIG. 6, and is numbered 920 in FIG. 9; and the first target depth image is numbered 630 in FIG. 6, and is numbered 930 in FIG. 9).
  • First, the input first color image 610 (IEH*W*3) and the input first intermediate depth image (depthcorase∈H*W*1) are spliced according to a formula (23): input = relu bn ω 3 * 3 concat image depth corase
    Figure imgb0026
    and an input matrix input∈H*W*16 is obtained through one layer of convolution.
  • Then, the input matrix inputEH*W*16 is separately input into a channel attention module (channel attention) and a spatial attention module (spatial attention) for processing, and according to formula (24) and formula (25): attention _ c = concat max pool input , avgpool input
    Figure imgb0027
    attention _ s = ω 1 * 1 concat relu bn ω 3 * 3 relu bn ω 1 * 1 input , relu bn ω 5 * 5 relu bn ω 1 * 1 input ,
    Figure imgb0028
    • a first matrix attention_c∈1*1*32 and a second matrix attention_s∈H*W*1 are obtained. Then, according to formula (26): attention _ map = sigmoid attention _ s * attention _ c
      Figure imgb0029
    • a common edge image attention_map∈H*W*1 is obtained based on the first matrix attention_c∈1*1*32 and the second matrix attention_s∈H*W*1, where sigmoid is an activation function.
  • Finally, according to formula (27): depth refine = depth corase * attention _ map
    Figure imgb0030
    a final refined depth image depthrefine∈H*W*1, that is, the first target depth image, is obtained based on the first intermediate depth image (depthcorase∈H*W*1) and the common edge image attention_mapEH*W*1.
  • In this way, according to the technical solution of this application, the common edge image is obtained based on the color image and the intermediate depth image corresponding to the color image, and the target depth image is obtained based on the common edge image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, to obtain the common edge image, and effectively use a favorable common edge part in the color image and the intermediate depth image corresponding to the color image, to help improve precision of the target depth estimation image.
  • FIG. 10 is a schematic flowchart of an example of a method for training a depth estimation model according to this application.
  • S1010: Process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image.
  • Optionally, the color image includes a left view or a right view.
  • Optionally, the color image is shot by one or more cameras disposed on a terminal device.
  • Optionally, the camera is a binocular camera.
  • S1020: Train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model; and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  • The updated first depth estimation model is specifically configured to: obtain a depth feature vector of the first color image based on the first color image, where the depth feature vector includes a first depth feature vector and a second depth feature vector; obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  • According to the technical solution of this application, the first depth estimation model is obtained through training by using a color image, and the second depth estimation model is obtained through training by using the color image and an intermediate depth image corresponding to the color image. The depth estimation model obtained through training can fully use prior information, namely, the color image, to help improve precision of a target depth estimation image.
  • The updated second depth estimation model is specifically configured to: obtain a common edge image based on the first color image and the first intermediate depth image, where the common edge image represents a common edge part of the first color image and the first intermediate depth image; and obtain the first target depth image based on the common edge image and the first intermediate depth image.
  • Optionally, the obtaining a common edge image based on the first color image and the first intermediate depth image includes: splicing the first color image and the first intermediate depth image, to obtain an input matrix; performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and obtaining the common edge image based on the first matrix and the second matrix.
  • Optionally, when a first device trains the first depth estimation model and the second depth estimation model, refer to the training method shown in FIG. 4. Details are not described herein again.
  • In this way, by using the depth estimation model obtained through training according to the technical solution of this application, the common edge image may be obtained based on the color image and the intermediate depth image corresponding to the color image, and the target depth image may be obtained based on the common edge image and the intermediate depth image corresponding to the color image. This can fully use prior information, namely, the color image, to obtain the common edge image, and effectively use a favorable common edge part in the color image and the intermediate depth image corresponding to the color image, to help improve precision of the target depth estimation image.
  • In an embodiment of this application, the method for training a depth estimation model further includes interaction between the first device and the terminal device. As shown in FIG. 11, the first device sends a trained depth estimation model to a second device (for example, the terminal device). In a process of using the model, the second device may reversely calculate gradient information, and feed back the gradient information to the first device, so that the first device obtains an updated depth estimation model through training.
  • S1110: The second device calculates gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image.
  • Specifically, in a process of using the model, the second device may encounter a large quantity of scenarios that do not exist in a training dataset. For example, the second device is a vehicle equipped with a computing power platform. In a traveling process of the vehicle, a binocular camera disposed in the vehicle may shoot a first color image that does not exist in the training dataset, and inference may be performed on the first color image by using the first depth estimation model and the second depth estimation model that are deployed on the computing power platform, to obtain the first target depth image. Further, the computing power platform may reversely calculate a network gradient, to obtain the gradient information.
  • S1120: The second device sends the gradient information of the first depth estimation model and the second depth estimation model to the first device, where the gradient information is used by the first device to train to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • S1130: The first device obtains the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • S1140: The second device receives the updated first depth estimation model and the updated second depth estimation model from the first device.
  • According to the technical solution of this application, the first device may obtain an updated depth estimation model through training based on gradient information calculated by the second device based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • Optionally, under a specific condition, the second device may perform S1150, to obtain the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  • In this way, the second device may train and update the depth estimation model based on the gradient information calculated based on the color image and the target depth image corresponding to the color image. This can resolve a problem of difficult upgrade after model deployment, and help improve model precision.
  • The foregoing describes in detail the depth estimation method and the method for training a depth estimation model provided in embodiments of this application with reference to FIG. 5 to FIG. 11. It may be understood that, to implement the foregoing functions, each device includes a corresponding hardware structure and/or a corresponding software module for performing each function. A person skilled in the art should be able to be aware that, in combination with the examples described in embodiments disclosed in this specification, units and algorithm steps can be implemented by hardware or a combination of hardware and computer software in this application. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
  • The following describes in detail the depth estimation apparatus and the apparatus for training a depth estimation model provided in embodiments of this application with reference to FIG. 12 to FIG. 15. It should be understood that descriptions of apparatus embodiments correspond to the descriptions of the method embodiments. Therefore, for content that is not described in detail, refer to the foregoing method embodiments. For brevity, some content is not described again.
  • FIG. 12 is a schematic diagram of a structure of an example of a depth estimation apparatus according to this application. The depth estimation apparatus 1200 shown in FIG. 12 includes an obtaining unit 1210, a processing unit 1220, and a transceiver unit 1230.
  • The obtaining unit 1210, the processing unit 1220, and the transceiver unit 1230 may be configured to perform the depth estimation method in embodiments of this application. The processing unit 1220 can implement functions of the first depth estimation model and the second depth estimation model in FIG. 5 to FIG. 9.
  • For example, the obtaining unit 1210 is configured to obtain a first color image. The processing unit 1220 is configured to: input the first color image into a first depth estimation model, to obtain a first intermediate depth image; and input the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image. The transceiver unit 1230 is configured to send gradient information to a first device, where the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  • It should be understood that the processing unit 1220 in the apparatus 1200 may be equivalent to a processor 1320 in an apparatus 1300 in the following descriptions.
  • FIG. 13 is a schematic diagram of a hardware structure of a depth estimation apparatus according to an embodiment of this application. The depth estimation apparatus 1300 shown in FIG. 13 (the apparatus 1300 may be specifically a computer device) includes a memory 1310, a processor 1320, a communication interface 1330, and a bus 1340. The memory 1310, the processor 1320, and the communication interface 1330 implement communication connection between each other through the bus 1340.
  • Optionally, the communication interface may further implement communication with another device, for example, communication with a first device.
  • The memory 1310 may be a read-only memory (read only memory, ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM). The memory 1310 may store a program. When the program stored in the memory 1310 is executed by the processor 1320, the processor 1320 and the communication interface 1330 are configured to perform steps of the depth estimation method in embodiments of this application.
  • The processor 1320 may be a general-purpose CPU, a microprocessor, an application-specific integrated circuit (application-specific integrated circuit, ASIC), a graphics processing unit (graphics processing unit, GPU), or one or more integrated circuits configured to execute a related program, to implement a function that needs to be executed by a unit in the depth estimation apparatus in embodiments of this application, or perform the depth estimation method in the method embodiments of this application.
  • Alternatively, the processor 1320 may be an integrated circuit chip and has a signal processing capability. In an implementation process, steps of the depth estimation method in embodiments of this application may be completed by using a hardware integrated logic circuit in the processor 1320 or instructions in a form of software. Alternatively, the processor 1320 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field programmable gate array (field programmable gate array, FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or perform the methods, steps, and logical block diagrams that are disclosed in embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like. The steps in the methods disclosed with reference to embodiments of this application may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of hardware and software modules in the decoding processor. A software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 1310. The processor 1320 reads information in the memory 1310, and completes, in combination with hardware of the processor, a function that needs to be performed by a unit included in the depth estimation apparatus in embodiments of this application, or performs the depth estimation method in the method embodiments of this application.
  • The communication interface 1330 uses, for example, but not limited to, a transceiver-like apparatus, to implement communication between the apparatus 1300 and another device or a communication network. For example, the first depth estimation model and/or the second depth estimation model may be obtained through the communication interface 1330.
  • The bus 1340 may include a path for transmitting information between components (for example, the memory 1310, the processor 1320, and the communication interface 1330) of the apparatus 1300.
  • FIG. 14 is a schematic block diagram of an apparatus for training a depth estimation model according to an embodiment of this application. The apparatus 1400 for training a depth estimation model shown in FIG. 14 includes an obtaining unit 1410, a training unit 1420, and a transceiver unit 1430.
  • The obtaining unit 1410, the training unit 1420, and the transceiver unit 1430 may be configured to perform the method for training a depth estimation model in embodiments of this application.
  • For example, the obtaining unit 1410 is configured to: process a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image, and process the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image. The training unit 1420 is configured to: train the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model, and train the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model. The transceiver unit 1430 is configured to: receive gradient information of the first depth estimation model and the second depth estimation model, where the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image; and send the updated first depth estimation model and the updated second depth estimation model to the second device.
  • It should be understood that the training unit 1420 in the apparatus 1400 may be equivalent to a processor 1520 in an apparatus 1500 in the following descriptions.
  • FIG. 15 is a schematic diagram of a hardware structure of an apparatus for training a depth estimation model according to an embodiment of this application. The apparatus 1500 for training a depth estimation model shown in FIG. 15 (the apparatus 1500 may be specifically a computer device) includes a memory 1510, a processor 1520, a communication interface 1530, and a bus 1540. The memory 1510, the processor 1520, and the communication interface 1530 implement communication connection between each other through the bus 1540.
  • Optionally, the communication interface may further implement communication with another device, for example, communication with a second device.
  • The memory 1510 may be a ROM, a static storage device, a dynamic storage device, or a RAM. The memory 1510 may store a program. When the program stored in the memory 1510 is executed by the processor 1520, the processor 1520 and the communication interface 1530 are configured to perform steps of the method for training a depth estimation model in embodiments of this application.
  • The processor 1520 may be a CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits configured to execute a related program, to implement a function that needs to be performed by a unit in the apparatus for training a depth estimation model in embodiments of this application, or perform the method for training a depth estimation model in the method embodiments of this application.
  • Alternatively, the processor 1520 may be an integrated circuit chip and has a signal processing capability. In an implementation process, steps of the method for training a depth estimation model in embodiments of this application may be completed by using a hardware integrated logic circuit in the processor 1520 or instructions in a form of software. The processor 1520 may alternatively be a general-purpose processor, a DSP, an ASIC, an FPGA or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or perform the methods, steps, and logical block diagrams that are disclosed in embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like. The steps in the methods disclosed with reference to embodiments of this application may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of hardware and software modules in the decoding processor. A software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 1510. The processor 1520 reads information in the memory 1510, and completes, in combination with hardware of the processor, a function that needs to be performed by a unit included in the apparatus for training a depth estimation model in embodiments of this application, or performs the method for training a depth estimation model in the method embodiments of this application.
  • The communication interface 1530 uses, for example, but not limited to, a transceiver-like apparatus, to implement communication between the apparatus 1500 and another device or a communication network. For example, first training data may be obtained through the communication interface 1530.
  • The bus 1540 may include a path for transmitting information between components (for example, the memory 1510, the processor 1520, and the communication interface 1530) of the apparatus 1500.
  • It should be noted that although only a memory, a processor, and a communication interface are shown in the apparatus 1300 shown in FIG. 13 and the apparatus 1500 shown in FIG. 15, in a specific implementation process, a person skilled in the art should understand that the apparatus 1300 and the apparatus 1500 further include other components required for normal running. In addition, based on a specific requirement, a person skilled in the art should understand that the apparatus 1300 and the apparatus 1500 each may further include a hardware component for implementing another additional function. In addition, a person skilled in the art should understand that the apparatus 1300 and the apparatus 1500 each may include only components necessary for implementing embodiments of this application, but not necessarily include all the components shown in FIG. 13 and FIG. 15.
  • A person of ordinary skill in the art may be aware that, in combination with the examples described in embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different apparatuses to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
  • It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiments. Details are not described herein again.
  • In the several embodiments provided in this application, it should be understood that the disclosed system, method, and apparatus may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, division into the units is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
  • The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be positioned in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions in embodiments.
  • In addition, function units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.
  • When the functions are implemented in the form of a software function unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this application essentially, or the part contributing to the conventional technology, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device) to perform all or some of the steps of the methods described in embodiments of this application. The foregoing storage medium includes any medium that can store program code, such as a universal serial bus flash disk (USB flash disk, UFD), where the UFD may also be referred to as a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disc.
  • The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (23)

  1. A depth estimation method, comprising:
    obtaining a first color image;
    inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image; and
    inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image, wherein the second depth estimation model is obtained through training based on a color image and a target depth image corresponding to the color image, and the first depth estimation model is obtained through training based on the color image and an intermediate depth image corresponding to the color image.
  2. The method according to claim 1, wherein the inputting the first color image and the first intermediate depth image into a second depth estimation model, to obtain a first target depth image comprises:
    obtaining a common edge image based on the first color image and the first intermediate depth image, wherein the common edge image represents a common edge part of the first color image and the first intermediate depth image; and
    obtaining the first target depth image based on the common edge image and the first intermediate depth image.
  3. The method according to claim 2, wherein the obtaining a common edge image based on the first color image and the first intermediate depth image comprises:
    splicing the first color image and the first intermediate depth image, to obtain an input matrix;
    performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and
    obtaining the common edge image based on the first matrix and the second matrix.
  4. The method according to any one of claims 1 to 3, wherein the inputting the first color image into a first depth estimation model, to obtain a first intermediate depth image comprises:
    obtaining a depth feature vector of the first color image based on the first color image, wherein the depth feature vector comprises a first depth feature vector and a second depth feature vector;
    obtaining a first target feature vector based on the first depth feature vector and a first weight value, and obtaining a second target feature vector based on the second depth feature vector and a second weight value; and
    obtaining the first intermediate depth image based on the first target feature vector and the second target feature vector.
  5. The method according to any one of claims 1 to 4, wherein the color image comprises a left view or a right view.
  6. The method according to any one of claims 1 to 5, wherein the color image is shot by one or more cameras disposed on a terminal device.
  7. The method according to claim 6, wherein the camera is a binocular camera.
  8. The method according to any one of claims 1 to 7, wherein the method further comprises:
    calculating gradient information of the first depth estimation model and the second depth estimation model based on the first color image and the first target depth image; and
    sending the gradient information to a first device, wherein the gradient information is used by the first device to obtain an updated first depth estimation model and an updated second depth estimation model through training.
  9. The method according to claim 8, wherein the method further comprises:
    receiving the updated first depth estimation model and the updated second depth estimation model from the first device.
  10. The method according to claim 8 or 9, wherein the method further comprises:
    obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  11. A method for training a depth estimation model, comprising:
    processing a color image by using a first depth estimation model, to obtain an intermediate depth image of the color image;
    processing the color image and the intermediate depth image of the color image by using a second depth estimation model, to obtain a target depth image of the color image;
    training the first depth estimation model based on the color image and the intermediate depth image of the color image, to obtain an updated first depth estimation model; and
    training the second depth estimation model based on the color image and the target depth image of the color image, to obtain an updated second depth estimation model.
  12. The training method according to claim 11, wherein the updated second depth estimation model is specifically configured to:
    obtain a common edge image based on the first color image and the first intermediate depth image, wherein the common edge image represents a common edge part of the first color image and the first intermediate depth image; and
    obtain the first target depth image based on the common edge image and the first intermediate depth image.
  13. The training method according to claim 12, wherein the obtaining a common edge image based on the first color image and the first intermediate depth image comprises:
    splicing the first color image and the first intermediate depth image, to obtain an input matrix;
    performing dimension reduction on the input matrix, to obtain a first matrix and a second matrix; and
    obtaining the common edge image based on the first matrix and the second matrix.
  14. The training method according to any one of claims 11 to 13, wherein the updated first depth estimation model is specifically configured to:
    obtain a depth feature vector of the first color image based on the first color image, wherein the depth feature vector comprises a first depth feature vector and a second depth feature vector;
    obtain a first target feature vector based on the first depth feature vector and a first weight value, and obtain a second target feature vector based on the second depth feature vector and a second weight value; and
    obtain the first intermediate depth image based on the first target feature vector and the second target feature vector.
  15. The training method according to any one of claims 11 to 14, wherein the color image comprises a left view or a right view.
  16. The training method according to any one of claims 11 to 15, wherein the color image is shot by one or more cameras disposed on a terminal device.
  17. The training method according to claim 16, wherein the camera is a binocular camera.
  18. The training method according to any one of claims 11 to 17, wherein the training method further comprises:
    receiving gradient information of the first depth estimation model and the second depth estimation model, wherein the gradient information is obtained by a second device through calculation based on the first color image and the first target depth image; and
    obtaining the updated first depth estimation model and the updated second depth estimation model through training based on the gradient information.
  19. The training method according to claim 18, wherein the training method further comprises:
    sending the updated first depth estimation model and the updated second depth estimation model.
  20. A depth estimation apparatus, wherein the apparatus comprises a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the method according to any one of claims 1 to 10.
  21. An apparatus for training a depth estimation model, wherein the apparatus comprises a processor and a data interface, and the processor reads, through the data interface, instructions stored in a memory, to perform the method according to any one of claims 11 to 19.
  22. A computer-readable storage medium, wherein the computer-readable medium stores program code used for execution by a device, and the program code comprises instructions used to perform the method according to any one of claims 1 to 10 or any one of claims 11 to 19.
  23. A computer program product, wherein when the computer program is executed on a computer, the computer is enabled to perform the method according to any one of claims 1 to 10 or any one of claims 11 to 19.
EP22874624.4A 2021-09-29 2022-09-14 Depth estimation method, method for training depth estimation model, and apparatus and system thereof Active EP4379660B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111154326.6A CN115908520B (en) 2021-09-29 2021-09-29 Depth estimation methods, training methods for depth estimation models, and their devices and systems
PCT/CN2022/118614 WO2023051237A1 (en) 2021-09-29 2022-09-14 Depth estimation method, method for training depth estimation model, and apparatus and system thereof

Publications (3)

Publication Number Publication Date
EP4379660A1 true EP4379660A1 (en) 2024-06-05
EP4379660A4 EP4379660A4 (en) 2024-11-27
EP4379660B1 EP4379660B1 (en) 2026-04-29

Family

ID=85732147

Family Applications (1)

Application Number Title Priority Date Filing Date
EP22874624.4A Active EP4379660B1 (en) 2021-09-29 2022-09-14 Depth estimation method, method for training depth estimation model, and apparatus and system thereof

Country Status (4)

Country Link
US (1) US20240265572A1 (en)
EP (1) EP4379660B1 (en)
CN (1) CN115908520B (en)
WO (1) WO2023051237A1 (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9363499B2 (en) * 2013-11-15 2016-06-07 Htc Corporation Method, electronic device and medium for adjusting depth values
CN108510535B (en) * 2018-03-14 2020-04-24 大连理工大学 High-quality depth estimation method based on depth prediction and enhancer network
GB2576548B (en) * 2018-08-23 2021-11-03 Sony Interactive Entertainment Inc Method and system for reconstructing colour and depth information of a scene
CN111192305B (en) * 2018-11-15 2023-11-21 百度在线网络技术(北京)有限公司 Method and apparatus for generating three-dimensional image
US11386671B2 (en) * 2019-06-25 2022-07-12 Zoox, Inc. Refining depth from an image
CN112464690B (en) * 2019-09-06 2025-03-11 广州虎牙科技有限公司 Living body recognition method, device, electronic device and readable storage medium
WO2021114184A1 (en) * 2019-12-12 2021-06-17 华为技术有限公司 Neural network model training method and image processing method, and apparatuses therefor
US11315266B2 (en) * 2019-12-16 2022-04-26 Robert Bosch Gmbh Self-supervised depth estimation method and system
CN112001914B (en) * 2020-08-31 2024-03-01 三星(中国)半导体有限公司 Method and device for depth image completion
CN115500083A (en) * 2021-04-19 2022-12-20 谷歌有限责任公司 Depth Estimation Using Neural Networks

Also Published As

Publication number Publication date
WO2023051237A1 (en) 2023-04-06
EP4379660A4 (en) 2024-11-27
CN115908520B (en) 2026-01-30
EP4379660B1 (en) 2026-04-29
CN115908520A (en) 2023-04-04
US20240265572A1 (en) 2024-08-08

Similar Documents

Publication Publication Date Title
US11276230B2 (en) Inferring locations of 3D objects in a spatial environment
EP3822852B1 (en) Method, apparatus, computer storage medium and program for training a trajectory planning model
US10817752B2 (en) Virtually boosted training
Yu et al. Vehicle detection and localization on bird's eye view elevation images using convolutional neural network
Li et al. Human-like decision making of artificial drivers in intelligent transportation systems: An end-to-end driving behavior prediction approach
JP2023549036A (en) Efficient 3D object detection from point clouds
CN115273002A (en) Image processing method, device, storage medium and computer program product
US20250166352A1 (en) Methods and systems of sensor fusion in cooperative perception systems
JP6979228B2 (en) A learning method and learning device that integrates the space detection results of other autonomous vehicles acquired by V2V communication with the space detection results of its own autonomous vehicle, and a test method and test device that uses this {LEARNING METHOD AND LEARNING DEVICE FOR INTEGRATING OBJECT DETECTION INFORMATION ACQUIRED THROUGH V2V COMMUNICATION FROM OTHER AUTONOMOUS VEHICLE WITH OBJECT DETECTION INFORMATION GENERATED BY PRESENT AUTONOMOUS VEHICLE, AND TESTING METHOD AND TESTING DEVICE USING THE SAME}
WO2022217434A1 (en) Cognitive network, method for training cognitive network, and object recognition method and apparatus
CN111292366A (en) Visual driving ranging algorithm based on deep learning and edge calculation
US12387503B2 (en) Adversarial object-aware neural scene rendering for 3D object detection
EP4296896A1 (en) Perceptual network and data processing method
CN116868239A (en) Static occupancy tracking
US20230196749A1 (en) Training Neural Networks for Object Detection
CN115731530A (en) Model training method and device
Lu et al. Hierarchical end-to-end autonomous driving: Integrating BEV perception with deep reinforcement learning
Aboah et al. Ai-based framework for understanding car following behaviors of drivers in a naturalistic driving environment
CN116300928A (en) Data processing method and data processing model training method for vehicles
EP4379660A1 (en) Depth estimation method, method for training depth estimation model, and apparatus and system thereof
CN119360178A (en) Point cloud processing method, point cloud processing device and intelligent driving vehicle
CN115700200B (en) Processing environmental data of vehicles
US20230368544A1 (en) Device and system for autonomous vehicle control
Munir et al. Visuomotor Steering angle Prediction in Dynamic Perception Environment for Autonomous Vehicle
Zong et al. Unmanned Aerial Vehicle for Multi-target Tracking Using Pursuit-Evasion Game Model and Deep Reinforcement Learning

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20240301

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

A4 Supplementary search report drawn up and despatched

Effective date: 20241025

RIC1 Information provided on ipc code assigned before grant

Ipc: G06T 7/50 20170101AFI20241021BHEP

RAP1 Party data changed (applicant data changed or rights of an application transferred)

Owner name: SHENZHEN YINWANG INTELLIGENTTECHNOLOGIES CO., LTD.

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)
GRAP Despatch of communication of intention to grant a patent

Free format text: ORIGINAL CODE: EPIDOSNIGR1

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: GRANT OF PATENT IS INTENDED

RIC1 Information provided on ipc code assigned before grant

Ipc: G06T 7/50 20170101AFI20251123BHEP

Ipc: G06N 3/0455 20230101ALI20251123BHEP

Ipc: G06N 3/0464 20230101ALI20251123BHEP

Ipc: G06N 3/048 20230101ALI20251123BHEP

Ipc: G06N 3/084 20230101ALI20251123BHEP

Ipc: G06N 3/088 20230101ALI20251123BHEP

Ipc: G06N 3/098 20230101ALI20251123BHEP

Ipc: G06V 10/774 20220101ALI20251123BHEP

Ipc: G06V 10/82 20220101ALI20251123BHEP

INTG Intention to grant announced

Effective date: 20251205

GRAS Grant fee paid

Free format text: ORIGINAL CODE: EPIDOSNIGR3

GRAA (expected) grant

Free format text: ORIGINAL CODE: 0009210

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE PATENT HAS BEEN GRANTED

AK Designated contracting states

Kind code of ref document: B1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

REG Reference to a national code

Ref country code: CH

Ref legal event code: F10

Free format text: ST27 STATUS EVENT CODE: U-0-0-F10-F00 (AS PROVIDED BY THE NATIONAL OFFICE)

Effective date: 20260429