Skip to content

Commit c744b09

Browse files
committed
v2.2:
- Updated to Anaconda Python 3.7 distribution - Added installation information for Linux systems. - Updated tutorial to point latest Tensorflow models version (used since v2.1)
1 parent 74693d6 commit c744b09

13 files changed

+482
-234
lines changed
285 Bytes
Binary file not shown.

docs/build/doctrees/index.doctree

-42 Bytes
Binary file not shown.

docs/build/doctrees/install.doctree

21.4 KB
Binary file not shown.

docs/build/doctrees/training.doctree

-3.09 KB
Binary file not shown.

docs/build/html/_sources/index.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ The software tools which we shall use throughout this tutorial are listed in the
2323
+--------------+------------------------------+
2424
| CuDNN | v7.0.5 |
2525
+--------------+------------------------------+
26-
| Anaconda | Python 3.6 (Optional) |
26+
| Anaconda | Python 3.7 (Optional) |
2727
+--------------+------------------------------+
2828

29-
.. [*] Even though this tutorial is based on Windows 10, most steps (excluding the setting of environmental variables) should apply for Linux, too.
29+
.. [*] Even though this tutorial is mostly based (and properly tested) on Windows 10, information is also provided for Linux systems.
3030
3131
.. toctree::
3232
:maxdepth: 4

docs/build/html/_sources/install.rst.txt

Lines changed: 103 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,25 @@ General Remarks
1010

1111
- To ensure that we have no package conflicts and/or that we can install several different versions/variants of TensorFlow (e.g. CPU and GPU), it is generally recommended to use a virtual environment of some sort. For the purposes of this tutorial we will be creating and managing our virtual environments using Anaconda, but you are welcome to use the virtual environment manager of your choice (e.g. virtualenv).
1212

13-
Install Anaconda Python 3.6 (Optional)
13+
Install Anaconda Python 3.7 (Optional)
1414
--------------------------------------
1515
Although having Anaconda is not a requirement in order to install and use TensorFlow, I suggest doing so, due to it's intuitive way of managing packages and setting up new virtual environments. Anaconda is a pretty useful tool, not only for working with TensorFlow, but in general for anyone working in Python, so if you haven't had a chance to work with it, now is a good chance.
1616

17-
- Go to `<https://www.anaconda.com/download/>`_
18-
- Download Anaconda Python 3.6 version
19-
- If disk space is an issue for your machine, you could install the minified version of Anaconda (i.e. Miniconda).
20-
- When prompted for a "Destination Folder" you can chose whichever you wish, but I generally tend to use ``C:\Anaconda3``, to keep things simple. Putting Anaconda under ``C:\Anaconda3`` also ensures that you don't get the awkward ```Destination Folder` contains spaces`` warning.
17+
.. tabs::
18+
19+
.. tab:: Windows
20+
21+
- Go to `<https://www.anaconda.com/download/>`_
22+
- Download `Anaconda Python 3.7 version for Windows <https://repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86_64.exe>`_
23+
- Run the downloaded executable (``.exe``) file to begin the installation. See `here <https://docs.anaconda.com/anaconda/install/windows/>`_ for more details.
24+
- (Optional) In the next step, check the box "Add Anaconda to my PATH environment variable". This will make Anaconda your default Python distribution, which should ensure that you have the same default Python distribution across all editors.
25+
26+
.. tab:: Linux
27+
28+
- Go to `<https://www.anaconda.com/download/>`_
29+
- Download `Anaconda Python 3.7 version for Linux <https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh>`_
30+
- Run the downloaded bash script (``.sh``) file to begin the installation. See `here <https://docs.anaconda.com/anaconda/install/linux/>`_ for more details.
31+
- When prompted with the question "Do you wish the installer to prepend the Anaconda<2 or 3> install location to PATH in your /home/<user>/.bashrc ?", answer "Yes". If you enter "No", you must manually add the path to Anaconda or conda will not work.
2132

2233
.. _tf_install:
2334

@@ -123,47 +134,80 @@ Before proceeding to install TesnsorFlow GPU, you need to make sure that your sy
123134
+-------------------------------------+
124135
| CuDNN v7.0.5 |
125136
+-------------------------------------+
126-
| Anaconda with Python 3.6 (Optional) |
137+
| Anaconda with Python 3.7 (Optional) |
127138
+-------------------------------------+
128139

