US 12,333,766 B2
Method for training depth estimation model, electronic device and readable storage medium
Jung-Hao Yang, New Taipei (TW); Chih-Te Lu, New Taipei (TW); and Chin-Pin Kuo, New Taipei (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on Aug. 22, 2022, as Appl. No. 17/892,288.
Claims priority of application No. CN202210706746.9 (CN), filed on Jun. 21, 2022.
Prior Publication US 2023/0410373 A1, Dec. 21, 2023
Int. Cl. G06T 7/00 (2017.01); G06T 7/593 (2017.01)
CPC G06T 7/97 (2017.01) [G06T 7/593 (2017.01); G06T 2207/20081 (2013.01); G06T 2207/20228 (2013.01)] 20 Claims
OG exemplary drawing
 
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.