| CPC G06T 7/97 (2017.01) [G06T 7/593 (2017.01); G06T 2207/20081 (2013.01); G06T 2207/20228 (2013.01)] | 20 Claims |

|
1. A method for training a depth estimation model applied to an electronic device, the method comprising:
obtaining a pair of images from a training data set, the pair of images comprising a first left image and a first right image;
obtaining a disparity map by inputting the first left image into a depth estimation model;
obtaining a second right image by adding the first left image to the disparity map;
converting the first left image into a third right image according to internal parameters and external parameters of a camera device, comprising: obtaining a second left image by transforming the first left image from a coordinate system of a left camera of the camera device to a world coordinate system according to the internal parameters and the external parameters of the left camera; and obtaining the third right image by transforming the second left image from the world coordinate system to a coordinate system of a right camera of the camera device according to the internal parameters and the external parameters of the right camera;
obtaining a mask image by performing a binarization processing on a pixel value of each of pixel points of the third right image;
obtaining a loss value of the depth estimation model by calculating a mean square error of pixel values of all corresponding pixel points of the first right image, the second right image, and the mask image; and
iteratively training the depth estimation model according to the loss value.
|