Giving LPA a Hand

It can take up to an hour for a lab technician to read, interpret and tabulate 24 TB test strips.
Our project aims to help scale universal drug sensitivity testing by automating interpretation and tabulation of LPA results.

The annual TB report declared that the disease claimed over 73,000 lives in 2019 alone. In an earlier post, we explained how India handles TB. A few weeks ago, my colleague spoke about how the country needs to focus on Line Probe Assay (LPA) and technology that can bring efficiency to a mostly manual process. In order to achieve the target to eliminate TB by 2025, set by the National TB Elimination Program (NTEP), we need to rapidly scale the capacity of universal drug sensitivity testing. Our project aims to help scale universal drug sensitivity testing by automating interpretation and tabulation of LPA results.

Today, let’s talk about the solution we are developing at Wadhwani Institute for Artificial Intelligence. 

But first, let me tell you about one number. 

It can take up to an hour, in some cases, for a lab technician to read, interpret and tabulate a sheet (usually containing 24 strips) of LPA test strips. The lab technician looks at each strip, called LPA. The interpretation helps her identify effective medications for a particular strain of TB bacilli. With labs having around two to three sheets everyday, this translates to two to three humanhours that could have been better spent somewhere else.

The image above shows a typical sheet containing 24 test strips. A lab technician examines each strip and interprets results based on the activated bands. Each interpretation is part of four lakh diagnoses made every year. A number that is expected to double in 2022.

The pluses and minuses we see on the right-hand side of the sheet are part of the lab technician’s interpretation. However, there can be human errors in interpretations. Human errors are not out of the ordinary, but AI can help eliminate these errors.

Let’s look at the image again. Each row in the image’s centre is a test strip that the AI agent needs to interpret. The vertical lines on the strips denote a particular band being present. Based on the activated bands, pluses and minuses are assigned, dictating what medications would work and what will not.

Creating a solution to solve this challenge requires us to know if AI can read and interpret strips. We conducted a simple project on trying to automate this part of the process. It turns out that AI can read them and help us.

AI’s Role

Interpretation requires solving a three-stage problem; locating test strips, reading activated bands on test strips, and mapping the TB variant.

Stage 1: Locating Test Strips

We observe that strips are very structured objects because of bands. We also notice strips are pasted in equidistant assigned boxes. Using these bits of information, we first find spaces (printed boxes) where strips can be pasted and then use template matching to ascertain if a strip is present at that location. We locate the printed boxes by dividing the space between the two anchors (as shown below) into 24 equal parts. We then use multiple cut-outs of strips as templates in template matching.

Stage 2: Reading Activated Bands

Once we have located the strips, we use edge detection algorithms to perceive edges. These edges ideally correspond to the activated bands on the test strip.

A closer look at an LPA strip; Output from an edge detection algorithm that measures change in pixel values
Matching the edges detected to band names
The final output from the band identification module

Stage 3: Mapping TB Variant

The last step is relatively straightforward. To call out the TB variant based on the activated bands, lab technicians use deterministic decision rules once they are sure of the activated bands. These rules help them either call out the TB variant or detect any preparation problem in the test.

Our project’s scope was to verify if an AI agent can interpret and help lab technicians save time. Initial results on the test set tell us that this is possible.

But taking this AI piece and deploying it is another enormous challenge. Which is why we are building a human-in-the-loop solution. To do so, we need to think about the tool’s design, the tool’s role in existing workflows, and building trust between the user and the tool through explainability/uncertainty measures. Other more programmatic considerations also need to be fleshed out like the accountability of the decisions made in presence of the tool, the infrastructure capability and the technologies available on ground. But that is for another day.

This solution is being developed under the TRACE-TB project, funded by USAID.

ML Engineer

ROLES AND RESPONSIBILITIES

