Single-Image Depth Perception Net Trained on Depth in the Wild Data

Estimate the depth map of an image

Released in 2016, this neural net was trained to predict the relative depth map from a single image using a novel technique based on sparse ordinal annotations. Each training example only needs to be annotated with a pair of points and its relative distance to the camera. After training, the net is able to reconstruct the full depth map. Its architecture is based on the "hourglass" design.

Number of layers: 501 | Parameter count: 5,385,185 | Trained size: 23 MB |

Training Set Information

Performance

Examples

Resource retrieval

Get the pre-trained net:

In[1]:=
NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"]
Out[1]=
ImageAdjust[Image[depthMap]]
Out[3]=
depthMap = NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"][img]
Out[6]=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/f69a8a3b-a75a-4ab4-8b2a-cdc1d5e12f62"]

Obtain the dimensions of the image:

In[9]:=
depthMap = NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"][img]
Out[10]=
ImageAdjust[
 Image[ArrayResample[depthMap, Reverse[ImageDimensions[img]]]]]
Out[11]=
NetInformation[
 NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"], "ArraysElementCounts"]
Out[12]=
NetInformation[
 NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"], "ArraysTotalElementCount"]
Out[13]=
NetInformation[
 NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"], "LayerTypeCounts"]
Out[14]=
NetInformation[
 NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"], "SummaryGraphic"]
Out[15]=
jsonPath = Export[FileNameJoin[{$TemporaryDirectory, "net.json"}], NetModel["Single-Image Depth Perception Net Trained on Depth in the \
Wild Data"], "MXNet"]
Out[16]=

Get the size of the parameter file:

In[18]:=
ResourceObject[
  "Single-Image Depth Perception Net Trained on Depth in the Wild \
Data"]["ByteCount"]
Out[19]=

Requirements

Wolfram Language 11.2 (September 2017) or above

Resource History

Reference

  • W. Chen, Z. Fu, D. Yang and J. Deng, "Single-Image Depth Perception in the Wild," arXiv:1604.03901 (2016)
  • Available from: BSD 3-Clause License

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant