A colaboration between Faculty of Pharmacy and IST, both from the University of Lisbon, for a Covid-related project. The task was to, given a photo of an array of test samples for the Covid virus, determine which ones are the positive tests.
The idea was abandoned and the project did not continue. This repository contains only the initial work for the project.
Project started in March 2020 (and abandoned shortly after).
Overview of the project pipeline
Install OpenCV library to access the camera and take photos of the samples:
pip install opencv-python
- Allow the control of any camera connected to the computer.
- Store snapshots of the samples in a light-controled environment.
- Identify the portions of the image with the samples (and index each samples uniquely).
- Extract the color characteristics of each sample.
- Train a classifier based on a large dataset (classify outcome of the test based on color features).
- Test on new data and assess performance.
Objectives 1. to 4. where successfully accomplished.
There was never a response from the team in the lab with the dataset of samples and so the objectives 5. and 6. could not be implemented.
The objectives 1. and 2. were easily accomplished with the Python library OpenCV.
For the 3. objective, a couple of image processing techniques were used.
Click to expand and see an example of the processing steps
Click on the images to see a zoomed version on a new page.
With this pipeline, samples can be detected in a variety of array displays, well shapes and light conditions. Consider the following examples:
Click to expand and see examples of detected samples
Click on the images to see a zoomed version on a new page.
original screenshot | Samples detected |
---|---|
For objective 4., all the samples were processed and the color features stored in a csv. file:
- A visualization tool allows to observe each individual sample and its color features.
- It also allows to choose a type of border to show
Samples with border showing | Samples cropped to region of interest (ROI) |
---|---|
- It also allows to order the list of samples by any given parameter
Order by RGB value (red channel, in this case) |
Order by test result (positive/negative) |
Order by sample index |
---|---|---|
Rafael Correia