Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Shannon Quinn - Python for Public Health: Build...

Shannon Quinn - Python for Public Health: Building Statistical Models of Ciliary Motion

Cilia, microscopic hairs lining nearly every cell surface in your body, play a major role in developmental and sinopulmonary health. As such, deriving quantitative properties of their motion is compelling for both clinical and research purposes. Here we demonstrate a computational pipeline built entirely in Python for analyzing ciliary motion using a variety of machine learning techniques.

https://us.pycon.org/2016/schedule/presentation/1580/

PyCon 2016

May 29, 2016
Tweet

More Decks by PyCon 2016

Other Decks in Programming

Transcript

  1. Python For Public Health: Building Statistical Models Of Ciliary Motion

    Shannon Quinn University of Georgia PyCon 2016
  2. Why do we care about cilia? u Clinical u Ciliopathies

    u Association with congenital heart disease u Developmental u Nodal flow u Left-right asymmetry
  3. How do we diagnose ciliopathies? Cheap, fast, inaccurate Slow, expensive,

    accurate (?) Measure nasal nitric oxide (NO) levels Electron microscopy to search for structural defects Ciliary beat frequency (CBF) computation Manual ciliary beat pattern analysis “Gold standard”
  4. What is our goal? u Input: high-speed video of ciliary

    biopsy u Output: quantitative properties of observed motion Curly!
  5. Features describing motion Scaling (zoom) Deformation (biaxial shear) Rotation (curl)

    Not useful in 2D “Novel use of differential image velocity invariants to categorize ciliary motion defects.” Quinn SP, Francis R, Lo C, Chennubhotla CS. Proceedings of the Biomedical Science and Engineering Conference (BSEC) 2011.
  6. How do we represent these features? ~ yt = C~

    xt ~ xt = A1~ xt 1 + A2~ xt 2 + ... + Ad~ xt d Feature vectors!
  7. What can we do with these features? 93% classification accuracy

    Automated identification of abnormal respiratory ciliary motion in nasal biopsies. Quinn SP, Zahid M, Durkin J, Francis R, Lo C, Chennubhotla CS. Science Translational Medicine 2015.
  8. Collecting data from collaborators 1. Upload to django website 2.

    Annotate manually 3. Save annotations in database using SQLAlchemy
  9. Processing raw video data 1. Videos in AVI format 2.

    Convert to NumPy arrays with OpenCV 3. Compute optical flow with OpenCV 4. Compute rotation with SciPy signal processing filters
  10. Classification pipeline u Cross-validation for model fitting and testing using

    scikit-learn u joblib / PySpark for parameter scanning u matplotlib + seaborn / bokeh for visualization
  11. Conclusions u 93% classification: methods are sound u Dynamic texture

    representation is accurate u Blackbox tool for clinicians u Web front-end + Python middleware + Spark back-end u Upload video -> Get analysis u Assist experts with diagnostics u Expert input u Phenotype annotations, regions of interest
  12. Future directions u Normal / Abnormal is an oversimplification… u

    Unsupervised motion clustering pipeline u Associate specific motion phenotypes with clinical conditions