Skip to main content

Swarm Detection Project for Pybites Developer Mindset (PDM) Coaching Program

·3 mins

Background #

Problem #

One of the primary problems faced by beekeepers in the Spring is the that of swarm control. A typical hive contains approximately 65,000 bees, mostly female worker bees, and a single queen which is the sole reproductive female in the hive. When the colony senses that the conditions are right, approximately half of the bees in the hive plus the queen leave the hive over the course of 1 - 2 minutes and gather at a location 50 to 100 meters away from the original daughter hive. Over the course of approximately two to four days, scout bees from this swarm will look for a new hive location. The daughter hive, which comprises the bees left behind, will begin the process of raising a new queen. If they are successful, this new hive will live; if not it and the 30,000 bees left behind will die.

From the beekeepers perspective, the bees that left in the swarm, may or may not be able to be captured and re-hived; the daughter colony may or may not be able to raise a new queen. As a result, half or the entire hive may be lost. Swarm prevention is key. However, in a very real sense a honey bee hive is a super organism that reproduces every Spring by swarming. Preventing that reproductive event is not always possible. The next best thing is immediate detection of a swarm event. If a swarm can be detected, the swarming hive can often times be found and hived. In addition, the daughter hive, once identified, can be manipulated to increase the odds of a successful requeening.

Data #

Scope of the Problem #

Figure 1: A standard 10 frame Langstroth hive

This is a standard 10 frame Langstroth hive. It, or some variant of it is used in most beekeeping operations throughout the world. Each section is called a hive body or super (the above hive has three supers); there is a bottom board (painted yellow in the above image) which is the primary entrance to the hive for the bees; and a telescoping lid (painted white in the above image).

To get some idea of what a swarm event would look like, the following image shows a hive that is “bearding”. Roughly 10%-20% of the hive’s bees are congregating at the entrance to the hive, on the bottom board. In a swarm event, approximately 3 times as many bees would leave the hive within a 1-2 minute time period.

Figure 2: A hive exhibiting “bearding” at the entrance

PDM Project Proposal #

My proposal involves using python and a Raspberry Pi with an attached camera to monitor the entrance of a hive for inordinate honey bee traffic. For example, the following three images show the landing board section of the bottom board.

Figure 3: Time Lapse Display of Egress Patterns at Bottom Board

These pictures were taken with an iPhone from approximately 8" above the landing board, right next to the bottom hive body. They are representative of standard bee traffic throughout the day.

Using still images, taken with a Raspberry Pi 5 and the version 3 Camera Module, abnormal egress traffic patterns could be determined. This would need to be done in real time hence the use of a Raspberry Pi mounted in a weather-proof enclosure on the hive. Using a still image of the landing board of a hive, OpenCV can be used to determine the “density” of bees at the entrance of the hive. If pictures of the landing board are taken and analyzed every 30 secs, its postulated that abnormal egress patterns, which could signify a swarm event, can be detectected in real time. It would then be a simple matter to notify the beekeeper, who could then potentially capture the swarm.

Michael Dahlberg
Author
Michael Dahlberg
I’m into technology, beekeeping, and woodworking