WO2020230214A1 - 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム - Google Patents

深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム Download PDF

Info

Publication number
WO2020230214A1
WO2020230214A1 PCT/JP2019/018831 JP2019018831W WO2020230214A1 WO 2020230214 A1 WO2020230214 A1 WO 2020230214A1 JP 2019018831 W JP2019018831 W JP 2019018831W WO 2020230214 A1 WO2020230214 A1 WO 2020230214A1
Authority
WO
WIPO (PCT)
Prior art keywords
depth
learning
depth map
image
error
Prior art date
Application number
PCT/JP2019/018831
Other languages
English (en)
French (fr)
Inventor
豪 入江
川西 隆仁
柏野 邦夫
Original Assignee
日本電信電話株式会社
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 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to JP2021519054A priority Critical patent/JP7272428B2/ja
Priority to PCT/JP2019/018831 priority patent/WO2020230214A1/ja
Priority to US17/609,717 priority patent/US20220215567A1/en
Publication of WO2020230214A1 publication Critical patent/WO2020230214A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • G06V20/647Three-dimensional objects by matching two-dimensional images to three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Definitions

  • the disclosed technology relates to a depth estimation device, a depth estimation model learning device, a depth estimation method, a depth estimation model learning method, and a depth estimation program.
  • label a technology for predicting the name of a subject (hereinafter, simply referred to as "label") appearing in an image.
  • label a technology for predicting the name of a subject (hereinafter, simply referred to as "label" appearing in an image.
  • the desirable operation when this image is input to a model having a predetermined image recognition function is to output the label "apple” or to output the label of the image.
  • the label "apple” is assigned to the set of pixels that represent the area in which the apple appears.
  • the robot identifies the target product to be moved from the various products on the goods shelf. (2) The robot grips the specified product. (3) The robot moves or transports the specified product to the target product shelf. (4) The robot arranges the specified products so as to have a desired layout.
  • the image recognition technology provided by the robot can recognize the goods shelves, products, and goods shelves, and in addition to this, the structure of the goods shelves or the posture (position, angle, size, etc.) of the object, etc. It is necessary to be able to accurately recognize the dimensional shape.
  • the typical image recognition technology as described above does not have a function of estimating such a shape, and a separate technique for estimating the shape is required.
  • the shape of the article is recognized by obtaining the width of the article, the height of the article, the depth of the article, and the like. From the image of the article, the width of the article and the height of the article can be recognized, but the depth representing the information about the depth direction of the article cannot be recognized. Therefore, in order to make the depth of the article recognizable, it is conceivable to use an image showing two or more articles taken from different viewpoints, for example, as in the method described in Patent Document 1. Alternatively, in order to make the depth of the article recognizable, it is conceivable to use a stereo camera or the like.
  • the deep neural network accepts an image as input. Then, the deep neural network outputs the depth of each pixel of the received image. As a premise of this, training is performed on the deep neural network so that the estimation error between the depth of the image for training and the depth of the correct answer is small. In this case, what is particularly important is how to train the deep neural network.
  • Non-Patent Document 1 a network based on Deep Residual Network (ResNet) disclosed in Non-Patent Document 2 is learned by using Revase Huber loss (hereinafter, simply referred to as “BerHu loss”). The method of making it is disclosed.
  • BerHu loss is a piecewise function. Specifically, the BerHu loss takes a loss value that increases linearly with an increase in the error in the portion where the error of the depth estimation is small, and is quadratic according to the increase in the error in the portion where the error of the depth estimation is large. It is a function that takes the loss value that increases with the function.
  • Non-Patent Document 3 discloses a method of learning a network similar to Non-Patent Document 1 by using L1 loss, which is a function that increases linearly with an increase in error.
  • Non-Patent Documents 1 to 3 are learned with a weight equal to or greater than that of a region having a large estimation error and a region having a small estimation error, such as L1 loss or BerHu loss.
  • a loss function that requires that. This corresponds to learning the network by focusing on the region where the estimation error is large among the pixels of the image whose depth is estimated more than the region where the estimation error is small.
  • the area where the estimation error is large is the part where the distance between the camera and the subject is physically long, or the area has a very complicated depth structure in the first place. It is often an area where the depth is uncertain even when viewed on the image.
  • the disclosed technology was made in view of the above points, and aims to accurately estimate the depth of the space reflected in the image.
  • the first aspect of the present disclosure is a depth estimation device, in which the depth of a space in which an acquisition unit that acquires an input image and an input image acquired by the acquisition unit are reflected in the image is the pixel of the image.
  • the depth estimator includes a depth map generator that inputs to a depth estimator for generating a depth map assigned to the image and generates an estimated depth map representing the depth map corresponding to the input image. For each of the errors between the depth of the estimated depth map for learning and the depth of the correct depth map representing the correct depth map, the degree of increase in the loss value for pixels whose error is greater than the threshold is determined. This is a model trained in advance so that the value of the loss function, which is set so that the error is smaller than the degree of increase in the loss value for pixels having a threshold value or less, becomes smaller.
  • a second aspect of the present disclosure is a depth estimation device, wherein the loss function increases with respect to an increase in the error according to the root of the error when the error is greater than the threshold. It is a function that takes a value and takes the loss value that increases linearly with the increase of the error when the error is equal to or less than the threshold.
  • a third aspect of the present disclosure is a depth estimation model learning device for generating an image for learning and a depth map in which the depth of the space reflected in the image is given to each pixel of the image.
  • a learning depth map generator that inputs to a depth estimator to generate an estimated depth map for learning, which is the depth map corresponding to the image for learning, and a learning depth map generator generated by the learning depth map generator.
  • the degree of increase in the loss value for a pixel whose error between the depth of the estimated depth map for learning and the depth of the correct depth map representing the correct depth map is greater than the threshold is greater than or equal to the threshold.
  • It includes a learning unit that trains the depth estimator so that the value of the loss function, which is set to be smaller than the degree of increase in the loss value for a certain pixel, becomes small.
  • a fourth aspect of the present disclosure is a depth estimation model learning device, wherein the loss function becomes the loss value that increases linearly with the increase of the error when the error is equal to or less than the threshold value.
  • the loss function becomes the loss value that increases linearly with the increase of the error when the error is equal to or less than the threshold value.
  • the error is larger than the threshold value, it is a function that becomes the loss value that changes linearly with respect to the power root of the error.
  • a fifth aspect of the present disclosure is a depth estimation model learning device, wherein the learning unit further includes an edge representing the degree of change in the depth of the estimated depth map for learning and the depth of the correct answer depth map.
  • the depth estimator is trained so that the error between the edge and the edge representing the degree of change of is small.
  • a sixth aspect of the present disclosure is a depth estimation method, which is a depth map in which an input image is acquired and the depth of the space in which the acquired input image is reflected in the image is given to each pixel of the image.
  • a depth estimation method in which a computer executes a process of inputting to a depth estimator for generating an image and generating an estimated depth map representing the depth map corresponding to the input image.
  • the depth estimator is a learning method. For each of the errors between the depth of the estimated depth map and the depth of the correct depth map representing the correct depth map, the degree of increase in the loss value for pixels whose error is greater than the threshold is the error.
  • This is a pre-learned model so that the value of the loss function, which is set to be smaller than the degree of increase in the loss value for pixels whose value is less than or equal to the threshold value, becomes smaller.
  • a seventh aspect of the present disclosure is a depth estimation model learning method for generating an image for learning and a depth map in which the depth of the space reflected in the image is given to each pixel of the image.
  • Input to the depth estimator to generate an estimated depth map for learning which is the depth map corresponding to the image for learning, and the depth of the generated estimated depth map for learning and the correct depth.
  • the degree of increase in the loss value for pixels whose error between the correct depth map representing the map and the depth is greater than the threshold value is set to be smaller than the degree of increase in the loss value for pixels whose error is less than or equal to the threshold value.
  • the computer executes a process of training the depth estimator so that the value of the loss function being set is small.
  • An eighth aspect of the present disclosure is a depth estimation program, which is a depth map in which an input image is acquired and the depth of the space in which the acquired input image is reflected in the image is given to each pixel of the image.
  • a depth estimation program for causing a computer to execute a process of inputting to a depth estimator for generating an image and generating an estimated depth map representing the depth map corresponding to the input image.
  • the degree of increase in the loss value for pixels whose error is greater than the threshold is determined.
  • This is a model trained in advance so that the value of the loss function, which is set so that the error is smaller than the degree of increase in the loss value for pixels having a threshold value or less, becomes smaller.
  • the depth of the space reflected in the image can be estimated accurately.
  • FIG. 1 is a block diagram showing a hardware configuration of the depth estimation device 10 of the first embodiment.
  • the depth estimation device 10 of the first embodiment includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, and an input unit 15. It has a display unit 16 and a communication interface (I / F) 17. Each configuration is communicably connected to each other via a bus 19.
  • CPU Central Processing Unit
  • ROM Read Only Memory
  • RAM Random Access Memory
  • I / F communication interface
  • the CPU 11 is a central arithmetic processing unit that executes various programs and controls each part. That is, the CPU 11 reads the program from the ROM 12 or the storage 14, and executes the program using the RAM 13 as a work area. The CPU 11 controls each of the above configurations and performs various arithmetic processes according to the program stored in the ROM 12 or the storage 14. In the present embodiment, the ROM 12 or the storage 14 stores various programs for processing the information input from the input device.
  • the ROM 12 stores various programs and various data.
  • the RAM 13 temporarily stores a program or data as a work area.
  • the storage 14 is composed of an HDD (Hard Disk Drive) or an SSD (Solid State Drive), and stores various programs including an operating system and various data.
  • the input unit 15 includes a pointing device such as a mouse and a keyboard, and is used for performing various inputs.
  • the display unit 16 is, for example, a liquid crystal display and displays various types of information.
  • the display unit 16 may adopt a touch panel method and function as an input unit 15.
  • the communication interface 17 is an interface for communicating with other devices such as an input device, and for example, standards such as Ethernet (registered trademark), FDDI, and Wi-Fi (registered trademark) are used.
  • Ethernet registered trademark
  • FDDI FDDI
  • Wi-Fi registered trademark
  • FIG. 2 is a block diagram showing an example of the functional configuration of the depth estimation device 10.
  • the depth estimation device 10 has a learning acquisition unit 101, a learning data storage unit 102, a depth estimator storage unit 103, a learning depth map generation unit 104, and a learning unit 105 as functional configurations. It has an acquisition unit 201 and a depth map generation unit 202.
  • Each functional configuration is realized by the CPU 11 reading out the depth estimation model learning program and the depth estimation program stored in the ROM 12 or the storage 14, deploying them in the RAM 13, and executing them.
  • the learning acquisition unit 101 acquires a plurality of learning image data.
  • Each of the learning image data, the image I i for learning is data and correct depth map T i is associated.
  • the correct answer depth map Ti is a correct answer depth map in which the depth of the space reflected in the learning image I i is given to each pixel of the image in advance.
  • the depth of the present embodiment represents the distance in the depth direction between the position of the camera in which the image is captured and the subject in the image. Any unit of distance representing the depth can be used. For example, meters or millimeters may be used as a unit of distance representing depth.
  • the depth in the depth direction of the space reflected in the image is given to each pixel of the image.
  • the depth map is two-dimensional data having the same width and height as the image captured by the camera.
  • i is an index for identifying the image data for learning.
  • the depth map may be correct depth map T i obtained using the general depth camera. Or, on the basis of depth was measured using an image captured by a stereo camera may generate the correct depth map T i. Or based on the measured depth with a plurality of images, may be generated correct depth map T i.
  • each of the plurality of learning image data is stored in the learning data storage unit 102.
  • a plurality of learning image data are stored in the learning data storage unit 102.
  • a single learning image data, and correct depth map T i of the image I i and image I i for the learning of the learning is associated.
  • the depth estimator storage unit 103 stores a depth estimator f for generating a depth map from an image.
  • the depth estimator f is updated by the learning unit 105 described later.
  • the depth estimator f an arbitrary function capable of outputting a depth map or depth by inputting an image or a pixel value is used.
  • a neural network can be used as the depth estimator f.
  • the neural network can be configured arbitrarily as long as it can realize the above input / output relationship.
  • the neural network for example, the neural network described in Non-Patent Document 1 or Non-Patent Document 2 can be used.
  • a neural network based on DenseNet described in Reference 1 below can be used.
  • the configuration of the neural network as the depth estimator f is not limited to this, and may be any configuration as long as the above input / output relationship is satisfied.
  • the depth estimation device 10 of the present embodiment executes two different processes, a depth estimation process for obtaining a depth map of an image using the depth estimator f and a depth estimation model learning process for learning the depth estimator f. ..
  • the depth estimation model learning process is a process that needs to be performed at least once before estimating the depth of the image.
  • the depth estimation model learning process is a process for appropriately determining weights, which are parameters of the neural network, based on learning image data.
  • the depth estimation model learning process will be described first, and then the depth estimation process will be described.
  • the learning unit 105 stores the depth of each pixel of the learning estimated depth map Di i generated by the learning depth map generation unit 104 with respect to the same learning image I i , and the learning data storage unit 102. It was used and the depth of each pixel of the correct depth map T i, a loss function that outputs the loss value corresponding to the error between the, to learn the depth estimator f.
  • the depth of each pixel of the estimated depth map D i for the learning and the depth of each pixel of the correct depth map T i is originally should take the same value. However, if the accuracy of the estimated depth estimator f is low, and depth of each pixel of the estimated depth map D i for learning, the error between the depth of each pixel of the correct depth map T i may occur.
  • the depth estimator f is trained so that the predetermined loss function becomes smaller.
  • the estimated depth map D i for learning it is preferred that taking larger loss value error is large between depth of each pixel of the depth and correct depth map T i of each pixel, the loss function is designed.
  • the Non-Patent Document 3 discloses that the error summation loss function between the depth of each pixel of the estimated depth map D i for the learning and the depth of each pixel of the correct depth map T i Has been done.
  • loss function l L1 can be determined as shown in the following equation (1).
  • X i represents the domain of x
  • Y i represents the domain of y
  • x and y represent the positions of pixels on each depth map.
  • N is the number of pairs of the learning image and the correct answer depth map included in the learning image data, or a constant less than that.
  • the loss function of the above formula (1) the correct answer depth map T error between depth of each pixel of the estimated depth map D i for depth and learning of each pixel of the i
  • loss value loss function takes the above formula (1) is reduced, updates the parameters of the depth estimator f By doing so, it is possible to obtain a depth estimator f capable of outputting an estimated depth map.
  • the loss function represented by the following equation (2) may be used.
  • Loss function of the above formula (2) is correct depth map T i error between depth of each pixel of the estimated depth map D i for depth and learning of each pixel of
  • the threshold value is c or less
  • the function is such that the degree of increase in the loss value according to the increase in the error
  • the loss function of the above equation (2) when the error
  • the degree of increase is a quadratic function of the error
  • the distance between the camera and the subject may be physically long.
  • in the depth map may be a portion having a very complicated depth structure.
  • Such areas of the depth map are often areas of uncertainty. For this reason, such a portion of the depth map is often not a region where the depth can be estimated accurately by the depth estimator f. Therefore, learning with emphasis on the region including the pixel having a large error
  • in the depth map does not necessarily improve the accuracy of the depth estimator f.
  • the loss function of the above equation (1) always takes the same loss value regardless of the magnitude of the error
  • the loss function of the above equation (2) is designed to take a larger loss value when the error
  • the first loss function which is a loss function as shown below, is used.
  • First loss function l 1 (T i, D i ) the value of the error
  • the loss value increases linearly with the increase of
  • the value of the first loss function l 1 ( Ti , Di ) is such that when the error
  • in is larger than the threshold c pixels,
  • the learning unit 105 first loss function l 1 (T i, D i) of the above formula (3) so that the value of the decreases, the depth estimator f stored in the depth estimator storage unit 103 Let them learn.
  • first loss function l 1 of (T i, D i) is a piecewise differentiable with respect to the parameters w depth estimator storage unit 103 to the stored depth estimator f .. Therefore, the parameter w of the depth estimator f can be updated by the gradient method. For example, when the learning unit 105 learns the parameter w of the depth estimator f based on the stochastic gradient descent method, the learning unit 105 updates the parameter w based on the following equation (4) per step.
  • is a preset coefficient.
  • the learning unit 105 may introduce an improvement method of a general stochastic gradient descent method, such as using a momentum term or using weight attenuation when learning the parameter w of the depth estimator f. .. Alternatively, the learning unit 105 may train the parameter w of the depth estimator f by using another gradient descent method.
  • the learning unit 105 stores the parameter w of the learned depth estimator f in the depth estimator storage unit 103. As a result, the depth estimator f for accurately estimating the depth map is obtained.
  • the depth estimation device 10 receives the input image of the depth map generation target and generates the estimated depth map of the input image.
  • the acquisition unit 201 acquires the input image of the depth map generation target.
  • the depth map generation unit 202 inputs the input image acquired by the acquisition unit 201 into the depth estimator f stored in the depth estimator storage unit 103, and outputs an estimated depth map representing the depth map corresponding to the input image. Generate.
  • the depth estimator f stored in the depth estimator storage unit 103 is a model that has been trained in advance so as to minimize the loss function shown in the above equation (3), the estimated depth map for the input image can be obtained. It is generated accurately.
  • FIG. 3 is a flowchart showing the flow of the depth estimation model learning process by the depth estimation device 10.
  • the depth estimation model learning process is performed by the CPU 11 reading the depth estimation model learning processing program from the ROM 12 or the storage 14, expanding the program into the RAM 13 and executing the program.
  • FIG. 3 is a flowchart showing the flow of the depth estimation model learning process by the depth estimation device 10.
  • the depth estimation model learning process is performed by the CPU 11 reading the depth estimation model learning processing program from the ROM 12 or the storage 14, expanding the program into the RAM 13 and executing the program.
  • the CPU 11 acquires, for example, a plurality of learning data input from the input unit 15 as the learning acquisition unit 101, and stores them in the learning data storage unit 102. Then, when the CPU 11 receives the instruction signal for executing the learning process, the CPU 11 executes the depth estimation model learning process shown in FIG.
  • step S100 the CPU 11 reads out each of the learning images I i stored in the learning data storage unit 102 as the learning depth map generation unit 104.
  • step S102 the CPU 11 reads out the depth estimator f stored in the depth estimator storage unit 103 as the learning depth map generation unit 104.
  • step S104 the CPU 11 inputs each of the learning images I i read in step S100 to the depth estimator f read in step S102 as the learning depth map generation unit 104. , it generates an estimated depth map D i for learning corresponding to the image I i for the learning.
  • step S106 CPU 11 has the learning unit 105, for each image I i for a plurality of learning, for the image I i for the same training, the estimated depth map D i for learning generated in step S104 and depth of each pixel, the loss value of the depth of each pixel of the correct depth map T i stored in the learning data storage unit 102, corresponding to the error between the loss function l 1 (T i, D i ) Calculate each.
  • step S108 CPU 11 has the learning unit 105, based on each of the calculated loss values in step S106, the loss function l 1 (T i, D i ) of the above formula (3) so as to minimize , The depth estimator f is trained. Then, the CPU 11 stores the learned depth estimator f in the depth estimator storage unit 103 as the learning unit 105.
  • step S110 the CPU 11 determines whether or not the repetition end condition is satisfied as the learning unit 105. If the repeat end condition is satisfied, the process ends. On the other hand, if the repetition end condition is not satisfied, the process returns to step S100. Each process of steps S100 to S108 is repeated until the end condition is satisfied.
  • the end conditions are set in advance.
  • the repetition condition for example, "end when a predetermined number of times (for example, 100 times, etc.) is repeated” or "end when the decrease in the loss value is within a certain range for a certain number of repetitions" is set.
  • the parameter w of the depth estimator f is updated, and the depth estimator f for accurately estimating the depth map is stored in the depth estimator storage unit 103. become.
  • the CPU 11 executes the depth estimation process shown in FIG.
  • step S200 the CPU 11 acquires the input image as the acquisition unit 201.
  • step S202 the CPU 11 reads out the depth estimator f stored in the depth estimator storage unit 103 as the depth map generation unit 202.
  • step S204 the CPU 11 inputs the input image acquired in step S200 to the depth estimator f read in step S202 as the depth map generation unit 202, and obtains a depth map corresponding to the input image. Generate an estimated depth map to represent.
  • step S206 the CPU 11 outputs the estimated depth map generated in step S204 as the depth map generation unit 202, and ends the depth estimation process.
  • the depth estimation device 10 of the present embodiment inputs the image for learning to the depth estimator and generates an estimated depth map for learning which is a depth map corresponding to the image for learning.
  • the depth estimation device determines the degree of increase in the loss value for pixels whose error is larger than the threshold value for each error between the depth of the generated estimated depth map for learning and the depth of the correct depth map.
  • the depth estimator is trained so that the value of the loss function, which is set to be smaller than the degree of increase in the loss value for pixels below the threshold value, becomes small. This makes it possible to obtain a depth estimator for accurately estimating the depth of the space reflected in the image.
  • the depth estimation device 10 of the present embodiment inputs an input image to a depth estimator for generating a depth map in which the depth of the space reflected in the image is given to each pixel of the image. Generate an estimated depth map corresponding to the input image. As a result, the depth of the space reflected in the image can be estimated accurately.
  • the loss corresponding to the region where the error is large, which is a place where the depth is difficult to estimate, is reduced in importance.
  • the depth estimator f is trained using a function. By using the loss function as shown in the above equation (3), learning by the depth estimator f is surely performed for the pixel region having low uncertainty and small error. On the other hand, as shown in the above equation (3), the importance of the pixel region having high uncertainty and large error is reduced and the depth estimator f is learned. From this, it is possible to obtain a depth estimator f for accurately estimating the depth map.
  • the second embodiment Since the configuration of the depth estimation device according to the second embodiment has the same configuration as that of the first embodiment, the same reference numerals are given and the description thereof will be omitted.
  • the depth estimation device 10 of the second embodiment further reduces the error between the edge representing the degree of change in the depth of the estimated depth map for learning and the edge representing the degree of change in the depth of the correct answer depth map. It is different from the first embodiment in that the depth estimator f is trained.
  • the estimated depth map generated by the depth estimator f obtained by the depth estimator of the first embodiment may be blurred as a whole.
  • the generated estimated depth map may be overly smooth and totally blurred.
  • Such an estimated depth map has a problem that the depth of the sharply changing edge portion is not accurately reproduced.
  • an estimated depth map that is totally blurry may not accurately reproduce the depth at the boundary of a wall or an object.
  • the depth estimation device 10 of the second embodiment further trains the depth estimator f in order to generate a more accurate estimation depth map.
  • a desirable state of the depth estimator f is that the edge of the estimated depth map generated by the depth estimator f and the edge of the correct depth map are close to each other. Therefore, in the second embodiment, the second loss function represented by the following equation (5) is introduced. Then, the depth estimator 10 of the second embodiment further updates the parameter w of the depth estimator f so as to minimize the second loss function l 2 of the following equation (5).
  • E in the formula (5) is an edge detector
  • E (T i (x, y)) is the coordinates after application of the edge detectors E to correct depth map T i (x, y) Represents the above value.
  • E (D i (x, y)) represents the value of the coordinates (x, y) after application of the edge detectors E to the estimated depth map D i for learning.
  • any edge detector may be used as long as it is a differentiable detector.
  • a Sobel filter can be used as an edge detector. Since the Sobel filter can be described as a convolution operation, it also has an advantage that it can be easily implemented as a convolution layer of a convolutional neural network.
  • the learning unit 105 of the second embodiment correct depth map T i of depth edges E (T i (x, y )) representing the degree of change between a predicted depth map D i depth for learning
  • the depth estimator f is further trained so that the error with the edge E ( Di (x, y)) indicating the degree of change is small.
  • the learning unit 105 of the second embodiment further learns the depth estimator f so that the second loss function l 2 represented by the above equation (5) becomes smaller.
  • the equation second defined in (5) loss function l 2 (T i, D i) also, as long as the edge detector E is differentiable, piecewise differentiable with respect to the parameters w depth estimator f is there. Therefore, the parameter w of the depth estimator f can be updated by the gradient method. For example, when the learning unit 105 of the second embodiment learns the parameter w of the depth estimator f based on the stochastic gradient descent method, the learning unit 105 updates the parameter w based on the following equation (6) per step. .. In addition, ⁇ is a preset coefficient.
  • the differential value of the loss function l 2 with respect to any parameter w of the depth estimator f can be calculated by the error back propagation method.
  • the learning unit 105 may introduce an improvement method of a general stochastic gradient descent method, such as using a momentum term or using weight attenuation when learning the parameter w of the depth estimator f. .. Alternatively, the learning unit 105 may train the parameter w of the depth estimator f by using another gradient descent method.
  • FIG. 5 is a flowchart showing the flow of the depth estimation model learning process by the depth estimation device 10 of the second embodiment.
  • step S112 the CPU 11 reads out each of the learning images I i stored in the learning data storage unit 102 as the learning depth map generation unit 104.
  • step S114 the CPU 11 reads out the depth estimator f stored in the depth estimator storage unit 103 as the learning depth map generation unit 104.
  • step S116 the CPU 11 inputs each of the learning images I i read in step S112 into the depth estimator f read in step S114 as the learning depth map generation unit 104. , it generates an estimated depth map D i for learning corresponding to the image I i for the learning.
  • step S118 CPU 11 has the learning unit 105, for each image I i for a plurality of learning, for the image I i for the same training, the estimated depth map D i for learning generated in step S116 and depth of each pixel, the second loss function l 2 (T i, D i) loss value corresponding to the error between the depth of each pixel of the stored in the learning data storage unit 102 correct depth map T i Calculate each of.
  • step S120 CPU 11 has the learning unit 105, based on the respective loss value calculated by the step S118, the second loss function l 2 (T i, D i) of the above formula (6) to minimize the As described above, the depth estimator f is trained. Then, the CPU 11 stores the learned depth estimator f in the depth estimator storage unit 103 as the learning unit 105.
  • step S122 the CPU 11 determines whether or not the repetition end condition is satisfied as the learning unit 105. If the repeat end condition is satisfied, the process ends. On the other hand, if the repetition end condition is not satisfied, the process returns to step S112. Each process of steps S112 to S120 is repeated until the end condition is satisfied.
  • the end conditions are set in advance.
  • the repetition condition for example, "end when a predetermined number of times (for example, 100 times, etc.) is repeated” or "end when the decrease in the loss value is within a certain range for a certain number of repetitions" is set.
  • the parameter w of the depth estimator f is updated, and the depth estimator f for accurately estimating the depth map in consideration of the edge is the depth estimator storage unit 103. It will be stored in.
  • the depth estimation device has a small error between the edge indicating the degree of change in the depth of the estimated depth map and the edge indicating the degree of change in the depth of the correct answer depth map. Train the depth estimator so that As a result, it is possible to obtain a depth estimator f for accurately estimating the depth map in consideration of the edge. Further, the depth estimation device according to the second embodiment can accurately estimate the depth of the image by using the depth estimator f for accurately estimating the depth map in consideration of the edge.
  • the depth estimator 10 reappears the parameter w of the depth estimator f once learned by the first loss function of the above equation (3) by the second loss function of the above equation (5). Let me update. As a result, the accuracy of estimating the depth of the depth estimator f does not decrease.
  • the parameter w of the depth estimator f is trained so as to minimize the loss functions of both the first loss function of the above equation (3) and the second loss function of the above equation (5), the above equation (3) ) And the second loss function of the above equation (5) are linearly coupled and defined as a new loss function. Then, the parameter w of the depth estimator f is updated so that the new loss function is minimized.
  • one feature is that the first loss function of the above equation (3) and the second loss function of the above equation (5) are individually minimized.
  • the learning method of the depth estimation device 10 according to the second embodiment minimizes a new loss function in which the first loss function of the above equation (3) and the second loss function of the above equation (5) are linearly combined. Compared with the case, there is an advantage that the parameter w of the depth estimator f can be learned without manually adjusting the weight of the linear combination.
  • the learning method of the depth estimation device 10 according to the second embodiment can avoid such work.
  • This experiment was conducted using data obtained by shooting indoors with a camera equipped with a depth sensor.
  • the learning is performed using the learning image data including 48,000 sets of learning images and the correct answer depth map, and the evaluation includes a set of 654 sets of images different from the learning image data and the correct answer depth map.
  • the evaluation data was used.
  • FIG. 6 shows a depth estimation error (m) representing an error in estimating the depth by each method.
  • the “conventional technique 1” shown in FIG. 6 is a result when the depth estimator f learned by using the above equation (1) is used.
  • the “conventional technique 2” shown in FIG. 6 is a result when the depth estimator f learned by using the above equation (2) is used.
  • the “embodiment” is the result when the depth estimator f learned by the depth estimator 10 of the second embodiment is used.
  • processors other than the CPU may execute the language processing executed by the CPU reading the software (program) in each of the above embodiments.
  • the processors include PLD (Programmable Logic Device) whose circuit configuration can be changed after manufacturing FPGA (Field-Programmable Gate Array), and ASIC (Application Specific Integrated Circuit) for executing ASIC (Application Special Integrated Circuit).
  • PLD Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • An example is a dedicated electric circuit or the like, which is a processor having a circuit configuration designed exclusively for it.
  • the depth estimation process and the depth estimation model learning process may be executed by one of these various processors, or a combination of two or more processors of the same type or different types (for example, a plurality of FPGAs and a plurality of FPGAs and). It may be executed by a combination of a CPU and an FPGA, etc.).
  • the hardware structure of these various processors is, more specifically, an electric circuit in which circuit elements such as semiconductor elements are combined.
  • the program is a non-temporary storage medium such as a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital entirely Disk Online Memory), and a USB (Universal Serial Bus) memory. It may be provided in the form. Further, the program may be downloaded from an external device via a network.
  • the depth estimation process and the depth estimation model learning process of the present embodiment may be configured by a computer or server provided with a general-purpose arithmetic processing unit, a storage device, or the like, and each process may be executed by a program.
  • This program is stored in a storage device, can be recorded on a recording medium such as a magnetic disk, an optical disk, or a semiconductor memory, or can be provided through a network.
  • any other component does not have to be realized by a single computer or server, but may be distributed and realized by a plurality of computers connected by a network.
  • the depth estimation device 10 executes the depth estimation process and the depth estimation model learning process has been described as an example, but the present invention is not limited to this.
  • the depth estimation device 10 may execute only the depth estimation process, and the depth estimation model learning device, which is an example of a device different from the depth estimation device 10, may execute the depth estimation model learning process.
  • (Appendix 1) With memory With at least one processor connected to the memory Including The processor Get the input image and The acquired input image is input to a depth estimator for generating a depth map in which the depth of the space reflected in the image is assigned to each pixel of the image, and the depth map corresponding to the input image is input. Generates an estimated depth map that represents The depth estimator is a loss value for a pixel whose error is greater than a threshold for each of the errors between the depth of the estimated depth map for learning and the depth of the correct depth map representing the correct depth map.
  • Depth estimator configured to.
  • the image for learning is input to a depth estimator for generating a depth map in which the depth of the space reflected in the image is assigned to each pixel of the image, and the image for learning corresponds to the image for learning.
  • Generate an estimated depth map for learning which is a depth map
  • the degree of increase in the loss value for pixels whose error between the generated estimated depth map for learning and the depth of the correct depth map representing the correct depth map is larger than the threshold value is the error.
  • the depth estimator is trained so that the value of the loss function, which is set to be smaller than the degree of increase in the loss value for pixels whose value is less than or equal to the threshold value, becomes smaller.
  • Depth estimation model learning device configured to.
  • (Appendix 3) Get the input image and The acquired input image is input to a depth estimator for generating a depth map in which the depth of the space reflected in the image is assigned to each pixel of the image, and the depth map corresponding to the input image is input.
  • the depth estimator is a loss value for a pixel whose error is greater than a threshold for each of the errors between the depth of the estimated depth map for learning and the depth of the correct depth map representing the correct depth map.
  • the image for learning is input to a depth estimator for generating a depth map in which the depth of the space reflected in the image is given to each pixel of the image, and the image for learning corresponds to the image for learning.
  • Generate an estimated depth map for learning which is a depth map
  • the degree of increase in the loss value for pixels in which the error between the generated depth of the estimated depth map for learning and the depth of the correct depth map representing the correct depth map is larger than the threshold value is the error.
  • the depth estimator is trained so that the value of the loss function, which is set to be smaller than the degree of increase in the loss value for pixels whose value is less than or equal to the threshold value, becomes smaller.
  • a non-temporary storage medium that stores a depth estimation model learning program for a computer to perform processing.
  • Depth estimation device 101 Learning acquisition unit 102 Learning data storage unit 103 Depth estimator storage unit 104 Learning depth map generation unit 105 Learning unit 201 Acquisition unit 202 Depth map generation unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

