Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples for the Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Resource
Learn More about
Wolfram Language
Related Pages
Related Symbols
NetChain
NetEncoder
NetGraph
NetModel
Image
Related Categories
Machine Learning
Image Processing
Computer Vision
Visualize Depth in a Single Image
Use a pre-trained neural net to estimate the depth
Example Notebook
Open in Cloud
Download Notebook
Use a neural network that was trained to predict the relative depth map from a single image using a technique based on sparse ordinal annotations:
I
n
[
1
]
:
=
n
e
t
=
N
e
t
M
o
d
e
l
[
"
S
i
n
g
l
e
-
I
m
a
g
e
D
e
p
t
h
P
e
r
c
e
p
t
i
o
n
N
e
t
T
r
a
i
n
e
d
o
n
N
Y
U
D
e
p
t
h
V
2
a
n
d
D
e
p
t
h
i
n
t
h
e
W
i
l
d
D
a
t
a
"
]
O
u
t
[
1
]
=
Get a 2D image:
I
n
[
2
]
:
=
i
m
a
g
e
=
I
m
p
o
r
t
[
"
h
t
t
p
s
:
/
/
c
d
n
.
p
i
x
a
b
a
y
.
c
o
m
/
p
h
o
t
o
/
2
0
1
7
/
0
2
/
1
4
/
0
3
/
0
3
/
a
m
a
-
d
a
b
l
a
m
-
2
0
6
4
5
2
2
_
1
2
8
0
.
j
p
g
"
,
I
m
a
g
e
S
i
z
e
3
4
0
]
O
u
t
[
2
]
=
Apply the net to the image to get the 2D depth map. Brighter points correspond to further regions:
I
n
[
3
]
:
=
d
e
p
t
h
M
a
p
=
n
e
t
[
i
m
a
g
e
]
;
I
m
a
g
e
[
d
e
p
t
h
M
a
p
]
/
/
I
m
a
g
e
A
d
j
u
s
t
O
u
t
[
3
]
=
Use
L
i
s
t
P
l
o
t
3
D
to plot a 3D representation of the depth map:
I
n
[
4
]
:
=
L
i
s
t
P
l
o
t
3
D
-
R
e
v
e
r
s
e
@
N
o
r
m
a
l
@
d
e
p
t
h
M
a
p
,
O
u
t
[
4
]
=
Combine the original image with the depth plot using the
T
e
x
t
u
r
e
directive:
I
n
[
5
]
:
=
L
i
s
t
P
l
o
t
3
D
-
A
r
r
a
y
R
e
s
a
m
p
l
e
[
R
e
v
e
r
s
e
@
N
o
r
m
a
l
@
d
e
p
t
h
M
a
p
,
R
e
v
e
r
s
e
[
I
m
a
g
e
D
i
m
e
n
s
i
o
n
s
[
i
m
a
g
e
]
]
]
,
P
l
o
t
S
t
y
l
e
T
e
x
t
u
r
e
[
i
m
a
g
e
]
,
O
u
t
[
5
]
=
See Also
Photo Colorization
Identify and Label Parts of an Image
Related Symbols
NetChain
NetEncoder
NetGraph
NetModel
Image
Publisher Information
Contributed by:
Wolfram Staff