CASA – Computer Aided Sperm Analysis

HomeCASA – Computer Aided Sperm Analysis
Post Image

Project Summary

Reproduction and fertility is the only reason that life on this earth does not cease to exist and humans are no exception. Analysis of human spermatozoa is mostly carried out manually in the fertility labs and pathology labs. Technicians have to manually judge fast swimming sperms while looking at hundreds of them through a microscope, and label each based on the number of microns they move per second. They count them on mechanical counters.

Due to this reason, there is a large inter and intra lab variability, and the repeatability and accuracy of a certain semen sample varies quite poorly. Above this all, no record of the sample test is kept. Spermatozoa is a complicated mix, and tends to wither and die quickly once out in the open, so the time a sample is analyzed is also very crucial.

This procedure is about 20-25 minutes long. Due to all the inconsistencies in test approaches, same sample is diagnosed differently in different clinics and hence different clinics follow different treatments for the same quality of sperm sample.

We propose a system that will fix all the above problems; it will perform repeatable and accurate analysis of human spermatozoa by automatically finding each sperm and then tracking individual sperm to calculate its displacement accurate to the nearest micrometers using high speed cameras mounted on microscopes. Hence eliminating human errors and reducing test time to a mere minute or two. Sperm sample degrades with time, this system will store the state of the observed sample by capturing the original and processed videos and storing them for later review, hence preserving the state of the sample when it was analyzed.

There are over 250 fertility clinics only in UK, not to mention pathology labs. The PI along with Dr. Tomlinson Matthews (Head of Andrology Department, Queens Medical Center, Nottingham, UK) are already collaborating and Dr. Matthews has sent medical test equipment to pakistan for testing and development worth around 8000 GBP already. The intention is to develop an automated computer aided sperm analysis system and to validate it properly in clinical trials and publishing them at the end which will establish the credibility and performance of the system. These methods will be tested and used in the clinics at University of Nottingham Hospital, University of Liverpool and University of Cambridge, clinical trials will be done on these three sites. We believe that this tool has immense potential and will capture the European and American markets besides UK and Asia.

This tool apart from generating a lot of revenue, will work as a root for further research and collaboration between the PI and researchers in UK. And we intend to build additional analysis and diagnostic modules on top of the original proposed system in the future.

Core Team

  • Dr. Asad Naeem – Principal Investigator
  • Imran Ihsan – Project Manager
  • Faisal Fayyaz – Team Lead [Application Development]
  • Dr. Umair Rafique – Team Lead [Image Processing]

Technical Progress Report

A comprehensive architectural overview of the Computer Aided Sperm Analysis (CASA) System has been developed and a number of different architectural views are used to depict different aspects of the system.

Use Cases Diagnrams have been developed to mark major functionalities in Computer Aided Sperm Analysis (CASA) application. All the diagrams and descriptions are used standard methods of representing design architectures. Use-Case view is designed using UML 2.0 standards.

Project News

15-May-2014   Fifth Quarter Milestones Completed.

15-April-2014   Fourth Quarter Milestones Completed.

15-January-2014   Third Quarter Milestones Completed.

15-October-2013   Second Quarter Milestones Completed and Presented to ICT.

15-July-2013   First Quarter Milestones Completed and Presented to ICT.

15-April-2013   Project Started.

Project Report

