Skip to content

Commit

Permalink
Merge branch 'dev/more-doc'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdawkins committed Feb 5, 2018
2 parents 54a1149 + b47749f commit a5f4b0e
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 60 deletions.
1 change: 1 addition & 0 deletions doc/manuals/example_links/example_capabilities.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../../examples/README.rst
1 change: 1 addition & 0 deletions doc/manuals/example_links/external_kwiver.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions doc/manuals/example_links/measurement_using_stereo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../../examples/measurement_using_stereo/README.rst
19 changes: 10 additions & 9 deletions doc/manuals/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ Contents:
:maxdepth: 1

example_links/building_viame
example_links/common_data
example_links/detection_file_conversions
example_links/example_capabilities
example_links/hello_world_pipeline
example_links/detector_pipelines
example_links/detector_training
example_links/detector_training_old_api
example_links/external_plugin_creation
example_links/hello_world_pipeline
example_links/image_and_video_search
example_links/scoring_and_roc_generation
example_links/detection_file_conversions
example_links/tracking_pipeline
example_links/using_detectors_in_gui
example_links/image_and_video_search
example_links/using_detectors_in_cxx_code
example_links/visualizing_detections_in_gui

example_links/scoring_and_roc_generation
example_links/external_plugin_creation
Core Object Types <http://kwiver.readthedocs.io/en/latest/vital/architecture.html>
Basic Processing Elements <http://kwiver.readthedocs.io/en/latest/arrows/architecture.html>
KWIVER Pipelining <http://kwiver.readthedocs.io/en/latest/sprokit/architecture.html>


.. |br| raw:: html
Expand Down
134 changes: 83 additions & 51 deletions examples/building_viame/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,40 @@

.. _linux-label:

==============
Building VIAME
==============
|
==========================
Building VIAME From Source
==========================

|See the platform-specific guides below, though the process is similar for each.
|
|Example location online:
|
|https://github.com/Kitware/VIAME/tree/master/examples/building_viame
|
|Example location in VIAME installation:
|
|[viame-install]/examples/building_viame
See the platform-specific guides below, though the process is similar for each.

*****************
Building on Linux
*****************

These instructions are designed to help build VIAME on a fresh machine. They were written for and tested on Ubuntu
16.04 Desktop version. Other Linux machines will have similar directions, but some steps (particularly the dependency
install) may not be exactly identical. VIAME has also been built on: CentOS/RHEL 6+, Fedora 19+, Ubuntu 14.04+.
These instructions are designed to help build VIAME on a fresh machine. They were
written for and tested on Ubuntu 16.04 Desktop version. Other Linux machines will
have similar directions, but some steps (particularly the dependency install) may
not be exactly identical. VIAME has also been built on: CentOS/RHEL 6+, Fedora 19+,
Ubuntu 14.04+.

Install Dependencies
====================

Some of the dependencies required for VIAME can be installed with one quick and easy instruction with no configuration
required. Different Linux distributions may have different packages already installed, or may use a different package
manager than apt, but on Ubuntu this should help to provide a starting point.
Some of the dependencies required for VIAME can be installed with one quick and easy
instruction with no configuration required. Different Linux distributions may have
different packages already installed, or may use a different package manager than
apt, but on Ubuntu this should help to provide a starting point.

.. code-block:: bash
Expand All @@ -39,13 +53,15 @@ If using VIAME_ENABLE_PYTHON, you also may need to install python2.7, python2.7-
Install CMAKE
=============

Depending on the OS, the version of cmake you get with apt/yum is often too old to use for VIAME (you currently need
at least CMake 3.3) so you may need to do a manual install. Go to the cmake website,
``https://cmake.org/download``, and download the appropriate binary distribution (for Ubuntu, this would be something
like cmake-3.6.1-Linux-x86_64.sh, depending on version). Alternatively, download the source code, e.g. cmake-3.6.1.tar.gz,
and build the binaries from source. To untar and build the source, use the following set of commands. Keep in mind
that if you're not using version 3.6.1, you'll need to update the version number in the
below to match your downloaded version.
Depending on the OS, the version of cmake you get with apt/yum is often too old to
use for VIAME (you currently need at least CMake 3.3) so you may need to do a manual
install. Go to the cmake website, ``https://cmake.org/download``, and download the
appropriate binary distribution (for Ubuntu, this would be something like
cmake-3.6.1-Linux-x86_64.sh, depending on version). Alternatively, download the
source code, e.g. cmake-3.6.1.tar.gz, and build the binaries from source. To untar
and build the source, use the following set of commands. Keep in mind that if you're
not using version 3.6.1, you'll need to update the version number in the below to
match your downloaded version.


.. code-block:: bash
Expand All @@ -58,16 +74,19 @@ below to match your downloaded version.
sudo make install
sudo ln -s /usr/local/bin/cmake /bin/cmake
These instructions build the source code into a working executable, installs the executable into a personal system
directory, and then lets the operating system know where that directory is so it can find cmake in the future in
case /usr/local/bin isn't in your PATH variable by default.
These instructions build the source code into a working executable, installs the
executable into a personal system directory, and then lets the operating system
know where that directory is so it can find cmake in the future in case
/usr/local/bin isn't in your PATH variable by default.

Prepare the Source
==================

With all our dependencies installed, we need to build the environment for VIAME itself. VIAME uses git submodules rather
than requiring the user to grab each repository totally separately. To prepare the environment and obtain all the necessary
source code, use the following commands. Note that you can change ``src`` to whatever you want to name your VIAME source directory.
With all our dependencies installed, we need to build the environment for VIAME
itself. VIAME uses git submodules rather than requiring the user to grab each
repository totally separately. To prepare the environment and obtain all the
necessary source code, use the following commands. Note that you can change ``src``
o whatever you want to name your VIAME source directory.

.. code-block:: bash
Expand All @@ -78,10 +97,12 @@ source code, use the following commands. Note that you can change ``src`` to wha
Build VIAME
===========

VIAME may be built with a number of optional plugins--VXL, Caffe, OpenCV, Scallop_TK, and Matlab--with a corresponding option
called VIAME_ENABLE_[option], in all caps. For each plugin to install, you need a cmake build flag setting the option. The
flag looks like ``-DVIAME_ENABLE_OPENCV:BOOL=ON``, of course changing OPENCV to match the plugin. Multiple plugins may be
used, or none. They are listed below:
VIAME may be built with a number of optional plugins--VXL, Caffe, OpenCV,
Scallop_TK, and Matlab--with a corresponding option called VIAME_ENABLE_[option],
in all caps. For each plugin to install, you need a cmake build flag setting the
option. The flag looks like ``-DVIAME_ENABLE_OPENCV:BOOL=ON``, of course changing
OPENCV to match the plugin. Multiple plugins may be used, or none. They are listed
below:



Expand Down Expand Up @@ -109,7 +130,8 @@ used, or none. They are listed below:
| VIAME_ENABLE_UW_CLASSIFIER | Builds UW fish classifier plugin |
+------------------------------+---------------------------------------------------------------------------------------+

There are also a number of flags which control which system utilities and optimizations are built in, e.g.:
There are also a number of flags which control which system utilities and
optimizations are built in, e.g.:

+------------------------------+---------------------------------------------------------------------------------------------+
| Flag | Description |
Expand All @@ -131,8 +153,9 @@ There are also a number of flags which control which system utilities and optimi
| VIAME_DOWNLOAD_MODELS | Downloads pre-trained models for use with the examples and training new models |
+------------------------------+---------------------------------------------------------------------------------------------+

VIAME can be built either in the source directory tree or in a seperate build directory (recommended). Replace
"[build-directory]" with your location of choice, and run the following commands:
VIAME can be built either in the source directory tree or in a seperate build
directory (recommended). Replace "[build-directory]" with your location of choice,
and run the following commands:

.. code-block:: bash
Expand All @@ -141,8 +164,9 @@ VIAME can be built either in the source directory tree or in a seperate build di
cmake [build_flags] [path_to_source_tree]
make # or make -j10 for a threaded build
Depending on which enable flags you have set and your system configuration, you may need to set additional cmake variables
to point to dependency locations. An example is below for a system with CUDA, Python, and Matlab enabled.
Depending on which enable flags you have set and your system configuration, you may
need to set additional cmake variables to point to dependency locations. An example
is below for a system with CUDA, Python, and Matlab enabled.

.. image:: http://www.viametoolkit.org/wp-content/uploads/2017/03/cmake-options.png
:scale: 30 %
Expand All @@ -154,34 +178,42 @@ to point to dependency locations. An example is below for a system with CUDA, Py
Building on Mac OSX
*******************