深度推定装置の取得部は、入力画像を取得する。そして、深度マップ生成部は、取得部によって取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、入力画像に対応する深度マップを表す推定深度マップを生成する。深度推定器は、推定深度マップの深度と正解の深度マップを表す正解深度マップの深度との間の誤差の各々について、誤差が閾値よりも大きい画素に対する損失値の増加度合いが、誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである。

Description

深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム
 開示の技術は、深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラムに関する。
 近年、画像認識技術の進展が目覚ましい。画像認識技術の活用例の一つとしては、ロボットの目としての活用が知られている。例えば、製造業においては、画像に写る空間の深度を推定するための機能を備えたロボットによる、ファクトリーオートメーションの導入が進められている。ロボットによる画像認識技術の進歩に伴い、リテイル又は物流現場における搬送又は在庫管理、及び運送又は運搬など、ロボットによる画像認識技術は、より高度な画像認識が求められるフィールドへの展開が期待されている。
 典型的な画像認識技術の一例として、画像に写る被写体の名称(以下、単に「ラベル」と称する。)を予測する技術が知られている。例えば、任意の画像にリンゴが写っている場合、この画像が、所定の画像認識機能を有するモデルへ入力されたときの望ましい動作としては、「リンゴ」というラベルを出力する、又は、当該画像のリンゴの写る領域を表す画素の集合に対して、「リンゴ」というラベルを割り当てることである。
 一方、前述したようなロボットに実装され得る画像認識技術としては、画像内に写る被写体のラベルを出力するのみでは不十分である場合が多い。例えば、リテーラーにおけるロボットの活用事例として、ロボットが物品棚にある商品を把持又は運搬し、別の商品棚に移すような場面を想定する。この場合、当該タスクを完遂するためには、ロボットは以下の(1)~(3)の工程を実行する必要がある。