129140
.. _cuda_install:
130141

131142
Install CUDA Toolkit
132143
***********************
133-
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork>`_ to download and install CUDA Toolkit v9.0.
144+
.. tabs::
145+
146+
.. tab:: Windows
147+
148+
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork>`_ to download and install CUDA Toolkit v9.0.
149+
150+
.. tab:: Linux
151+
152+
Follow this `link <https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64>`_ to download and install CUDA Toolkit v9.0 for your Linux distribution.
134153

135154
.. _cudnn_install:
136155

137156
Install CUDNN
138157
****************
139-
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
140-
- Create a user profile if needed and log in
141-
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
142-
- Download `cuDNN v7.0.5 Library for Windows 10 <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7>`_
143-
- Extract the contents of the zip file (i.e. the folder named ``cuda``) inside ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\``, where ``<INSTALL_PATH>`` points to the installation directory specified during the installation of the CUDA Toolkit. By default ``<INSTALL_PATH>`` = ``C:\Program Files``.
158+
.. tabs::
159+
160+
.. tab:: Windows
161+
162+
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
163+
- Create a user profile if needed and log in
164+
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
165+
- Download `cuDNN v7.0.5 Library for Windows 10 <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7>`_
166+
- Extract the contents of the zip file (i.e. the folder named ``cuda``) inside ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\``, where ``<INSTALL_PATH>`` points to the installation directory specified during the installation of the CUDA Toolkit. By default ``<INSTALL_PATH>`` = ``C:\Program Files``.
167+
168+
.. tab:: Linux
169+
170+
- Go to `<https://developer.nvidia.com/rdp/cudnn-download>`_
171+
- Create a user profile if needed and log in
172+
- Select `cuDNN v7.0.5 (Feb 28, 2018), for CUDA 9.0 <https://developer.nvidia.com/rdp/cudnn-download#a-collapse705-9>`_
173+
- Download `cuDNN v7.0.5 Library for Linux <https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-linux-x64-v7>`_
174+
- Follow the instructions under Section 2.3.1 of the `CuDNN Installation Guide <https://developer.download.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/Doc/cuDNN-Installation-Guide.pdf?KuMH0SWQKOxRm-iCAdfWlxEMK7eWjI528XHuZvaXjt73sOFgHT0dczMVRMRx8NqSNxabcGwzsgBgdTeshiZqQ7QmMQ3DwdTQHbjJGu04-Dw1F4Eyvd8B9u_U5YkSthOTFCASAp-MWj6Ki9RIK209dftWXhk7Df33u2__kbsKa5L9a0BXvRfTjZ-LZzH3zQpydg>`_ to install CuDNN.
144175

145176
.. _set_env:
146177

147-
Set Your Environment Variables
148-
**********************************
178+
Environment Setup
179+
*****************
180+
.. tabs::
149181

150-
- Go to `Start` and Search "environment variables"
151-
- Click the Environment Variables button
152-
- Click on the ``Path`` system variable and select edit
153-
- Add the following paths:
154-
155-
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin``
156-
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp``
157-
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\CUPTI\libx64``
158-
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\cuda\bin``
182+
.. tab:: Windows
183+
184+
- Go to `Start` and Search "environment variables"
185+
- Click the Environment Variables button
186+
- Click on the ``Path`` system variable and select edit
187+
- Add the following paths:
188+
189+
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin``
190+
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp``
191+
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\CUPTI\libx64``
192+
- ``<INSTALL_PATH>\NVIDIA GPU Computing Toolkit\CUDA\v9.0\cuda\bin``
193+
194+
.. tab:: Linux
195+
196+
As per Section 7.1.1 of the `CUDA Installation Guide for Linux <http://developer.download.nvidia.com/compute/cuda/9.0/Prod/docs/sidebar/CUDA_Installation_Guide_Linux.pdf>`_, append the following lines to ``~/.bashrc``:
197+
198+
.. code-block:: bash
199+
200+
# CUDA related exports
201+
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
202+
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
159203
160204
Update your GPU drivers (Optional)
161205
**********************************
162206
If during the installation of the CUDA Toolkit (see :ref:`cuda_install`) you selected the `Express Installation` option, then your GPU drivers will have been overwritten by those that come bundled with the CUDA toolkit. These drivers are typically NOT the latest drivers and, thus, you may wish to updte your drivers.
163207