Quarters Due date Deliverables Comments
1 15 Jul 2013 Equipment in Place All activities complete.
All Team Hired
System Architecture Completed
Initial Test Plan Chalked
2 15 Oct 2013 Camera Controls and Image Accusation Programmed All activities complete.Unibrain seems to have a hating problem in summers, and responds slower to on/off processes, causing the application to hang. Built in an automatic wait period for the camera to cool before reopening the stream. Works fine now.
Camera Controls and Image Accusation Programmed
Hardware Calibrations done.
Backup strategies for hardware failure of lag coded
Image Processing generic techniques programmed and tested
Graphics and GUI Designed
Reports and Database for results sorted.
3 15 Jan 2014 Sperm Recognition Using Classifiers Done Tried 7 machine learning classifiers, the bottom 3 performers had a success rate of around 70%, while the top three clearly showed around 90% accuracy. Hence dropping the bottom three and only considering the top three classifiers. The results are given in “Table 1”
Sperm Recognition using Area and Shape Characteristics
Sperm Concentration Reports
Sperm Adaptive appearance models built in the code
Manual GUI intervention stage for the Sperm Concentration
4 15 Apr 2014 Finalize the algorithm design guidelines and specifications. All works complete.• The mean shift multi object tracking algo is very fast but tends to loose tracks due to its simple design.• KAMS was the best tracker as far as tracking accuracy is concerned, but as the number of targets increase it gets extremely resourse hungry reducing the tracking to 58 seconds for 30 frames with 129 targets. So single core implementation of KAMS was not preferred. KAMS GPU version will be tested in the next quarter.• MCMC performed very well and can cope with the drastic increase in targets maintaining the same computational needs but reducing the accuracy as the same cycles are distributed among more targets. For now MCMC single core is preferred for the
Khan’s MCMC Multi object tracking algorithm + interaction filter coded and tested
MKAMS Multi object tracking algorithm + interaction filter coded and tested
Mean Shift Tracking Algorithm + interaction stage
Generic GPU test bed code Completed and tested
5 15 Jul 2014 Tracking code (kams, mcmc, mean shift) ported to GPUs and tested for boost in performance In Fifth quarter of CASA, the system uses cameras for sperm movement and concentration analysis using

Graphical Processing Units (GPUs) for analysis of samples. This significantly reduces the time

consumption of test performance as compared to manual testing. The agreed deliverables for this

quarter are:

1. Tracking code (KAMS, MCMC, MeanShift) ported to GPUs and tested for boost in

2. Other image processing code ported and tested on GPU like sperm detection using the two

3. GPU code tested for all tracking and image algorithms

4. Individual Sperm Paths Extraction


techniques developed earlier

First three milestone are performed in an integrated manner with development of parallel algorithms

for KAMS, MCMC and Mean Shift over GPUs. Thus milestone 2 and 3 are presented within these 3

algorithms implementation and testing on GPUs for Sperm detection and tracking.

The last milestone is to analyze the sperm sample, a number of problems have to be solved like area and

volume under observation, detecting and identifying the actual sperms automatically, then finding how

fast they are swimming per second somehow and from their paths working out the distance traveled.

Based on different paths grading them, and finally putting the results into a decent database at the back

including the recorded original sample video plus the processed video showing the color coded sperm

paths, like red paths for A grade, green paths for B grade etc.

Other image processing code ported and tested on GPU like sperm detection using the two techniques developed earlier
GPU code tested for all tracking and image algorithms
Individual Sperm Paths Extraction done
6 15 Nov 2014 Statistical tests for reports and display done
Data Export from DB in other formats done.
GUI Final Testing Done
Image and vision algorithms accuracy checked and calibrated
Parallel lab testing in UK (Liverpool, Nottingham, Cambridge) done
Software with pre-requisites like .NET 3.5, camera drivers, video codec, charting plugins, packed into installersSilent installation created for end user. Bundling of all exes and msi files
Final testing, debugging, error fixations and validation reports to be submitted in Q6.
Test cases and comparable results of developed CASA system and manual methods should be submitted in Q6.
It should also be noted that all hardware/software design documents,

Table 1

Algorithm Training Set Test Set Results
Support Vector Machine 850 samples 258 samples 98.05%
Artificial Neural Network 850 samples 258 samples 96.89%
K-Nearest Neighbor 850 samples 258 samples 98.44%
Naïve Bayesian 850 samples 258 samples 96.11%
Decision Trees 850 samples 258 samples 82.02%
Random Trees 850 samples 258 samples 82.00%
Boosted Trees 850 samples 258 samples 88.54%