(1)ロボットが、物品棚にある様々な商品の中から移動すべき対象の商品を特定する。
(2)ロボットが、特定された商品を把持する。
(3)ロボットが、特定された商品を目的の商品棚まで移動又は運搬する。
(4)ロボットが、望ましいレイアウトとなるように特定された商品を配置する。
 ロボットが備える画像認識技術は、物品棚、商品、及び商品棚を認識できることはもちろんのこと、これに加えて、物品棚の構造又は物体の姿勢(位置、角度、及び大きさ等)等の3次元的な形状も正確に認識できる必要がある。前述したような典型的な画像認識技術には、このような形状を推定する機能は備えておらず、別途、形状を推定するための技術が必要となる。
 物品の形状は、物品の幅、物品の高さ、及び物品の深度等を得ることにより認識される。物品が写る画像からは、物品の幅と物品の高さとが認識されるが、物品の奥行き方向に関する情報を表す深度を認識することはできない。このため、物品の深度を認識可能にするためは、例えば、特許文献1に記載の方法のように、別視点から撮影された2枚以上の物品が写る画像を用いることが考えられる。又は、物品の深度を認識可能にするためは、ステレオカメラなどを用いることが考えられる。
 しかしながら、上述のような装置又は撮影方法を常に利用できるとは限らない。このため、1枚の画像のみからでも物品の深度を得られるような方法が好ましい。このような要望に鑑み、物品が写る画像から物品の深度を推定可能な技術が発明され、開示されている。
 なお、近年において主流となっている技術として、深層ニューラルネットワークを用いた方法が知られている。深層ニューラルネットワークは、画像を入力として受け付ける。そして、深層ニューラルネットワークは、受け付けた画像の各画素の深度を出力する。この前提として、学習用の画像の深度と正解の深度との間の推定の誤差が小さくなるように、深層ニューラルネットワークに対して学習が行われる。この場合、特に重要なのは、深層ニューラルネットワークをどのように学習させるか、という点である。
 例えば、非特許文献1には、非特許文献2に開示されているDeep Residual Network (ResNet)をベースとしたネットワークを、Reverse Huber損失(以下、単に「BerHu損失」と称する。)を用いて学習させる方法が開示されている。BerHu損失は、区分関数である。具体的には、BerHu損失は、深度の推定の誤差が小さい部分では誤差の増加に応じて線形に増加する損失値をとり、深度の推定の誤差が大きい部分では誤差の増加に応じて2次関数で増加する損失値をとる関数である。
 非特許文献3には、非特許文献1と同様のネットワークを、誤差の増加に対して線形に増加する関数であるL1損失を用いて学習する方法が開示されている。