Building on Mac is very similar to Linux, minus the dependency install stage. Currently, we have only tested VIAME
with OSX 10.11.5 and Clang 7.3.0, but other versions may also work. Make sure you have a C/C++ development
environment set up, install git, install cmake either from the source or a using a binary installer, and lastly,
follow the same Linux build instructions above.
Building on Mac is very similar to Linux, minus the dependency install stage.
Currently, we have only tested VIAME with OSX 10.11.5 and Clang 7.3.0, but other
versions may also work. Make sure you have a C/C++ development environment set up,
install git, install cmake either from the source or a using a binary installer, and
lastly, follow the same Linux build instructions above.

.. _windows-label:

*******************
Building on Windows
*******************

Building on windows can be very similar to Linux if using a shell like cygwin (``https://www.cygwin.com/``), though if not you
may want to go grab the GUI versions of CMake (``https://cmake.org/``) and TortoiseGit (``https://tortoisegit.org/``). Currently
Visual Studio 2013, 2015 and EARLY VERSION ONLY of 2017 are supported. Latest 2017 is not yet supported but will be shortly.
Building on windows can be very similar to Linux if using a shell like cygwin
(``https://www.cygwin.com/``), though if not you may want to go grab the GUI
ersions of CMake (``https://cmake.org/``) and TortoiseGit (``https://tortoisegit.org/``).
Currently Visual Studio 2013, 2015 and EARLY VERSION ONLY of 2017 are supported.
Latest 2017 is not yet supported but will be shortly.

First do a Git clone of the source code for VIAME. If you have TortoiseGit this involves right clicking in your folder of
choice, selecting Git Clone, and then entering the URL to VIAME (``https://github.com/Kitware/VIAME.git``) and the location
First do a Git clone of the source code for VIAME. If you have TortoiseGit this
involves right clicking in your folder of choice, selecting Git Clone, and then
entering the URL to VIAME (``https://github.com/Kitware/VIAME.git``) and the location
of where you want to put the downloaded source code.

Next, do a git submodule update to pull down all required packages. In TortoiseGit right click on the folder you checked
out the source into, move to the TortoiseGit menu section, and select ``Submodule Update``.
Next, do a git submodule update to pull down all required packages. In TortoiseGit
right click on the folder you checked out the source into, move to the TortoiseGit
menu section, and select ``Submodule Update``.

Next, install any required dependencies for items you want to build. If using CUDA, version 8.0 is desired, along with
Python 2.7. Other versions have yet to be tested extensively. On Windows it can also be beneficial to use Anaconda to get
multiple python packages. Boost Python (turned on by default when Python is enabled) requires Numpy and a few other dependencies.
Next, install any required dependencies for items you want to build. If using CUDA,
version 8.0 is desired, along with Python 2.7. Other versions have yet to be tested
extensively. On Windows it can also be beneficial to use Anaconda to get multiple
python packages. Boost Python (turned on by default when Python is enabled) requires
Numpy and a few other dependencies.

Finally, create a build folder and run the CMake GUI (``https://cmake.org/runningcmake/``). Point it to your source and build
directories, select your compiler of choice, and setup and build flags you want.
Finally, create a build folder and run the CMake GUI (``https://cmake.org/runningcmake/``).
Point it to your source and build directories, select your compiler of choice, and
setup and build flags you want.


.. _tips-label:
Expand Down Expand Up @@ -296,9 +328,9 @@ You have python installed, but not numpy. Install numpy.

**Solution:**

VIAME contains a ``VIAME_DISABLE_GPU_SUPPORT`` flag due to numerous issues relating to GPU code building.
Alternatively you can debug the issue (incorrect CUDA drivers for OpenCV, Caffe, etc...), or alternatively
not having your CUDA headers set to be in your include path.
VIAME contains a ``VIAME_DISABLE_GPU_SUPPORT`` flag due to numerous issues relating to
GPU code building. Alternatively you can debug the issue (incorrect CUDA drivers for
OpenCV, Caffe, etc...), or alternatively not having your CUDA headers set to be in your include path.


**Issue:**
Expand Down
12 changes: 12 additions & 0 deletions examples/measurement_using_stereo/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

=====================================
Size Measurement Using Stereo Cameras
=====================================

.. image:: http://www.viametoolkit.org/wp-content/uploads/2018/02/fish_measurement_example.png
:scale: 60 %
:align: center

Coming Soon!

.. _Pull Request: /https://github.com/Kitware/VIAME/pull/25

0 comments on commit a5f4b0e

Please sign in to comment.