164208
- Go to `<http://www.nvidia.com/Download/index.aspx>`_
165209
- Select your GPU version to download
166-
- Install the driver
210+
- Install the driver for your chosen OS
167211

168212
Create a new Conda virtual environment
169213
**************************************
@@ -259,15 +303,15 @@ Building on the assumption that you have just created your new virtual environme
259303
+--------------+------------------------------+
260304
| Name | Tutorial version-build |
261305
+==============+==============================+
262-
| pillow | 5.0.0-py36h0738816_0 |
306+
| pillow | 5.4.1-py36hdc69c19_0 |
263307
+--------------+------------------------------+
264-
| lxml | 4.2.0-py36heafd4d3_0 |
308+
| lxml | 4.3.1-py36h1350720_0 |
265309
+--------------+------------------------------+
266-
| jupyter | 1.0.0-py36_4 |
310+
| jupyter | 1.0.0-py36_7 |
267311
+--------------+------------------------------+
268-
| matplotlib | 2.2.2-py36h153e9ff_0 |
312+
| matplotlib | 3.0.2-py36hc8f65d3_0 |
269313
+--------------+------------------------------+
270-
| opencv | 3.3.1-py36h20b85fd_1 |
314+
| opencv | 3.4.2-py36h40b0b35_0 |
271315
+--------------+------------------------------+
272316