特開2017‐112419号公報
Iro Laina, Christian Rupprecht, Vasileios Belagianis, Federico Tombari, and Nassir Navab, "Deeper Depth Prediction with Fully Convolutional Residual Networks," In Proc. International Conference on 3D Vision (3DV), pp. 239-248, 2016. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. "Deep Residual Learning for Image Recognition," In Proc. Conference on Computer Vision and Pattern Recognition (CVPR), 2016. Fangchang Ma and Sertac Karaman. "Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image," In Proc. International Conference on Robotics and Automation (ICRA), 2018.
 非特許文献1~非特許文献3に開示されている技術は、L1損失又はBerHu損失のように、推定の誤差が大きい領域に対し推定の誤差が小さい領域と同等又は同等以上の重みで学習することを要請する損失関数を用いている。これは、深度が推定される画像の各画素のうち、推定の誤差が大きい領域を推定の誤差が小さい領域以上に重視してネットワークを学習させることに対応する。
 しかしながら、通常、推定の誤差の大きい領域は、カメラと被写体との間の距離が物理的に遠距離であったり、又は非常に繁雑な深度構造を持つような部分であったりといったように、そもそも画像上で見ても深度の不確かな領域であることが多い。
 このため、推定の誤差が大きい部分を重視してネットワークを学習させることは、必ずしも推定の精度を向上させるとは限らない、という問題があった。このため、従来では、画像から当該画像に写る奥行きを表す深度を精度よく推定することができない、という課題があった。
 開示の技術は、上記の点に鑑みてなされたものであり、画像に写る空間の深度を精度よく推定することを目的とする。
 本開示の第1態様は、深度推定装置であって、入力画像を取得する取得部と、前記取得部によって取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する深度マップ生成部と、を含み、前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである。
 本開示の第2態様は、深度推定装置であって、前記損失関数は、前記誤差が閾値よりも大きい場合には、該誤差の増加に対して該誤差の累乗根に応じて増加する前記損失値をとり、前記誤差が閾値以下である場合には、該誤差の増加に対して線形に増加する前記損失値をとる関数である。
 本開示の第3態様は、深度推定モデル学習装置であって、学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成する学習用深度マップ生成部と、前記学習用深度マップ生成部により生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる学習部と、を含む。
 本開示の第4態様は、深度推定モデル学習装置であって、前記損失関数は、前記誤差が閾値以下である場合には、該誤差の増加に対して線形に増加する前記損失値となり、前記誤差が閾値より大きい場合には、該誤差の累乗根に対して線形に変化する前記損失値となる関数である。
 本開示の第5態様は、深度推定モデル学習装置であって、前記学習部は、更に、学習用の前記推定深度マップの前記深度の変化の度合いを表すエッジと、前記正解深度マップの前記深度の変化の度合いを表すエッジとの間の誤差が小さくなるように、前記深度推定器を学習させる。
 本開示の第6態様は、深度推定方法であって、入力画像を取得し、取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する、処理をコンピュータが実行する深度推定方法であって、前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである。
 本開示の第7態様は、深度推定モデル学習方法であって、学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成し、生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる、処理をコンピュータが実行する。
 本開示の第8態様は、深度推定プログラムであって、入力画像を取得し、取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する、処理をコンピュータに実行させるための深度推定プログラムであって、前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである。
 開示の技術によれば、画像に写る空間の深度を精度よく推定することができる。
