DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Machine Learning in Marwell Zoo

When I was a teenager I worked in a zoo. Sadly, I wasn’t an animal keeper – I served teas and coffees (which swore me off waitressing and kept me focused on my engineering degree). But during my breaks, it did mean I got to wander round and look at all the animals. Or, often, the empty animal cages as most of the animals were nocturnal or preferred to move around at dawn or dusk. It didn’t strike me as the most high tech place to work. So when I heard Andy Stanford-Clark from IBM had been using machine learning at Marwell Zoo, I wanted to know more.

Marwell Zoo, in Hampshire, UK, is involved in the conservation and rebreeding of a variety of endangered species, including the rare nyala antelope. The nyala are native to South Africa, and are used to warmer weather than we have in the UK. The zoo has put heaters in their bedding area so they don’t get cold at night. But the nyala wander around a lot, particularly at dawn and dusk, but often during the night as well. Which means sometimes the heaters are on but the animals are out and about.Heaters are expensive to keep running – and Marwell Zoo wondered if they could use a “smart heating” system to only turn the heaters on if there’s a nyala present. This is where IBM came in.

Andy had used a thermal imaging sensor to determine how long the queue was in the coffee bar at IBM’s Internet of Things HQ in Munich (yes, really), so had experience of using thermal imagers.

First, Andy set up some thermal imaging sensors above the antelopes’ bedding area to monitor their movement and sleeping patterns. To calibrate the system, he also set up a Raspberry Pi with an IR camera, which took photos every time it thought a nyala was under it.

By correlating the thermal sensor images and the photos that had nyalas in them, Andy had a data set that he could use to train a neural net classifier (a type of machine learning algorithm) that can identify patterns. While he was training the system (and to make sure the nyalas didn't get cold) the heaters remained under manual control, but he also programmed the IR camera to take a photo whenever the neural net model said there was a nyala there.

He then checked the photos that had nyalas in them (which he did by hand – in a similar manner to the “I am not a robot - Click on all the pictures with traffic lights in them”) with the thermal sensor readings, and gained confidence in the system. By default, edge cases (where the sensor registers something, but not necessarily a nyala) are deemed to be “a nyala is present” so baby nyalas aren’t accidentally left in the cold.

Andy says “We’re now letting it run for another Winter to see how it goes but we know it has already resulted in a 5% heating bill reduction in the nyala house.

The next steps will be automating the image recognition system, and then rolling the system out to other areas of the zoo – making a huge difference to their energy usage, helping not only the zoo’s finances but also reducing its carbon footprint.

This could be the start of all sorts of “on demand” heating systems – in schools, offices or even in your own home.

Images: Credit Andy Stanford-Clark

Other links: 


I am an inventor, engineer, writer and presenter. Other stuff: Royal Academy of Engineering Visiting Professor of Engineering: Creativity and Communication at Brunel University London; Founder of the Guild of Makers (; Fellow of the Institution of Mechanical Engineers and have a PhD in bubbles; Judge on BBC Robot Wars.

24 May 2019, 7:38