Saturday, 25 August 2012

AI-DEV Paper Receives an Award in the AAAI 2012 Conference

AI-DEV group paper entitled "Coupling Spatiotemporal Disease Modeling with Diagnosis" in July this year (2012) won the Community Computing Consortium Outstanding Student Paper Award in the Computational Sustainability and AI track, AAAI-12 Conference in Toronto, Canada.

The idea in the paper can be summarized using the figure above. Disease density modeling (that may result in a risk map) and disease diagnosis are important tasks in biosurveillance. These tasks are always performed separately but can complement each other. For example, if the location of an individual to be diagnosed is known, the risk at that location can be used as a prior in the diagnosis and in turn, the map can be updated with the result of the diagnosis.

In this paper, we present a general framework of combining these two tasks and we use malaria as a case study to demonstrate the tractability of combining both tasks and the improvement in accuracy this brings about.
Avaliable as [PDF] [BiBTeX]

Tuesday, 21 August 2012

Kampala traffic video analysis example

This video shows some of the image processing we are working on for analysing traffic video streams in Kampala. The aim of this project is to use the cameras in phones as the basis for an ultra-low cost congestion monitoring system, furthermore one which is able to deal with the unusual features of developing-world city traffic. In this example we first use SURF features to calculate correspondences between each frame, giving us a set of motion vectors in the coordinates of the image. We then project those vectors into 'real-world' coordinates, allowing us to calculate speeds in km/h. The last part of the video shows how a regular grid in real world coordinates compares to the motion vectors.

In earlier stages of the project, we worked with Uganda Police to use their network of CCTV cameras. We were at least able to get some good example images with those cameras showing why traffic monitoring is not as straightforward here as it is in some other places:

The problem is that because those cameras can pan, tilt and zoom, the field of view can change very frequently. Rose Nakibuule tried ways of automatically calibrating the camera projection using the motion vectors, features of common vehicles which help us estimate scale, and so on. Conclusion: this is difficult to pull off reliably. In the end we decided that some manual calibration is probably unavoidable anyway, since we need to know the different regions of interest in the frame (lanes going in different directions, for example, which we need to be processed separately). So now we use camera phones in a fixed position and setup involves a user clicking on four points in the image corresponding to a regular square on the road, which seems to work pretty well.

Including the speed estimate the results look like this (screenshots from a Python/OpenCV port of the Matlab code used above):

Live testing of computer vision malaria diagnosis

Last week I tried out our computer vision diagnosis system Ocula in Lacor Hospital, Gulu. The prototype system is shown here running on a netbook with a Moticam MC1000 microscope camera. There is a malaria positive stained blood sample in the scope, and software on the netbook processes camera images in real time and highlights the positions of suspected parasites.

This was the first test of a few new software components. A lot of time had gone into reverse engineering a Linux USB driver for the Moticam (source code including Python wrapper is here, tested on Ubuntu. Motic, in future please release proper drivers so we don't have to waste time on this!). This test also included some developments on visual features which improved the specificity on test data; the most recent performance figures for parasite detection are precision 88.6%, recall 55.1%. This is an improvement on the results in our AAAI 2012 paper and might be good enough to be useful as an assistant to a lab technician, triaging their attention so that many slides can be processed quickly. But it isn't yet at the stage where it would be good enough for completely automated diagnosis. The live prototype was encouraging though - with the help of lab technician Isaac Otim we were able to verify that a few detections were in fact genuine parasites.

The video below shows the prototype running. The first clip shows Isaac operating the microscope while the analysis software is running. The second section of the video shows screen output on a sample from Mulago Hospital, Kampala, of hyperparasitemic blood with many malaria parasites in every field of view. Most of the detections are genuine parasites, though there are currently quite a few false negatives.

One thing I discovered is how much dust is a serious issue, as particles on one of the lenses can appear similar to an out-of-focus nucleus of a parasite in the image. This needs to be handled in software as dust is a fact of life in Ugandan clinics, though there are a few ways to approach this. For one thing, specks of dust on the lens appear stationary in the image even when the slide is moving; so we can just look for any blobs which never move and make sure they never trigger a detection.