Lecture slides, problem sets, and C++ solutions to UD810.
- Original Google Doc with problem sets and slides
- Miscellaneous images from USC
- Computer vision image database from the University of Edinburgh
I try to accelerate all of the assignments with CUDA, so you will need an Nvidia GPU along with CUDA toolkit installed. This repository is developed on:
- Ubuntu 17.10 + CUDA 9.1; Intel Core i7 6800k + GeForce GTX 1080
- CUDA: Follow Nvidia's CUDA installation instructions to install.
- Git LFS is required to clone the images and lecture slides.
From here, there are two options: building in Docker or just building locally on a host machine.
This is the suggested approach to building this project since all of the dependencies are included in the Docker image.
- Install Docker-CE as described for your distribution on the Docker docs.
- Follow the Optional Linux post-installation steps to run Docker without
sudo
.
- Follow the Optional Linux post-installation steps to run Docker without
- Install nvidia-docker2 as described in the
nvidia-docker
docs. The container provided in this repo needs thenvidia
Docker runtime to run. - Clone this repo and build/run the Docker container:
git clone --recursive https://github.com/tanmaniac/IntroToComputerVision.git
cd IntroToComputerVision/Docker
# Build the Docker container
./build.sh
# Run the container
./run.sh
This will drop you into a shell where you can follow the build steps below. The IntroToComputerVision
directory (this one) is mapped to ${HOME}/IntroToComputerVision
in the Docker container.
- Build OpenCV 3.4.1 as directed in the OpenCV documentation. Make sure to add the
-DWITH_CUDA=ON
CMake flag to compile CUDA features. - Install Eigen as described in its documentation.
gnuplot
, which you can install from your distro repository. On Ubuntu:
sudo apt install gnuplot
# Navigate to wherever you cloned this repo first
mkdir build && cd build
cmake ..
make -j
If you want to use NVIDIA debugging tools, like cuda-memcheck
or the NVIDIA Visual Profiler, compile with Debug flags:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j
Note that this increases runtime of some kernels by around 100x, so only compile in debug mode if you need it.
Build outputs are placed in the bin
directory. All of the executables are configured with YAML files in the config
directory. You can edit these to change the input parameters to each of the assignments. For example, with Problem Set 0, all you need to do (after building) is:
cd bin
./ps0