Harnessing AI powered computer vision to remotely monitor access to water in Somaliland

Research and Evaluation team: Dennis Cheruiyot, Abdiaziz Ali, Ibrahim Dahir, Silvia Kahihu, Ann Wanjiku, and Ken Lee.

External collaborators: Prof. Jay Taneja, University of Massachusetts, Amherst

Sector: Water

Location: Illinta, Somaliland

Sample: 1,750

Target group: Pastoralists, Livestock

 

Project Overview

  1. Background

In recent years, multiple seasons of poor rainfall and high temperatures have destroyed crops, pastures, and livestock across the Horn of Africa. In some regions, this extended drought—which is now the longest in around 70 years of reliable rainfall records—has brought communities to the brink of famine. As temperatures rise, Somaliland, Somalia, Ethiopia, and Kenya are expected to experience even more frequent and severe droughts, the effects of which will be magnified by (or will magnify) underlying political and economic vulnerabilities. These trends will further strain the region’s limited water resources, exacerbating food insecurity, destroying household assets, displacing populations, and increasing the risk of disease and conflict.

Pharo Foundation’s water mission is to ensure that people and communities across Africa have access to a safe and affordable source of water. Recently, we’ve made progress towards this mission by building several rural water infrastructure projects (e.g., Illinta Dam- Somaliland,  Assosa Water Supply Project -Ethiopia  etc.), which have substantially expanded access to reliable fresh water sources for tens of thousands of people in Somaliland and Ethiopia. This study will focus on Illinta dam, a rainwater harvesting dam, with the capacity to contain 17,000m3 of rainwater at any given point of time. It is located in the Illinta village in Gabiley district, where it was designed to serve roughly 1,750 people and 8,000 livestock. The project, which was the first of its kind for the Pharo Foundation, rehabilitated an existing dam, which had fallen into disrepair due to (i) structural issues (e.g., poor design and construction, inadequate silt trap, missing geoplastic membrane, (ii) operational failures (e.g., water overflow over the dam embankment, failure of the dam inlet), and (iii) poor maintenance. Typically, It’s challenging to rigorously measure the causal impact of a single rainwater harvesting dam project, due to the lack of obvious counterfactuals.

This project aims to solve two data-related challenges that we believe are critical to achieving our mission: (i) lack of reliable data and (ii) difficulty monitoring usage of remote water assets. Although there has been increasing attention on the impacts of climate change in the Horn of Africa, there is surprisingly little data or evidence on the role that rural, rainwater harvesting infrastructure can play in enhancing the ability for rural communities to adapt to unpredictable rainfall patterns. Additionally, information on the availability and usage of water resources, which can fluctuate greatly over short periods, has traditionally been expensive to collect. This is especially the case in remote parts of Africa where ground-level surveys are challenging to administer. 

In Somaliland, we have prioritised the collection of observational data through two separate data collection efforts: (1) daily counts of the number of people and livestock visiting the dam; and (2) in-depth socio-economic surveys of dam visitors, capturing water usage, opinions, migration patterns, livestock loss, and other topics. We've tried to capture this information by hiring an enumerator to sit in the field and record notes. The result has been very informative and interesting, but the method is expensive, potentially error-prone, and unsustainable. To address these issues, we implemented an AI-powered computer vision technology to remotely monitor access to water sources. By leveraging advanced image recognition and data analysis, we aim to obtain real-time insights into water usage patterns, benefiting both human and livestock populations. 

Through these efforts, we aim to answer a number of questions, including: 

  1. What are the characteristics of the people and livestock who will benefit from this water source?​
  2. Have we created a perennial source of water (i.e., will the dam contain water until the next rainfall)?​
  3. How does the impact of this water source vary over different seasons?​
  4. How much has the drought impacted livestock levels?
  5. What is the impact on migration and resettlement?

We believe these data will produce the following benefits: (1) relatively objective, high frequency data on the usage of our water infrastructure; (2) a fully automated and scalable process, which will reduce future monitoring costs; (3) more speculatively, over the longer term, we envision a network of these remote sensing points installed at different water access points across Somaliland, for instance, all of which can combine to serve as an early warning system on the severity of drought conditions for public officials and relief workers.

 

II. Intervention and methodology

Computer vision based real-time water monitoring system

We developed a cutting-edge monitoring solution for our existing and future rural water infrastructure projects, in which the beneficiaries are largely pastoralists and livestock in remote locations.

To better understand the extent to which our water projects are being used, we installed solar-powered security cameras at two of the Foundation’s dams (i.e.,Illinta and Wado Makahil dams) to capture high-resolution video footage of dam visitors. We then built on existing computer vision models, specifically using deep learning-based object detection algorithms like YOLOv9, which were fine-tuned with a small set of additional relevant images to automatically identify our specific objects of interest (e.g., goats, shoats and cows) and other objects. Hundreds of images were annotated to label various objects, including humans, cows, donkeys, camels and shoats which was crucial for training the model to count the number of humans and animals visiting our projects sites; at high-frequency and in real-time. We also trained the model to detect  jerricans, which was impossible in the manual approach. This was important to enable us to estimate the volume of water withdrawals from the dam. By working with video footage, we employed a library of scripts to track objects in real-time as they moved within the camera’s field of view, allowing us to monitor the frequency and duration of visits by both humans and animals. Approximately 100GB of video footage was split into a training set (70%) and a validation set (30%), and with each iteration, the model’s accuracy in identifying and tracking objects improved.

To enable real-time monitoring, livestock count information can be transmitted via cellular backhaul. However, due to network challenges in the region, we supplemented this with local logging on SD cards. Foundation staff have been responsible for automatically updating and servicing the system, following its implementation.

III.  Results

The results presented are derived from both our manual approach (observational data) and our computer vision-based approach.

  • So far, the system has been operational for about 90% of the time, except during the rainy seasons. Our data indicates the dam serves as a consistent and reliable backup water source, particularly during dry seasons (i.e., November to March), effectively mitigating the necessity for extensive travel to fulfil water needs. 
  • To date, we have observed 100,000 and 400,000 human and livestock visits in total, over a period of 22 months, with a considerable number of repeat visits within this timeframe.
  • Our data suggests that Illinta dam has reduced livestock deaths by 33% during the dry seasons.
  • Additionally, the dam has dispensed over 20,000 cubic metres of water since its operation, increasing the weekly average water usage per person from 15 litres to 90 litres.
  • The dam serves people from more than 30 villages, with the furthest recorded travel being 55 km from a village called Gobka Daarima, which reflects its significance beyond the immediate vicinity.
  • During periods of substantial rainfall, such as El Niño events, the dam has reached its full capacity of 17,000 cubic metres, achieving 100% of the desired capacity.