Tracking
Our tracking system combines OpenCV's native tracking algorithms with YOLO's object detection to allow for dynamic tracking of detected objects. It also allows us to mitigate redundant detections by comparing tracking results with YOLO's results to check if something detected is already being tracked.
Installation
To use tracking, we are using OpenCV 3.1.0 compiled with opencv modules, again at 3.1.0. If you had already installed OpenCV by following the instructions in the YOLO section, you will still have to follow these instructions to include the extra modules, but it should not affect YOLO's operation.
OpenCV 3.3.0
https://www.learnopencv.com/install-opencv3-on-ubuntu/
Install dependencies
sudo apt-get remove x264 libx264-dev
sudo apt-get install build-essential checkinstall cmake pkg-config yasm gfortran git
sudo apt-get install libjpeg8-dev libjasper-dev libpng12-dev
sudo apt-get install libtiff5-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev
sudo apt-get install libxine2-dev libv4l-dev
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
sudo apt-get install libqt4-dev libgtk2.0-dev libtbb-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libfaac-dev libmp3lame-dev libtheora-dev
sudo apt-get install libvorbis-dev libxvidcore-dev
sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev
sudo apt-get install x264 v4l-utils
Download the OpenCV and additional modules source
cd <build/location/of/your/choice>
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.3.0
cd ..
git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
git checkout 3.3.0
cd ..
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_5BB=ON \
-D WITH_V4L=ON \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
# -j4 will compile with 4 processor cores. This can be set to whatever number you want.
# run nproc to see how many cores you have.
make -j4
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig