Into The Wild: Animal Detection and Classification

Quick Links

About

This repo contains codes covering how to do image detection and classification using PyTorch using Python 3.7.

If you find any mistakes or disagree with any of the explanations, please do not hesitate to submit an issue. I welcome any feedback, be it positive or negative!

Setup

  1. Download the GitHub repo by using the following command running from the terminal.

    git clone https://github.com/arpanmukherjee/Into-The-Wild-Animal-Detection-and-Classification.git
    cd Into-The-Wild-Animal-Detection-and-Classification/
  2. Install pip from the terminal, for more details please look here. Go to the following project folder and install all the dependencies by running the following command. By running this command, it will install all the dependencies you will require to run the project.

    pip install -r requirements.txt

Dataset

We used Caltech Camera Traps (CCT) dataset containing 13553 camera trapped animal images in the jungle as our training dataset. For testing we had 1712 data points from the same dataset. Annotation format is the same as the MS COCO dataset.


Fig 1: Ground Truth Class ratio of Training Data

Following are some of the sample images from the dataset, as you can see they are not very clear even for human eye.


Fig 2: Dataset Sample Images

Training

We have used the Single Shot MultiBox Detector (SSD) as our baseline model. As mentioned in the paper, we have used VGG-16 as our primary backbone architecture for feature extraction.

We experiemented with our batch size as well. We tried out 4, 8 and 16 and recieved the following mAP.

We have used batch normalization by using PyTorch’s in-built function.

We trained our model for 50,000 iterations(not epochs).

Result


Fig 3: Variation of Training Loss with iterations

Following table shows how mAP value variates with the changes of epochs.

Batch Size mAP
4 63.79%
8 63.96%
16 65.64%

Following are the resultant plots for our training and validation data.

Training Data Validation Data

Following are some of the sample predicted images from the dataset.


Fig 4: Dataset Sample Predicted Images

Project Members

  1. Arpan Mukherjee
  2. Vaibhav Varshney
  3. Rohit Arora