Patent ID: 11943419
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Audio-visual technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 7:
8. A method of training an image processing model, the method comprising:
receiving a plurality of tuples of images, each tuple of images comprising a pair of images representing a common scene and a refocused training image of the scene;
for each tuple of images:
(i) processing the pair of images using the image processing model to estimate a map indicating depth information for the scene;
(ii) for each of a plurality of planes associated with respective depths within the image:
generating a depth mask having values indicating whether regions of an input image are within a specified range of the plane, wherein an assessment of whether a region is within the specified range of the plane is made through an evaluation of a differentiable function of a range between regions of the input image and the plane as determined from the map, wherein the differentiable function varies smoothly between a lower bound and an upper bound that defines a function value range, the differentiable function having a value within a first half of its range when an image region for which the differentiable function is being evaluated is within the specified range of the plane, and having a value within a second half of its range when an image region for which the differentiable function is being evaluated is not within the specified range of the plane;
generating a masked image from the input image and the depth mask; and
refocusing the masked image using a blurring kernel to generate a refocused partial image;

(iii) generating a refocussed image from the refocussed partial images;
(iv) estimating a difference between the refocused image and the refocused training image to obtain an estimated difference; and
(v) adapting the image processing model in dependence on the estimated difference.