第1実施形態の深度推定装置10のハードウェア構成を示すブロック図である。 第1実施形態の深度推定装置10の機能構成の例を示すブロック図である。 第1実施形態の深度推定装置10による深度推定モデル学習処理の流れを示すフローチャートである。 第1実施形態の深度推定装置10による深度推定処理の流れを示すフローチャートである。 第2実施形態の深度推定装置10による深度推定モデル学習処理の流れを示すフローチャートである。 実験結果を示す図である。
 以下、開示の技術の実施形態の一例を、図面を参照しつつ説明する。なお、各図面において同一又は等価な構成要素及び部分には同一の参照符号を付与している。また、図面の寸法比率は、説明の都合上誇張されており、実際の比率とは異なる場合がある。
[第1実施形態]
 図1は、第1実施形態の深度推定装置10のハードウェア構成を示すブロック図である。
 図1に示されるように、第1実施形態の深度推定装置10は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、ストレージ14、入力部15、表示部16及び通信インタフェース(I/F)17を有する。各構成は、バス19を介して相互に通信可能に接続されている。
 CPU11は、中央演算処理ユニットであり、各種プログラムを実行したり、各部を制御したりする。すなわち、CPU11は、ROM12又はストレージ14からプログラムを読み出し、RAM13を作業領域としてプログラムを実行する。CPU11は、ROM12又はストレージ14に記憶されているプログラムに従って、上記各構成の制御及び各種の演算処理を行う。本実施形態では、ROM12又はストレージ14には、入力装置より入力された情報を処理する各種プログラムが格納されている。
 ROM12は、各種プログラム及び各種データを格納する。RAM13は、作業領域として一時的にプログラム又はデータを記憶する。ストレージ14は、HDD(Hard Disk Drive)又はSSD(Solid State Drive)により構成され、オペレーティングシステムを含む各種プログラム、及び各種データを格納する。
 入力部15は、マウス等のポインティングデバイス、及びキーボードを含み、各種の入力を行うために使用される。
 表示部16は、例えば、液晶ディスプレイであり、各種の情報を表示する。表示部16は、タッチパネル方式を採用して、入力部15として機能しても良い。
 通信インタフェース17は、入力装置等の他の機器と通信するためのインタフェースであり、例えば、イーサネット(登録商標)、FDDI、Wi-Fi(登録商標)等の規格が用いられる。
 次に、第1実施形態の深度推定装置10の機能構成について説明する。図2は、深度推定装置10の機能構成の例を示すブロック図である。図2に示されるように、深度推定装置10は、機能構成として、学習用取得部101、学習用データ記憶部102、深度推定器記憶部103、学習用深度マップ生成部104、学習部105、取得部201、及び深度マップ生成部202を有する。各機能構成は、CPU11がROM12又はストレージ14に記憶された深度推定モデル学習プログラム及び深度推定プログラムを読み出し、RAM13に展開して実行することにより実現される。
 学習用取得部101は、複数の学習用画像データを取得する。学習用画像データの各々は、学習用の画像Iと、正解深度マップTとが対応付けられているデータである。正解深度マップTは、学習用の画像Iに写る空間の深度が当該画像の各画素に予め付与されている正解の深度マップである。本実施形態の深度は、画像が撮像されたカメラの位置と当該画像に写る被写体との間の奥行き方向の距離を表す。なお、深度を表す距離の単位は、任意のものを用いることができる。例えば、深度を表す距離の単位として、メートルやミリメートルを単位として用いればよい。
 本実施形態の深度マップには、画像に写る空間の奥行き方向の深度が当該画像の各画素に付与されている。また、深度マップは、カメラによって撮像された画像と同じ幅及び同じ高さを持つ2次元のデータである。なお、iは、学習用画像データを識別するためのインデックスである。
 学習用の画像Iに対応する正解深度マップTを得る手段は様々な公知の手段が複数存在するため、どのようなものを用いてもよい。例えば、上記非特許文献1又は上記非特許文献3に開示されている技術のように、一般のデプスカメラを用いて得た深度マップを正解深度マップTとしてもよい。又は、ステレオカメラによって撮像された画像を用いて計測した深度に基づいて、正解深度マップTを生成してもよい。又は、複数枚の画像を用いて計測した深度に基づいて、正解深度マップTを生成してもよい。
 学習用取得部101は、複数の学習用画像データを受け付けると、複数の学習用画像データの各々を学習用データ記憶部102へ格納する。
 学習用データ記憶部102には、複数の学習用画像データが格納される。1つの学習用画像データには、学習用の画像Iと当該学習用の画像Iの正解深度マップTとが対応付けられている。
 深度推定器記憶部103には、画像から深度マップを生成するための深度推定器fが格納されている。深度推定器fは、後述する学習部105によって更新される。
 深度推定器fとしては、画像又は画素値を入力として、深度マップ又は深度を出力することができる任意の関数が用いられる。例えば、深度推定器fとしては、ニューラルネットワークを用いることができる。ニューラルネットワークの構成は、上記のような入出力関係を実現できるものであれば任意の構成をとることができる。ニューラルネットワークのとしては、例えば上記非特許文献1又は上記非特許文献2に記載のニューラルネットワークを用いることができる。又は、ニューラルネットワークとしては、以下の参考文献1に記載のDenseNetに基づくもの等を用いることができる。
(参考文献1)Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. “Densely Connected Convolutional Network,” In Proc. Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
 なお、深度推定器fとしてのニューラルネットワークの構成は、これに限られるものではなく、上述の入出力関係が満たされる限りどのような構成であってもよい。
 本実施形態の深度推定装置10は、深度推定器fを用いて画像の深度マップを求める深度推定処理と、当該深度推定器fを学習する深度推定モデル学習処理との2つの異なる処理を実行する。深度推定モデル学習処理は、画像の深度を推定する前に、少なくとも一度実施する必要のある処理である。例えば、深度推定器fがニューラルネットワークである場合には、深度推定モデル学習処理は、ニューラルネットワークのパラメータである重みを学習用画像データに基づいて適切に決定するための処理である。以下では、まず深度推定モデル学習処理について説明した後、深度推定処理について説明する。
 学習用深度マップ生成部104は、学習用データ記憶部102に格納された学習用の画像Iの各々について、当該学習用の画像Iを深度推定器記憶部103に格納された深度推定器fへ入力する。そして、学習用深度マップ生成部104は、学習用の画像Iの各々について、当該学習用の画像Iに対応する深度マップである学習用の推定深度マップDを生成する。このため、学習用の画像Iと深度推定器fと学習用の推定深度マップDとの関係は、D=f(I)となる。
 学習部105は、同一の学習用の画像Iに対する、学習用深度マップ生成部104により生成された学習用の推定深度マップDの各画素の深度と、学習用データ記憶部102に格納された正解深度マップTの各画素の深度と、の間の誤差に応じた損失値を出力する損失関数を用いて、深度推定器fを学習させる。
 同一の学習用の画像Iに対する、学習用の推定深度マップDの各画素の深度と正解深度マップTの各画素の深度とは、本来、同一の値をとるべきである。しかし、深度推定器fの推定の精度が低い場合には、学習用の推定深度マップDの各画素の深度と、正解深度マップTの各画素の深度との間の誤差が生じ得る。
 この場合、所定の損失関数が小さくなるように、深度推定器fの学習が行われる。このとき、学習用の推定深度マップDの各画素の深度と正解深度マップTの各画素の深度との間の誤差が小さいほど小さい損失値をとり、学習用の推定深度マップDの各画素の深度と正解深度マップTの各画素の深度との間の誤差が大きいほど大きい損失値をとるような、損失関数が設計されていることは好ましい。
 この点、上記非特許文献3には、正解深度マップTの各画素の深度と学習用の推定深度マップDの各画素の深度との間の誤差の総和を損失関数とすることが開示されている。例えば、学習用の推定深度マップDの各画素の深度との間の誤差としてL1損失を用いる場合、損失関数lL1は以下の式(1)に示されるように定めることができる。
Figure JPOXMLDOC01-appb-M000001

                                    (1)
 上記式(1)におけるXはxの定義域を表し、Yはyの定義域を表す。x,yは、各深度マップ上の画素の位置を表す。Nは学習用画像データの中に含まれる学習用の画像と正解深度マップの組の数、又はそれ以下の定数である。また、|e(x,y)|は、正解深度マップTの座標(x,y)上の画素の深度T(x,y)と、学習用の推定深度マップDの座標(x,y)上の画素の深度D(x,y)との間の誤差を表す。このため、e(x,y)=T(x,y)-D(x,y)となる。
 上記式(1)の損失関数は、正解深度マップTの各画素の深度と学習用の推定深度マップDとの各画素の深度との間の誤差|e(x,y)|が小さいほど、小さい損失値をとる。したがって、上記式(1)の損失関数は、正解深度マップTの各画素の深度と学習用の推定深度マップDの各画素の深度が等しい場合には0となる。このため、様々な正解深度マップTと学習用の推定深度マップDとに対して、上記式(1)の損失関数がとる損失値が小さくなるように、深度推定器fのパラメータを更新することにより、推定深度マップを出力することが可能な深度推定器fを得ることができる。
 又は、上記非特許文献1に開示されている方法のように、以下の式(2)に示される損失関数を用いてもよい。
