Uganda Sanitation for Health Activity (USHA) Artificial Intelligence and Machine Learning: An Alternative to Surveys to Determine Sanitation Service Levels
Sign inTETRA TECH
The Uganda Sanitation for Health Activity (USHA) explored the use of artificial intelligence and machine learning (AI/ML) applications to categorize images of newly constructed or upgraded toilets to determine if toilets met the WHO/UNICEF/Joint Monitoring Program (JMP) minimum standards for household sanitation services.
2023 · 4 pages

Abstract
In 2021, USHA and Tetra Tech's Data, Analytics, and Technology (DAT) team collected over 270,000 images of latrines, which were then processed and analyzed using a machine learning model to classify and analyze image-related data. The analysis utilized Lobe.ai, TensorFlow, and Python to complete the classification and evaluation of the images collected via USHA's MBSIA and CLTS+ baseline and endline surveys. Lobe.ai is an open-source artificial intelligence image analysis software developed by Microsoft, while TensorFlow is a neural network platform that develops and deploys large-scale machine learning models using classification models. Python is a programming language that instructs TensorFlow how to execute the model. Machine learning uses training data to create predictive models, which were applied to the entire set of images to classify each latrine image based on labels. The training data included several hundred images taken during intervention surveys, which were loaded into Lobe.ai to create 3 distinct models: one model to classify the superstructure, a second model to assess if the latrine had a door, and a third model to classify the latrine's floor material. The USHA MBSIA and CLTS+ Approaches aimed to create a well-functioning sanitation enterprise and end open defecation practices, respectively. The Market-Based Sanitation Implementation Approach (MBSIA) interventions focused on developing desirable and affordable products, marketing these products using tailored messages, and facilitating a network delivery model to provide the required information, materials, and services to customers. The Community-Led Total Sanitation Approach (CLTS+) interventions aimed to primarily end open defecation practices by delivering a range of affordable new and upgraded latrine products that respond to local latrine preferences and common construction practices using locally available materials. The analysis leveraged two different TensorFlow models for the floor classification: one for the Northern Cluster (NC) and one for the Central East/West Regions (CE, CW). These models were trained differently based on what is considered appropriate flooring unique to each region. The results of the analysis were positive, with images classified with high levels of accuracy in the model output. The model output provided a confidence level (high, medium, low, very low) for each image in the dataset, with high being 95% confidence. The Activity's analysis found that 70% of the classifications were a match for Central East, 76% for Central West, and only 46% for Northern Cluster. The Central East and West region's results demonstrated that a model like the one developed for this analysis could be used in place of enumerators or to complement their efforts. However, the model needs to be further refined or the method of classification by enumerators, clarified, particularly in the Northern Cluster. Lessons learned from this analysis include the importance of using clearer high-resolution images of toilet floor types, ensuring that the drop hole area of the latrine is not covered to avoid any obstructions of the ML models while classifying images, and the potential for AI/ML models to save time and resources required to administer long surveys. The TensorFlow models for the Floor, Superstructure, and Door are publicly available on the USHA Google Drive, and the Python code and methodology are also available.
Connected topics
Classification
USAID DEC