20
An Algorithm for In Situ Omnidirectional Vision-Based Bee Counting Using 1D Haar Wavelet Spikes Vladimir Kulyukin Department of Computer Science Utah State University IMECS 2017

IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Embed Size (px)

Citation preview

Page 1: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

An Algorithm for In Situ OmnidirectionalVision-Based Bee Counting Using 1D Haar

Wavelet Spikes

Vladimir KulyukinDepartment of Computer Science

Utah State University

IMECS 2017

Page 2: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Outline

IntroductionBee Counting AlgorithmEvaluationConclusions

Page 3: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Introduction

Page 4: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Langstroth Beehives

The hive is named after Rev. L. L. Langstroth who designed and patented the original design in 1852

Many major modifications have been made to Langstroth's design but the name is still used

Many beekeepers worldwide keep their bees in Langstroth beehives or modifications thereof

Most Langstroth beehives have landing pads where bees land and fly off

Page 5: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Why Count Bees on Landing Pads?

Professional and amateur beekeepers use visual estimates of forager traffic levels to evaluate bee colonies' healthHigher traffic levels may indicate onsets of swarms or colony robbing activitiesLower levels of forager traffic may indicate mite infestations, failing queens, or chemical poisonings

Page 6: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Why Use CV in Electronic Beehive Monitoring?

Mechanical and electrical bee counting devices have existed for several decades

Slow adoption of these devices by the beekeeping community can be attributed to required structural modifications of standard beehives

Given increasing availability and decreasing costs of CV hardware (e.g., miniature cameras and storage devices) and open source CV tools and libraries, CV is ready for inclusion in electronic beehive monitoring sensor suites

CV does not require any structural modifications of beehives

Page 7: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

BeePi Hardware

BeePi is a multi-sensor electronic beehive monitoring system my students and I designed and built in 2015; BeePi is ready to start its third beekeeping season; main hardware components are 1) deep cycle battery; 2) RPi; 3) RPi camera board; 4) car charger; 5) breadboard; 6) solar charge controller; 7) solar panel wires

Page 8: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

BeePi Deployment

It takes about 20 minutes to wire a BeePi unit for deployment

Deployed BeePi: 1) box with BeePi hardware; 2) sensor protection box; 3) solar panel

Page 9: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Bee Counting Algorithm

Page 10: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Input Images

Images are captured every 5 minutes

Page 11: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Bee Counting Algorithm

procedure countBees(Img, N) L = localizedLandingPad(Img) gaussianBlur(L) pyramidMeanShiftFilter(L) bleachBluePixels(L) convertToGrayscale(L) countBeePixels(L)/N

Page 12: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Up-Down Spikes

Up-down spikes

Page 13: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Down-Up Spikes

Down-up spikes

Page 14: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Counting Bee Pixels with Spikes

Count pixels in up-down and down-spikes in each row and count pixels covered by those spikes minus the pixel covered by both

Page 15: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Evaluation

Page 16: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Experiment Design

The algorithm’s accuracy was evaluated on a sample of 382 images captured by a BeePi unit deployed in Northern Utah

The images were captured in September 2016; early fall is a vital time for local beekeepers to keep abreast of colonies’ health as they prepare them for winter

A human beekeeper manually counted the bees in each image with a cropped pad; these counts were taken as the ground truth

Page 17: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Evaluation Results

Error Margin (Difference b/w Human and Computer Counts)

Accuracy (%)

5 6310 9415 99

Page 18: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Analysis

All errors on images where algorithmic counts differed from human counts by more than a given error margin were either excessively bright (left image) or had many shades (right)

The left image has a luminosity (a total amount of energy radiated by an object) above 253; the human beekeeper counted 12 bees whereas the algorithm found only 1 bee

The right image taken in late afternoon when the sun was in the west has noticeable shadows east of some bees; since some of these shadows were not removed by the bleaching operation, the detected spikes included some shadow pixels, which caused higher bee counts: the human beekeeper counted 33 bees whereas the algorithm found 65 bees

Page 19: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Conclusions

Since the primary objective of the proposed algorithm is to keep abreast of the forager traffic levels and their changes over a period of time, the exact bee counts are less important than reliable, albeit approximate, indicators of traffic volumes

For example, it is insignificant, when forager traffic increases, to detect 60 bees when a human beekeeper detects 65 or 70, because both counts indicate an increase in forager traffic; similarly, at smaller traffic levels, it is acceptable to detect 2 or 3 bees when a human beekeeper detects 5 or 7 bees, because both counts indicate a decline in forager traffic

While the algorithm's accuracy is important, smaller RAM footprints should not be discounted, because they make feasible in situ execution on smaller computational devices that have smaller power consumption footprints; toward that end, the algorithm was implemented in Python 2.7.9 with OpenCV 3.0 and runs in situ on a RPi 3 Model B with an ARMv8 processor and 1GB of RAM

Page 20: IMECS 2017: An Algorithm for In Situ Omidirectional Vision-Based Bee Counting

Thank You!