Figure JPOXMLDOC01-appb-M000002

                                   (2)
 上記式(2)の損失関数は、正解深度マップTの各画素の深度と学習用の推定深度マップDとの各画素の深度との間の誤差|e(x,y)|が閾値c以下の場合には、誤差|e(x,y)|の増加に応じた損失値の増加度合いが線形となる関数である。一方、上記式(2)の損失関数においては、誤差|e(x,y)|が閾値cより大きい場合には、誤差|e(x,y)|の増加に応じた損失値の増加度合いが、誤差|e(x,y)|の2次関数となる。
 しかし、上記式(1)又は上記式(2)に示されるような既存の損失関数には問題がある。深度マップのうちの誤差|e(x,y)|が大きい画素に対応する領域は、カメラと被写体との間の距離が物理的に遠距離である場合が考えられる。又は、深度マップのうちの誤差|e(x,y)|が大きい画素に対応する領域は、非常に複雑な深度構造を持つような部分である場合が考えられる。
 深度マップのうちの、このような箇所については、不確かさを含む領域であることが多い。このため、深度マップのうちの、このような箇所は、深度推定器fによって精度よく深度を推定することができる領域ではないことが多い。そのため、深度マップのうちの誤差|e(x,y)|の大きい画素を含む領域を重視して学習することは、深度推定器fの精度を必ずしも向上させるとは限らない。
 上記式(1)の損失関数は、誤差|e(x,y)|の大小によらず常に同じ損失値をとる。一方、上記式(2)の損失関数は、誤差|e(x,y)|が大きい場合には、より大きな損失値をとるような設計となっている。このため、上記式(1)又は上記式(2)に示されるような損失関数を用いて深度推定器fを学習させたとしても、深度推定器fの推定の精度を向上させるには限界がある。
 そこで、第1実施形態では、以下に示されるような損失関数である第1損失関数を用いる。第1損失関数l(T,D)の値は、誤差|e(x,y)|が閾値c以下である場合には、当該誤差の絶対値|e(x,y)|の増加に対して線形に増加する損失値となる。また、第1損失関数l(T,D)の値は、誤差|e(x,y)|が閾値cより大きい場合には、当該誤差|e(x,y)|の累乗根に応じて変化する損失値となる。
Figure JPOXMLDOC01-appb-M000003

                                    (3)
 上記式(3)の第1損失関数l(T,D)において、誤差|e(x,y)|が閾値c以下の画素では、|e(x,y)|の増加に対して線形に増加する点は、他の損失関数(例えば、上記式(1)又は上記式(2)の損失関数)と同様である。
 しかし、上記式(3)の第1損失関数l(T,D)において、誤差|e(x,y)|が閾値cよりも大きい画素では、|e(x,y)|の増加に対して平方関数となる関数である。このため、本実施形態では、上述したように、不確かさを含む画素については、損失値を小さく見積もり、軽視する。これにより、深度推定器fの推定の頑健性を高め、精度を向上させることができる。
 このため、学習部105は、上記式(3)の第1損失関数l(T,D)の値が小さくなるように、深度推定器記憶部103に格納された深度推定器fを学習させる。
 なお、上記式(3)の第1損失関数l(T,D)は、深度推定器記憶部103に格納された深度推定器fのパラメータwに対して区分的に微分可能である。このため、深度推定器fのパラメータwは、勾配法により更新可能である。例えば、学習部105は、深度推定器fのパラメータwを確率的勾配降下法に基づいて学習させる場合、1ステップあたり、以下の式(4)に基づいてパラメータwを更新する。なお、αは予め設定される係数である。
Figure JPOXMLDOC01-appb-M000004

                                   (4)
 深度推定器fの任意のパラメータwに対する損失関数lの微分値は、誤差逆伝搬法により計算することができる。なお、学習部105は、深度推定器fのパラメータwを学習させる際に、モーメンタム項を利用する又は重み減衰を利用する等、一般的な確率的勾配降下法の改善法を導入してもよい。又は、学習部105は、別の勾配降下法を用いて、深度推定器fのパラメータwを学習させてもよい。
 そして、学習部105は、学習済みの深度推定器fのパラメータwを深度推定器記憶部103に格納する。これにより、深度マップを精度よく推定するための深度推定器fが得られたことになる。
 次に、深度推定装置10は、深度マップ生成対象の入力画像を受け付けて、当該入力画像の推定深度マップを生成する。
 取得部201は、深度マップ生成対象の入力画像を取得する。
 深度マップ生成部202は、取得部201によって取得された入力画像を、深度推定器記憶部103に格納された深度推定器fへ入力して、入力画像に対応する深度マップを表す推定深度マップを生成する。
 深度推定器記憶部103に格納されている深度推定器fは、上記式(3)に示される損失関数を最小化するように予め学習されているモデルであるため、入力画像に対する推定深度マップが精度よく生成される。
 次に、深度推定装置10の作用について説明する。
 図3は、深度推定装置10による深度推定モデル学習処理の流れを示すフローチャートである。CPU11がROM12又はストレージ14から深度推定モデル学習処理プログラムを読み出して、RAM13に展開して実行することにより、深度推定モデル学習処理が行なわれる。また、図3は、深度推定装置10による深度推定モデル学習処理の流れを示すフローチャートである。CPU11がROM12又はストレージ14から深度推定モデル学習処理プログラムを読み出して、RAM13に展開して実行することにより、深度推定モデル学習処理が行なわれる。
 まず、CPU11は、学習用取得部101として、例えば入力部15から入力された複数の学習用データを取得し、学習用データ記憶部102に格納する。そして、CPU11は、学習処理実行の指示信号を受け付けると、図3に示す深度推定モデル学習処理を実行する。
 ステップS100において、CPU11は、学習用深度マップ生成部104として、学習用データ記憶部102に格納された学習用の画像Iの各々を読み出す。
 ステップS102において、CPU11は、学習用深度マップ生成部104として、深度推定器記憶部103に格納された深度推定器fを読み出す。
 ステップS104において、CPU11は、学習用深度マップ生成部104として、上記ステップS100で読み出された学習用の画像Iの各々を、上記ステップS102で読み出された深度推定器fへ入力して、当該学習用の画像Iに対応する学習用の推定深度マップDを生成する。
 ステップS106において、CPU11は、学習部105として、複数の学習用の画像Iの各々について、同一の学習用の画像Iに対する、上記ステップS104で生成された学習用の推定深度マップDの各画素の深度と、学習用データ記憶部102に格納された正解深度マップTの各画素の深度と、の間の誤差に応じた損失関数l(T,D)の損失値の各々を算出する。
 ステップS108において、CPU11は、学習部105として、上記ステップS106で算出された損失値の各々に基づいて、上記式(3)の損失関数l(T,D)を最小化するように、深度推定器fを学習させる。そして、CPU11は、学習部105として、学習済みの深度推定器fを深度推定器記憶部103へ格納する。
 ステップS110において、CPU11は、学習部105として、繰り返しの終了条件が満たされているか否かを判定する。繰り返しの終了条件が満たされている場合には、処理が終了する。一方、繰り返しの終了条件が満たされていない場合には、ステップS100へ戻る。ステップS100~ステップS108の各処理は、終了条件が満たされるまで繰り返される。
 なお、終了条件は予め設定される。繰り返し条件としては、例えば、「所定の回数(例えば100回など)繰り返したら終了」又は「損失値の減少が一定繰り返し回数の間、一定の範囲内に収まっていたら終了」等が設定される。
 上記の深度推定モデル学習処理が実行されることにより、深度推定器fのパラメータwが更新され、深度マップを精度よく推定するための深度推定器fが深度推定器記憶部103へ格納されたことになる。
 次に、CPU11は、取得部201として、例えば入力部15から入力された、深度マップ生成対象の入力画像を受け付けると、図4に示す深度推定処理を実行する。
 ステップS200において、CPU11は、取得部201として、入力画像を取得する。
 ステップS202において、CPU11は、深度マップ生成部202として、深度推定器記憶部103に格納されている深度推定器fを読み出す。
 ステップS204において、CPU11は、深度マップ生成部202として、上記ステップS200で取得された入力画像を、上記ステップS202で読み出された深度推定器fへ入力して、入力画像に対応する深度マップを表す推定深度マップを生成する。
 ステップS206において、CPU11は、深度マップ生成部202として、上記ステップS204で生成された推定深度マップを出力して、深度推定処理を終了する。
 以上説明したように、本実施形態の深度推定装置10は、学習用の画像を深度推定器へ入力して、学習用の画像に対応する深度マップである学習用の推定深度マップを生成する。また、深度推定装置は、生成された学習用の推定深度マップの深度と正解深度マップの深度との間の誤差の各々について、誤差が閾値よりも大きい画素に対する損失値の増加度合いが、誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、深度推定器を学習させる。これにより、画像に写る空間の深度を精度よく推定するための深度推定器を得ることができる。
 また、本実施形態の深度推定装置10は、入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、入力画像に対応する推定深度マップを生成する。これにより、画像に写る空間の深度を精度よく推定することができる。
 具体的には、本実施形態の深度推定装置は、上記式(3)に示されるような、深度の推定が困難な箇所である、誤差が大きい領域に対応する画素の重要度を下げた損失関数を用いて、深度推定器fを学習させる。上記式(3)に示されるような損失関数を用いることによって、不確定性が低く、誤差が小さい画素の領域に対しては、深度推定器fによる学習が確実に行われる。一方、上記式(3)に示されるように、不確定性が高く、誤差が大きい画素の領域に対しては、その重要度が下げられて深度推定器fの学習が行われる。これより、深度マップを精度よく推定するための深度推定器fを得ることができる。
