Skip to content

Commit 6b905c6

Browse files
committed
- changed warning when OpenEXR is missing because there's actually no info about it in README file. Another way would be to add it there and leave warning as it is.
- updated notebooks to use Python 3 as default - fixed TF2 incompatibility in example at tensorflow.org/graphics - some typos
1 parent 71f33f6 commit 6b905c6

File tree

11 files changed

+134
-131
lines changed

11 files changed

+134
-131
lines changed

tensorflow_graphics/g3doc/_index.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"id": "q4fzyll4LvQc"
6363
},
6464
"source": [
65-
"If Tensorflow Graphics and Trimesh are not installed on your system the following cell can install theses package for you."
65+
"If Tensorflow Graphics and Trimesh are not installed on your system the following cell can install these packages for you."
6666
]
6767
},
6868
{
@@ -110,7 +110,7 @@
110110
"import tensorflow_graphics.geometry.transformation as tfg_transformation\n",
111111
"from tensorflow_graphics.notebooks import threejs_visualization\n",
112112
"\n",
113-
"tf.enable_eager_execution()"
113+
"tf.compat.v1.enable_v2_behavior()"
114114
]
115115
},
116116
{
@@ -163,8 +163,8 @@
163163
"version": "0.3.2"
164164
},
165165
"kernelspec": {
166-
"display_name": "Python 2",
167-
"name": "python2"
166+
"display_name": "Python 3",
167+
"name": "python3"
168168
}
169169
},
170170
"nbformat": 4,

tensorflow_graphics/g3doc/install.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
## Stable builds
44

55
TensorFlow Graphics depends on [TensorFlow](https://www.tensorflow.org/install)
6-
1.13.1 or above. Nightly builds of TensorFlow that tf-nightly and
7-
tf-nightly-2.0-preview are also supported.
6+
1.13.1 or above. Nightly builds of TensorFlow (tf-nightly) are also supported.
87

98
To install the latest CPU version from
109
[PyPI](https://pypi.org/project/tensorflow-graphics/), run the following:

tensorflow_graphics/notebooks/6dof_alignment.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@
681681
"version": "0.3.2"
682682
},
683683
"kernelspec": {
684-
"display_name": "Python 2",
685-
"name": "python2"
684+
"display_name": "Python 3",
685+
"name": "python3"
686686
}
687687
},
688688
"nbformat": 4,

tensorflow_graphics/notebooks/interpolation.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"source": [
6262
"Given a limited number of pre-defined points and associated values, interpolation allows to predict new data points within the range of the pre-defined points.\n",
6363
"\n",
64-
"In the example below, the left plot shows samples represented as blue dots. Assuming that these samples come from a smooth function, one has many options avaiable to find plausible values *between* these dots. A first option is to build a piece-wise linear function which links any pair of neighbouring points with a line, as can be observed in the cental plot. Another widely used option is to fit a polynomial to these samples. The right plot illustrates a cubic polynomial fitted to the samples.\n",
64+
"In the example below, the left plot shows samples represented as blue dots. Assuming that these samples come from a smooth function, one has many options available to find plausible values *between* these dots. A first option is to build a piece-wise linear function which links any pair of neighbouring points with a line, as can be observed in the central plot. Another widely used option is to fit a polynomial to these samples. The right plot illustrates a cubic polynomial fitted to the samples.\n",
6565
"\n",
6666
"![](https://storage.googleapis.com/tensorflow-graphics/notebooks/interpolation/interpolations.png)\n",
6767
"\n",
@@ -132,9 +132,9 @@
132132
},
133133
"source": [
134134
"## Slerp interpolation\n",
135-
"Lerp is a widely used interpolation technique allowing to linearly interpolate between points. The piece-wise linear interpolation described at the beginning of this Colab effectively consists of pieces of linear interpolants. But what about if our data lives on a circle or at the surface of a sphere? In that case, Lerp would not provide a good way to interpolate, but fortunately, Slerp would! Slerp stands for *spherical* linear interpolation and has been introduced in the context of interplating quaternions, which is a rotation formalism. We refer the interested reader to the [wikipedia page for Slerp](https://en.wikipedia.org/wiki/Slerp) for further details.\n",
135+
"Lerp is a widely used interpolation technique allowing to linearly interpolate between points. The piece-wise linear interpolation described at the beginning of this Colab effectively consists of pieces of linear interpolants. But what about if our data lives on a circle or at the surface of a sphere? In that case, Lerp would not provide a good way to interpolate, but fortunately, Slerp would! Slerp stands for *spherical* linear interpolation and has been introduced in the context of interpolating quaternions, which is a rotation formalism. We refer the interested reader to the [wikipedia page for Slerp](https://en.wikipedia.org/wiki/Slerp) for further details.\n",
136136
"\n",
137-
"The following demo allows to define two vectors, each starting from the center of a circle and ending on the circle. These define the vectors we want to interpolate between, and the slider 'percent' controls the extend to which each vector influence the interpolated vector. Note that the resulting vector also ends on the circle.\n"
137+
"The following demo allows to define two vectors, each starting from the center of a circle and ending on the circle. These define the vectors we want to interpolate between, and the slider 'percent' controls the extent to which each vector influences the interpolated vector. Note that the resulting vector also ends on the circle.\n"
138138
]
139139
},
140140
{
@@ -252,8 +252,8 @@
252252
"version": "0.3.2"
253253
},
254254
"kernelspec": {
255-
"display_name": "Python 2",
256-
"name": "python2"
255+
"display_name": "Python 3",
256+
"name": "python3"
257257
}
258258
},
259259
"nbformat": 4,

