Skip to content
aeterna-lux edited this page Jun 7, 2022 · 10 revisions

Welcome to the baboon-tracking wiki!

Brief Overview of Our Project

Baboons are intelligent, social animals that live in troops, and scientists are interested in studying their group-level decision making. The Baboons on the Move project helps scientists study the social dynamics of a troop of baboons in Kenya, using drones to record baboon movement and activities. Video footage from the drones is post-processed to track individual baboons using computer vision technology.

However, the current implementation takes a huge amount of time for post-processing, and one of the main reasons is that the implementation uses Python, which is an interpretive language. It remains unclear whether an implementation of the algorithms in a machine-level language, such as C++, can significantly improve the runtime performance. In this project, to speed up the runtime of post-processing, we complete an implementation in C++ and investigate the feasibility of parallelizing certain algorithms, and implement them in CUDA.

We have attempted to achieve a speedup of 5x as compared to the current Python implementation and set up a testing framework to validate the output results of our implementation, so that post-processing can be completed in a reasonable time frame without compromising on the quality of results. This lays the groundwork for potentially achieving real time processing in the future.

Organization of the Repo

This repository is forked from UCSD-E4E / baboon-tracking. Most of our code can be found in the branch named feature/cpp, where we complete the C++ implementation, ensure functionality of the C++ and CUDA code bases, and perform benchmarking of the runtime performance, etc.

We have also included supporting materials for better understanding our projects. They include reports and slides for class presentations. They can be found also under the branch feature/cpp in a folder named supporting-materials. A video presentation can be found here.

Compiling and Running the Code

From the cxx/ directory, use the following commands to set up build for C++ and CUDA. Specifically, use

$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DUSE_CUDA=false

for C++ Compilation and benchmarking; and use

$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DUSE_CUDA=true

for CUDA Compilation and benchmarking.

Detailed further instructions for running the code can be found in the README.me file contained in the branch. To run the CUDA code on the Nautilus cluster which provides a cluster of GPUs, refer to the steps here.

Testing Framework

The testing framework takes two input files (e.g., they can be baboons_python.csv from the Python Implementation and baboons_c++.csv from the C++ Implementation). The framework then uses one input file as a reference, evaluates the larger bounding boxes, and outputs the percentage of bounding boxes that have similar coordinates, i.e., the percentage of closely-matching bounding boxes (CMBBs), as well as the intersection of union of the CMBBs.

Helpful Links

Project website: UCSD E4E/Baboons on the Move.

Baboons on the Move: Enhancing Understanding of Collective Decision Making through Automated Motion Detection from Aerial Drone Footage by Christopher L. Crutchfield, Jake Sutton, Anh Ngo, Emmanuel Zadorian, Gabrielle Hourany, Dylan Nelson, Alvin Wang, Fiona McHenry-Crutchfield, Deborah Forster, Shirley C. Strum, Ryan Kastner, Curt Schurgers.