[第2実施形態]
 次に、第2実施形態について説明する。なお、第2実施形態に係る深度推定装置の構成は、第1実施形態と同様の構成となるため、同一符号を付して説明を省略する。
 第2実施形態の深度推定装置10は、更に、学習用の推定深度マップの深度の変化の度合いを表すエッジと正解深度マップの深度の変化の度合いを表すエッジとの間の誤差が小さくなるように、深度推定器fを学習させる点が、第1実施形態と異なる。
 第1実施形態の深度推定装置によって得られた深度推定器fが生成する推定深度マップは、全体的にぼやけている場合がある。特に、畳み込みニューラルネットワークが深度推定器fとして用いられた場合、生成された推定深度マップは、過度に滑らかであり、全体的にぼけている場合がある。
 このような推定深度マップは、急峻に変化するエッジ部分の深度が精度よく再現されていないという課題がある。例えば、全体的にぼやけている推定深度マップは、壁の境目又は物体の際の深度が正確に再現されていない場合がある。
 そこで、第2実施形態の深度推定装置10は、より精度のよい推定深度マップを生成するために、深度推定器fを更に学習させる。
 深度推定器fの望ましい状態としては、深度推定器fによって生成された推定深度マップのエッジと正解深度マップのエッジとが近しくなることである。このため、第2実施形態では、以下の式(5)に示される第2損失関数を導入する。そして、第2実施形態の深度推定装置10は、以下の式(5)の第2損失関数lを最小化するように、深度推定器fのパラメータwを更に更新する。
Figure JPOXMLDOC01-appb-M000005

                                    (5)
 ここで、上記式(5)におけるEはエッジ検出器であり、E(T(x,y))は、正解深度マップTにエッジ検出器Eを適用した後の座標(x,y)上の値を表す。また、E(D(x,y))は、学習用の推定深度マップDにエッジ検出器Eを適用した後の座標(x,y)上の値を表す。
 エッジ検出器としては、微分可能な検出器であればどのようなエッジ検出器を用いてもよい。例えば、Sobelフィルタをエッジ検出器として用いることができる。Sobelフィルタは畳み込み演算として記述することができるため、畳み込みニューラルネットワークの畳み込み層として簡易に実装可能であるという利点もある。
 このため、第2実施形態の学習部105は、正解深度マップTの深度の変化の度合いを表すエッジE(T(x,y))と、学習用の推定深度マップDの深度の変化の度合いを表すエッジE(D(x,y))との間の誤差が小さくなるように、深度推定器fを更に学習させる。具体的には、第2実施形態の学習部105は、上記式(5)に示される第2損失関数lが小さくなるように、深度推定器fを更に学習させる。
 上記式(5)に定められる第2損失関数l(T,D)も、エッジ検出器Eが微分可能である限り、深度推定器fのパラメータwに対して区分的に微分可能である。このため、深度推定器fのパラメータwは、勾配法により更新可能である。例えば、第2実施形態の学習部105は、深度推定器fのパラメータwを確率的勾配降下法に基づいて学習させる場合、1ステップあたり、以下の式(6)に基づいてパラメータwを更新する。なお、αは予め設定される係数である。
Figure JPOXMLDOC01-appb-M000006

                                   (6)
 深度推定器fの任意のパラメータwに対する損失関数lの微分値は、誤差逆伝搬法により計算することができる。なお、学習部105は、深度推定器fのパラメータwを学習させる際に、モーメンタム項を利用する又は重み減衰を利用する等、一般的な確率的勾配降下法の改善法を導入してもよい。又は、学習部105は、別の勾配降下法を用いて、深度推定器fのパラメータwを学習させてもよい。
 次に、第2実施形態の深度推定装置10の作用について説明する。
 図5は、第2実施形態の深度推定装置10による深度推定モデル学習処理の流れを示すフローチャートである。
 ステップS100~ステップS110の各処理は、第1実施形態と同様に実行される。
 ステップS112において、CPU11は、学習用深度マップ生成部104として、学習用データ記憶部102に格納された学習用の画像Iの各々を読み出す。
 ステップS114において、CPU11は、学習用深度マップ生成部104として、深度推定器記憶部103に格納された深度推定器fを読み出す。
 ステップS116において、CPU11は、学習用深度マップ生成部104として、上記ステップS112で読み出された学習用の画像Iの各々を、上記ステップS114で読み出された深度推定器fへ入力して、当該学習用の画像Iに対応する学習用の推定深度マップDを生成する。
 ステップS118において、CPU11は、学習部105として、複数の学習用の画像Iの各々について、同一の学習用の画像Iに対する、上記ステップS116で生成された学習用の推定深度マップDの各画素の深度と、学習用データ記憶部102に格納された正解深度マップTの各画素の深度との間の誤差に応じた第2損失関数l(T,D)の損失値の各々を算出する。
 ステップS120において、CPU11は、学習部105として、上記ステップS118で算出された損失値の各々に基づいて、上記式(6)の第2損失関数l(T,D)を最小化するように、深度推定器fを学習させる。そして、CPU11は、学習部105として、学習済みの深度推定器fを深度推定器記憶部103へ格納する。
 ステップS122において、CPU11は、学習部105として、繰り返しの終了条件が満たされているか否かを判定する。繰り返しの終了条件が満たされている場合には、処理が終了する。一方、繰り返しの終了条件が満たされていない場合には、ステップS112へ戻る。ステップS112~ステップS120の各処理は、終了条件が満たされるまで繰り返される。
 なお、終了条件は予め設定される。繰り返し条件としては、例えば、「所定の回数(例えば100回など)繰り返したら終了」又は「損失値の減少が一定繰り返し回数の間、一定の範囲内に収まっていたら終了」等が設定される。
 上記の深度推定モデル学習処理が実行されることにより、深度推定器fのパラメータwが更新され、エッジを考慮して深度マップを精度よく推定するための深度推定器fが深度推定器記憶部103へ格納されたことになる。
 なお、第2実施形態に係る深度推定装置の他の構成及び作用については、第1実施形態と同様であるため、説明を省略する。
 以上説明したように、第2実施形態に係る深度推定装置は、推定深度マップの深度の変化の度合いを表すエッジと、正解深度マップの深度の変化の度合いを表すエッジとの間の誤差が小さくなるように、深度推定器を学習させる。これにより、エッジを考慮して深度マップを精度よく推定するための深度推定器fを得ることができる。また、第2実施形態に係る深度推定装置は、エッジを考慮して深度マップを精度よく推定するための深度推定器fを用いて、画像の深度を精度よく推定することができる。
 なお、第2実施形態に係る深度推定装置10は、上記式(3)の第1損失関数によって一度学習された深度推定器fのパラメータwを、上記式(5)の第2損失関数によって再び更新させる。この結果、深度推定器fの深度の推定の精度が低下することは無い。
 通常、上記式(3)の第1損失関数及び上記式(5)の第2損失関数の双方の損失関数を最小化するように深度推定器fのパラメータwを学習させる場合、上記式(3)の第1損失関数と上記式(5)の第2損失関数との線形結合を取ったものが、新たな損失関数として定義される。そして、新たな損失関数が最小化されるように深度推定器fのパラメータwが更新される。
 これに対し、第2実施形態では、上記式(3)の第1損失関数と上記式(5)の第2損失関数とを個別に最小化させる点が一つの特徴である。第2実施形態に係る深度推定装置10の学習方法は、上記式(3)の第1損失関数と上記式(5)の第2損失関数とを線形結合させた新たな損失関数を最小化する場合と比較して、線形結合の重みを人手で調整しなくとも、深度推定器fのパラメータwを学習させることができる、という利点を有する。
 上記式(3)の第1損失関数と上記式(5)の第2損失関数とを線形結合させた場合の重みの調整は、一般に非常に難儀である。重みの調整に関しては、線形結合の重みを変えながら何度も学習を繰り返し、最も良い重みを特定するというコストのかかる作業が必要となる。これに対し、第2実施形態に係る深度推定装置10の学習方法は、このような作業を回避することができる。
<実験結果>
 次に、第2実施形態の深度推定装置10により構築した深度推定器fを用いて深度の推定を行った場合の実験結果を示す。
 本実験は、深度センサ付きのカメラで屋内を撮影して得られるデータを用いて行った。学習は、48,000組の学習用の画像と正解深度マップとを含む学習用画像データを用いて実施し、評価は、学習用画像データとは異なる654組の画像と正解深度マップとの組を含む評価用データで行った。
 図6に、各方法での深度の推定の誤差を表す深度推定誤差(m)を示す。図6に示される「従来技術1」は、上記式(1)を用いて学習された深度推定器fを用いた場合の結果である。また、図6に示される「従来技術2」は、上記式(2)を用いて学習された深度推定器fを用いた場合の結果である。「実施形態」は、第2実施形態の深度推定装置10により学習された深度推定器fを用いた場合の結果である。図6から明らかな通り、本実施形態によれば、従来技術に対して極めて高精度な認識が可能であることがわかる。
 なお、上記各実施形態でCPUがソフトウェア(プログラム)を読み込んで実行した言語処理を、CPU以外の各種のプロセッサが実行してもよい。この場合のプロセッサとしては、FPGA(Field-Programmable Gate Array)等の製造後に回路構成を変更可能なPLD(Programmable Logic Device)、及びASIC(Application Specific Integrated Circuit)等の特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路等が例示される。また、深度推定処理及び深度推定モデル学習処理を、これらの各種のプロセッサのうちの1つで実行してもよいし、同種又は異種の2つ以上のプロセッサの組み合わせ(例えば、複数のFPGA、及びCPUとFPGAとの組み合わせ等)で実行してもよい。また、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子等の回路素子を組み合わせた電気回路である。
 また、上記各実施形態では、深度推定プログラム及び深度推定モデル学習プログラムがストレージ14に予め記憶(インストール)されている態様を説明したが、これに限定されない。プログラムは、CD-ROM(Compact Disk Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、及びUSB(Universal Serial Bus)メモリ等の非一時的(non-transitory)記憶媒体に記憶された形態で提供されてもよい。また、プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。
 また、本実施形態の深度推定処理及び深度推定モデル学習処理を、汎用演算処理装置及び記憶装置等を備えたコンピュータ又はサーバ等により構成して、各処理がプログラムによって実行されるものとしてもよい。このプログラムは記憶装置に記憶されており、磁気ディスク、光ディスク、半導体メモリ等の記録媒体に記録することも、ネットワークを通して提供することも可能である。もちろん、その他いかなる構成要素についても、単一のコンピュータやサーバによって実現しなければならないものではなく、ネットワークによって接続された複数のコンピュータに分散して実現してもよい。
 なお、本実施形態は、上述した各実施形態に限定されるものではなく、各実施形態の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 例えば、上記各実施形態では、深度推定装置10が深度推定処理及び深度推定モデル学習処理を実行する場合を例に説明したが、これに限定されるものではない。例えば、深度推定装置10が深度推定処理のみを実行し、深度推定装置10とは異なる装置の一例である深度推定モデル学習装置が深度推定モデル学習処理を実行するようにしてもよい。
 以上の各実施形態に関し、更に以下の付記を開示する。
 (付記項1)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 入力画像を取得し、
 取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成し、
 前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである、
 ように構成されている深度推定装置。
 (付記項2)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成し、
 生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる、
 ように構成されている深度推定モデル学習装置。
 (付記項3)
 入力画像を取得し、
 取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する、
 処理をコンピュータに実行させるための深度推定プログラムであって、
 前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである、
 深度推定プログラムを記憶した非一時的記憶媒体。
 (付記項4)
 学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成し、
 生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる、
 処理をコンピュータが実行するための深度推定モデル学習プログラムを記憶した非一時的記憶媒体。
10   深度推定装置
101 学習用取得部
102 学習用データ記憶部
103 深度推定器記憶部
104 学習用深度マップ生成部
105 学習部
201 取得部
202 深度マップ生成部

Claims (8)

  1.  入力画像を取得する取得部と、
     前記取得部によって取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する深度マップ生成部と、
     を含み、
     前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである、
     深度推定装置。
  2.  前記損失関数は、前記誤差が閾値よりも大きい場合には、該誤差の増加に対して該誤差の累乗根に応じて増加する前記損失値をとり、前記誤差が閾値以下である場合には、該誤差の増加に対して線形に増加する前記損失値をとる関数である、
     請求項1に記載の深度推定装置。
  3.  学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成する学習用深度マップ生成部と、
     前記学習用深度マップ生成部により生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる学習部と、
     を含む深度推定モデル学習装置。
  4.  前記損失関数は、前記誤差が閾値以下である場合には、該誤差の増加に対して線形に増加する前記損失値となり、前記誤差が閾値より大きい場合には、該誤差の累乗根に対して線形に変化する前記損失値となる関数である、
     請求項3に記載の深度推定モデル学習装置。
  5.  前記学習部は、更に、学習用の前記推定深度マップの前記深度の変化の度合いを表すエッジと、前記正解深度マップの前記深度の変化の度合いを表すエッジとの間の誤差が小さくなるように、前記深度推定器を学習させる、
     請求項3又は請求項4に記載の深度推定モデル学習装置。
  6.  入力画像を取得し、
     取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する、
     処理をコンピュータが実行する深度推定方法であって、
     前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである、
     深度推定方法。
  7.  学習用の画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力して、前記学習用の画像に対応する前記深度マップである学習用の推定深度マップを生成し、
     生成された前記学習用の推定深度マップの前記深度と、正解の前記深度マップを表す正解深度マップの前記深度と、の間の誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、前記深度推定器を学習させる、
     処理をコンピュータが実行する深度推定モデル学習方法。
  8.  入力画像を取得し、
     取得された入力画像を、画像から該画像に写る空間の深度が該画像の各画素に付与されている深度マップを生成するための深度推定器へ入力し、前記入力画像に対応する前記深度マップを表す推定深度マップを生成する、
     処理をコンピュータに実行させるための深度推定プログラムであって、
     前記深度推定器は、学習用の前記推定深度マップの前記深度と正解の前記深度マップを表す正解深度マップの前記深度との間の誤差の各々について、前記誤差が閾値よりも大きい画素に対する損失値の増加度合いが、前記誤差が閾値以下である画素に対する損失値の増加度合いよりも小さくなるように設定されている損失関数の値が小さくなるように、予め学習されたモデルである、
     深度推定プログラム。
PCT/JP2019/018831 2019-05-10 2019-05-10 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム WO2020230214A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021519054A JP7272428B2 (ja) 2019-05-10 2019-05-10 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム
PCT/JP2019/018831 WO2020230214A1 (ja) 2019-05-10 2019-05-10 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム
US17/609,717 US20220215567A1 (en) 2019-05-10 2019-05-10 Depth estimation device, depth estimation model learning device, depth estimation method, depth estimation model learning method, and depth estimation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/018831 WO2020230214A1 (ja) 2019-05-10 2019-05-10 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム

Publications (1)

Publication Number Publication Date
WO2020230214A1 true WO2020230214A1 (ja) 2020-11-19

Family

ID=73289913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/018831 WO2020230214A1 (ja) 2019-05-10 2019-05-10 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム

Country Status (3)

Country Link
US (1) US20220215567A1 (ja)
JP (1) JP7272428B2 (ja)
WO (1) WO2020230214A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113379813A (zh) * 2021-06-08 2021-09-10 北京百度网讯科技有限公司 深度估计模型的训练方法、装置、电子设备及存储介质
CN115118950A (zh) * 2021-03-22 2022-09-27 北京小米移动软件有限公司 图像处理方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128946B (zh) * 2022-12-09 2024-02-09 东南大学 一种基于边缘导向和注意力机制的双目红外深度估计方法
CN117115786B (zh) * 2023-10-23 2024-01-26 青岛哈尔滨工程大学创新发展中心 一种联合分割跟踪的深度估计模型训练方法及使用方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10803546B2 (en) * 2017-11-03 2020-10-13 Baidu Usa Llc Systems and methods for unsupervised learning of geometry from images using depth-normal consistency
JP7131994B2 (ja) * 2018-07-04 2022-09-06 株式会社東芝 自己位置推定装置、自己位置推定方法、自己位置推定プログラム、学習装置、学習方法及び学習プログラム
US11044462B2 (en) * 2019-05-02 2021-06-22 Niantic, Inc. Self-supervised training of a depth estimation model using depth hints

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ART B. OWEN: "A robust hybrid of lasso and ridge regression", DISSERTATION, October 2006 (2006-10-01), pages 1 - 14, XP055759676 *
IRO LAINA, RUPPRECHT CHRISTIAN, BELAGIANNIS VASILEIOS, TOMBARI FEDERICO, NAVAB NASSIR: "Deeper Depth Prediction with Fully Convolutional Residual Networks", ARXIV.ORG 1606.00373V2, 19 September 2016 (2016-09-19), pages 1 - 12, XP055759673 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118950A (zh) * 2021-03-22 2022-09-27 北京小米移动软件有限公司 图像处理方法及装置
CN115118950B (zh) * 2021-03-22 2024-01-30 北京小米移动软件有限公司 图像处理方法及装置
CN113379813A (zh) * 2021-06-08 2021-09-10 北京百度网讯科技有限公司 深度估计模型的训练方法、装置、电子设备及存储介质
CN113379813B (zh) * 2021-06-08 2024-04-30 北京百度网讯科技有限公司 深度估计模型的训练方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
JPWO2020230214A1 (ja) 2020-11-19
US20220215567A1 (en) 2022-07-07
JP7272428B2 (ja) 2023-05-12

Similar Documents

Publication Publication Date Title
WO2020230214A1 (ja) 深度推定装置、深度推定モデル学習装置、深度推定方法、深度推定モデル学習方法、及び深度推定プログラム
JP7308597B2 (ja) 対象物の3-d計測を実施するための解像度適応型メッシュ
KR101978172B1 (ko) 깊이 영상을 고해상도로 변환하는 방법 및 장치
JP2014096152A (ja) ポイントクラウド内の埋め戻しポイント
JP2014523572A (ja) 地図データの生成
KR102241404B1 (ko) 시각 입력을 이용한 에이전트 네비게이션
EP3819869A1 (en) Method and apparatus with depth image generation
JP6431404B2 (ja) 姿勢推定モデル生成装置及び姿勢推定装置
EP2372652A1 (en) Method for estimating a plane in a range image and range image camera
Sveier et al. Object detection in point clouds using conformal geometric algebra
EP4163873A1 (en) Method and apparatus with global localization
Gao et al. A hybrid yolov4 and particle filter based robotic arm grabbing system in nonlinear and non-gaussian environment
Jang et al. A comparison and evaluation of stereo matching on active stereo images
Hamzah et al. Improvement of stereo matching algorithm based on sum of gradient magnitude differences and semi‐global method with refinement step
CN110363863B (zh) 一种神经网络的输入数据生成方法和系统
US20240193747A1 (en) System and Method for Point Cloud Generation
Kul et al. Wall Size Prediction from 2D Images with the Help of Reference Objects
JP7197003B2 (ja) 深度推定装置、深度推定方法、及び深度推定プログラム
CN111899284A (zh) 一种基于参数化esm网络的平面目标跟踪方法
CN113805233A (zh) 一种点扩散函数的计算方法
Zainal et al. Grey‐Level Cooccurrence Matrix Performance Evaluation for Heading Angle Estimation of Moveable Vision System in Static Environment
US20230169670A1 (en) Depth estimation method, depth estimation device and depth estimation program
Schumann-Bischoff et al. Basin structure of optimization based state and parameter estimation
CN110363793B (zh) 一种对象的跟踪方法及装置
KR102076721B1 (ko) 표적 정보 제공 장치 및 그 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929102

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021519054

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929102

Country of ref document: EP

Kind code of ref document: A1