Close

#3 result for object detector using Histogram of Oriented Gradients (HOG) and Linear Support Vector Machines (SVM)

A project log for Elephant AI

a system to prevent human-elephant conflict by detecting elephants using machine vision, and warning humans and/or repelling elephants

neil-k-sheridanNeil K. Sheridan 04/01/2017 at 19:320 Comments

This time I used 1000 negative training images from the caltech256 dataset. I only used parts of dataset containing animals (chimps, llamas, gorillas, kangaroos, horses, elks,..) and some landscapes (not urban) this time. These 1000 again being selected pseudo-randomly from the images I had on storage drive from the dataset. I again used only 64 positive images from the earlier caltech dataset. I used hard-negative mining on 50 images this time. That took around 40 minutes on the EC2 (virtual machine) m4.4xlarge instance I was using.

The workflow is:

  1. extract features from the positive and negative images (2 minutes)
  2. train object detector (45 minutes)
  3. hard-negative mining (40 minutes)
  4. re-train object detector with the hard-negatives (45 minutes)

N.B. If you are using EC2 like me, you can end up with broken pipe in SSH session if the client sleeps during long training sessions :-(

So how would it get on with cows and rhinos this time!? It even detected farmers once last time!

Much more promising results!

NO RHINOS DETECTED! *well in this image anyway!

Elephants still detected!

Farmers in fields not detected!

No cows detected in the several images I tested!

Tapir was unfortunately detected! It does look kind of similar to a baby elephant! Hard one!

Sloth bear was detected! Not as elephant-like as the tapir!

Tiger not detected. Yay!

I didn't undertake any stringent testing protocol to gather a percentage of false-positives and false-negatives at this early stage.

The different approach this time was to include primarily animal-based negative training images, increase the negative images used from 700 to 1000, and perform hard-negative mining on 50 vs. 10 images.


Discussions