Single-Image Depth Perception Net
Trained on
Depth in the Wild Data
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 |
Examples
Resource retrieval
Get the pre-trained net:
Basic usage
Obtain the depth map of an image:
Show the depth map:
Visualize a 3D model
Get an image:
Obtain the depth map:
Visualize a 3D model using the depth map:
Adapt to any size
The recommended way to deal with image sizes and aspect ratios is to resample the depth map after the net evaluation. Get an image:
Obtain the dimensions of the image:
Obtain the depth map
Resample the depth map and visualize it:
Net information
Inspect the number of parameters of all arrays in the net:
Obtain the total number of parameters:
Obtain the layer type counts:
Display the summary graphic:
Export to MXNet
Export the net into a format that can be opened in MXNet:
Export also creates a net.params file containing parameters:
Get the size of the parameter file:
The size is similar to the byte count of the resource object:
Requirements
Wolfram Language
11.2
(September 2017)
or above
Resource History
Reference