An ML Engineer at Wadhwani AI will be responsible for building robust machine learning solutions to problems of societal importance; usually under the guidance of senior ML scientists, and in collaboration with dedicated software engineers. To our partners, a Wadhwani AI solution is generally a decision making tool that requires some piece of data to engage. It will be your responsibility to ensure that the information provided using that piece of data is sound. This not only requires robust learned models, but pipelines over which those models can be built, tweaked, tested, and monitored. The following subsections provide details from the perspective of solution design:

Early stage of proof of concept (PoC)

  • Setup and structure code bases that support an interactive ML experimentation process, as well as quick initial deployments
  • Develop and maintain toolsets and processes for ensuring the reproducibility of results
  • Code reviews with other technical team members at various stages of the PoC
  • Develop, extend, adopt a reliable, colab-like environment for ML

Late PoC

This is early to mid-stage of AI product development

  • Develop ETL pipelines. These can also be shared and/or owned by data engineers
  • Setup and maintain feature stores, databases, and data catalogs. Ensuring data veracity and lineage of on-demand pulls
  • Develop and support model health metrics

Post PoC

Responsibilities during production deployment

  • Develop and support A/B testing. Setup continuous integration and development (CI/CD) processes and pipelines for models
  • Develop and support continuous model monitoring
  • Define and publish service-level agreements (SLAs) for model serving. Such agreements include model latency, throughput, and reliability
  • L1/L2/L3 support for model debugging
  • Develop and support model serving environments
  • Model compression and distillation

We realize this list is broad and extensive. While the ideal candidate has some exposure to each of these topics, we also envision great candidates being experts at some subset. If either of those cases happens to be you, please apply.

DESIRED QUALIFICATIONS

Master’s degree or above in a STEM field. Several years of experience getting their hands dirty applying their craft.

Programming

  • Expert level Python programmer
  • Hands-on experience with Python libraries
    • Popular neural network libraries
    • Popular data science libraries (Pandas, numpy)
  • Knowledge of systems-level programming. Under the hood knowledge of C or C++
  • Experience and knowledge of various tools that fit into the model building pipeline. There are several – you should be able to speak to the pluses and minuses of a variety of tools given some challenge within the ML development pipeline
  • Database concepts; SQL
  • Experience with cloud platforms is a plus
mle

ML Scientist

ROLES AND RESPONSIBILITIES

As an ML Scientist at Wadhwani AI, you will be responsible for building robust machine learning solutions to problems of societal importance, usually under the guidance of senior ML scientists. You will participate in translating a problem in the social sector to a well-defined AI problem, in the development and execution of algorithms and solutions to the problem, in the successful and scaled deployment of the AI solution, and in defining appropriate metrics to evaluate the effectiveness of the deployed solution.

In order to apply machine learning for social good, you will need to understand user challenges and their context, curate and transform data, train and validate models, run simulations, and broadly derive insights from data. In doing so, you will work in cross-functional teams spanning ML modeling, engineering, product, and domain experts. You will also interface with social sector organizations as appropriate.  

REQUIREMENTS

Associate ML scientists will have a strong academic background in a quantitative field (see below) at the Bachelor’s or Master’s level, with project experience in applied machine learning. They will possess demonstrable skills in coding, data mining and analysis, and building and implementing ML or statistical models. Where needed, they will have to learn and adapt to the requirements imposed by real-life, scaled deployments. 

Candidates should have excellent communication skills and a willingness to adapt to the challenges of doing applied work for social good. 

DESIRED QUALIFICATIONS

  • B.Tech./B.E./B.S./M.Tech./M.E./M.S./M.Sc. or equivalent in Computer Science, Electrical Engineering, Statistics, Applied Mathematics, Physics, Economics, or a relevant quantitative field. Work experience beyond the terminal degree will determine the appropriate seniority level.
  • Solid software engineering skills across one or multiple languages including Python, C++, Java.
  • Interest in applying software engineering practices to ML projects.
  • Track record of project work in applied machine learning. Experience in applying AI models to concrete real-world problems is a plus.
  • Strong verbal and written communication skills in English.
mls