tensorflow_graphics/notebooks/intrinsics_optimization.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
"\n",
6464
"![](https://storage.googleapis.com/tensorflow-graphics/notebooks/intrinsics/camera_model.jpg)\n",
6565
"\n",
66-
" This model is composed of two parameters that are often refered to as intrinsic parameters:\n",
66+
" This model is composed of two parameters that are often referred to as intrinsic parameters:\n",
6767
"- the principal point, which is the projection of the optical center on the image. Ideally, the principal point is close to the center of the image.\n",
6868
"- the focal length, which is the distance between the optical center and the image plane. This parameters allows to control the level of zoom.\n",
6969
"\n",
70-
"This notebook illustrates how to use [Tensorflow Graphics](https://github.com/tensorflow/graphics) to estimate the intrinsic parameters of a projective camera. Recovering these parameters is particularly imporant to perform several tasks, including 3D reconstruction.\n",
70+
"This notebook illustrates how to use [Tensorflow Graphics](https://github.com/tensorflow/graphics) to estimate the intrinsic parameters of a projective camera. Recovering these parameters is particularly important to perform several tasks, including 3D reconstruction.\n",
7171
"\n",
7272
"In this Colab, the goal is to recover the intrinsic parameters of a camera given an observation and correspondences between the observation and the render of the current solution. Things are kept simple by only inserting a rectangle in the 3D scene, and using it as the source of correspondences during the optimization. The minimization is performed using the Levenberg-Marquardt algorithm."
7373
]
@@ -222,7 +222,7 @@
222222
"ideal_principal_point = np.array(\n",
223223
" (image_width, image_height), dtype=np.float64) / 2.0\n",
224224
"\n",
225-
"# Let's see what our scene looks like using the intrinsic paramters defined above.\n",
225+
"# Let's see what our scene looks like using the intrinsic parameters defined above.\n",
226226
"render = render_rectangle(rectangle_vertices, focal_lengths, ideal_principal_point,\n",
227227
" image_dimensions)\n",
228228
"_ = plt.imshow(render)"
@@ -355,7 +355,7 @@
355355
"id": "QTdXuY6BapnT"
356356
},
357357
"source": [
358-
"As described earlier, one can compare how the 3D object would look using the current estimate of the intrinsic parameters, can compare that to the actual observation. The following function captures a distance beween these two images which we will seek to minimize."
358+
"As described earlier, one can compare how the 3D object would look using the current estimate of the intrinsic parameters, can compare that to the actual observation. The following function captures a distance between these two images which we will seek to minimize."
359359
]
360360
},
361361
{
@@ -403,7 +403,7 @@
403403
"real_focal_lengths, real_principal_point, estimate_focal_lengths, estimate_principal_point = build_parameters(\n",
404404
")\n",
405405
"\n",
406-
"# Contructs the observed image.\n",
406+
"# Constructs the observed image.\n",
407407
"observation = render_rectangle(rectangle_vertices, real_focal_lengths,\n",
408408
" real_principal_point, image_dimensions)\n",
409409
"\n",
@@ -444,8 +444,8 @@
444444
"version": "0.3.2"
445445
},
446446
"kernelspec": {
447-
"display_name": "Python 2",
448-
"name": "python2"
447+
"display_name": "Python 3",
448+
"name": "python3"
449449
}
450450
},
451451
"nbformat": 4,

0 commit comments

Comments
 (0)