273317
The packages can be installed using ``conda`` by running:
@@ -307,7 +351,7 @@ Downloading the TensorFlow Models
307351
├── samples
308352
└── tutorials
309353
310-
.. [#] The latest repo commit when writing this tutorial is `da903e0 <https://github.com/tensorflow/models/commit/da903e07aea0887d59ebf612557243351ddfb4e6>`_.
354+
.. [#] The latest repo commit when writing this tutorial is `4b566d4 <https://github.com/tensorflow/models/commit/4b566d4e800ff82579eda1f682f9ce7aa8792ea8>`_.
311355
312356
Protobuf Installation/Compilation
313357
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -483,10 +527,20 @@ To deal with the fact that ``labelImg`` (on Windows) requires the use of ``pyqt4
483527

484528
* Open a new `Anaconda/Command Prompt` window
485529
* Type the following command:
530+
531+
.. tabs::
486532

487-
.. code-block:: bash
533+
.. tab:: Windows
488534

489-
conda create -n labelImg pyqt=4
535+
.. code-block:: bash
536+
537+
conda create -n labelImg pyqt=4
538+
539+
.. tab:: Linux
540+
541+
.. code-block:: bash
542+
543+
conda create -n labelImg pyqt=5
490544
491545
* The above will create a new virtual environment with name ``labelImg``
492546
* Now lets activate the newly created virtual environment by running the following in the `Anaconda Promt` window:
@@ -527,11 +581,23 @@ Installing dependencies and compiling package
527581
- Open a new `Anaconda/Command Prompt` window and activate the `tensorflow_gpu` environment (if you have not done so already)
528582
- ``cd`` into ``TensorFlow\addons\labelImg`` and run the following commands:
529583

530-
.. code-block:: posh
531-
532-
conda install pyqt=4
533-
conda install lxml
534-
pyrcc4 -py3 -o resources.py resources.qrc
584+
.. tabs::
585+
586+
.. tab:: Windows
587+
588+
.. code-block:: bash
589+
590+
conda install pyqt=4
591+
conda install lxml
592+
pyrcc4 -py3 -o resources.py resources.qrc
593+
594+
.. tab:: Linux
595+
596+
.. code-block:: bash
597+
598+
sudo apt-get install pyqt5-dev-tools
599+
sudo pip install -r requirements/requirements-linux-python3.txt
600+
make qt5py3
535601
536602
537603
Test your installation

docs/build/html/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,22 @@ <h1>TensorFlow Object Detection API tutorial<a class="headerlink" href="#tensorf
180180
<td>v7.0.5</td>
181181
</tr>
182182
<tr class="row-odd"><td>Anaconda</td>
183-
<td>Python 3.6 (Optional)</td>
183+
<td>Python 3.7 (Optional)</td>
184184
</tr>
185185
</tbody>
186186
</table>
187187
<table class="docutils footnote" frame="void" id="id2" rules="none">
188188
<colgroup><col class="label" /><col /></colgroup>
189189
<tbody valign="top">
190-
<tr><td class="label"><a class="fn-backref" href="#id1">[*]</a></td><td>Even though this tutorial is based on Windows 10, most steps (excluding the setting of environmental variables) should apply for Linux, too.</td></tr>
190+
<tr><td class="label"><a class="fn-backref" href="#id1">[*]</a></td><td>Even though this tutorial is mostly based (and properly tested) on Windows 10, information is also provided for Linux systems.</td></tr>
191191
</tbody>
192192
</table>
193193
<div class="toctree-wrapper compound">
194194
<p class="caption"><span class="caption-text">Contents:</span></p>
195195
<ul>
196196
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a><ul>
197197
<li class="toctree-l2"><a class="reference internal" href="install.html#general-remarks">General Remarks</a></li>
198-
<li class="toctree-l2"><a class="reference internal" href="install.html#install-anaconda-python-3-6-optional">Install Anaconda Python 3.6 (Optional)</a></li>
198+
<li class="toctree-l2"><a class="reference internal" href="install.html#install-anaconda-python-3-7-optional">Install Anaconda Python 3.7 (Optional)</a></li>
199199
<li class="toctree-l2"><a class="reference internal" href="install.html#tensorflow-installation">TensorFlow Installation</a><ul>
200200
<li class="toctree-l3"><a class="reference internal" href="install.html#tensorflow-cpu">TensorFlow CPU</a><ul>
201201
<li class="toctree-l4"><a class="reference internal" href="install.html#create-a-new-conda-virtual-environment-optional">Create a new Conda virtual environment (Optional)</a></li>
@@ -206,11 +206,11 @@ <h1>TensorFlow Object Detection API tutorial<a class="headerlink" href="#tensorf
206206
<li class="toctree-l3"><a class="reference internal" href="install.html#tensorflow-gpu">TensorFlow GPU</a><ul>
207207
<li class="toctree-l4"><a class="reference internal" href="install.html#install-cuda-toolkit">Install CUDA Toolkit</a></li>
208208
<li class="toctree-l4"><a class="reference internal" href="install.html#install-cudnn">Install CUDNN</a></li>
209-
<li class="toctree-l4"><a class="reference internal" href="install.html#set-your-environment-variables">Set Your Environment Variables</a></li>
209+
<li class="toctree-l4"><a class="reference internal" href="install.html#environment-setup">Environment Setup</a></li>
210210
<li class="toctree-l4"><a class="reference internal" href="install.html#update-your-gpu-drivers-optional">Update your GPU drivers (Optional)</a></li>
211211
<li class="toctree-l4"><a class="reference internal" href="install.html#create-a-new-conda-virtual-environment">Create a new Conda virtual environment</a></li>
212212
<li class="toctree-l4"><a class="reference internal" href="install.html#install-tensorflow-gpu-for-python">Install TensorFlow GPU for Python</a></li>
213-
<li class="toctree-l4"><a class="reference internal" href="install.html#id4">Test your Installation</a></li>
213+
<li class="toctree-l4"><a class="reference internal" href="install.html#id10">Test your Installation</a></li>
214214
</ul>
215215
</li>
216216
</ul>
@@ -225,10 +225,10 @@ <h1>TensorFlow Object Detection API tutorial<a class="headerlink" href="#tensorf
225225
</ul>
226226
</li>
227227
<li class="toctree-l2"><a class="reference internal" href="install.html#labelimg-installation">LabelImg Installation</a><ul>
228-
<li class="toctree-l3"><a class="reference internal" href="install.html#id13">Create a new Conda virtual environment</a></li>
228+
<li class="toctree-l3"><a class="reference internal" href="install.html#id19">Create a new Conda virtual environment</a></li>
229229
<li class="toctree-l3"><a class="reference internal" href="install.html#downloading-labelimg">Downloading labelImg</a></li>
230230
<li class="toctree-l3"><a class="reference internal" href="install.html#installing-dependencies-and-compiling-package">Installing dependencies and compiling package</a></li>
231-
<li class="toctree-l3"><a class="reference internal" href="install.html#id18">Test your installation</a></li>
231+
<li class="toctree-l3"><a class="reference internal" href="install.html#id24">Test your installation</a></li>
232232
</ul>
233233
</li>
234234
</ul>

0 commit comments

Comments
 (0)