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

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

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

    View full-size slide

  2. Part I: Cilia and their pathologies

    View full-size slide

  3. What are cilia?
    Scale bars: 10µm

    View full-size slide

  4. 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

    View full-size slide

  5. 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”

    View full-size slide

  6. What is our goal?
    u Input: high-speed video of ciliary biopsy
    u Output: quantitative properties of observed motion
    Curly!

    View full-size slide

  7. Part II: Quantitative features of
    ciliary motion

    View full-size slide

  8. Strategy for quantifying motion

    View full-size slide

  9. From videos to features

    View full-size slide

  10. 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.

    View full-size slide

  11. What do these features look like?
    Rotation (rad/s)

    View full-size slide

  12. How do we represent these
    features?
    ~
    yt =
    C~
    xt
    ~
    xt =
    A1~
    xt 1 +
    A2~
    xt 2 +
    ...
    +
    Ad~
    xt d
    Feature
    vectors!

    View full-size slide

  13. 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.

    View full-size slide

  14. Part III: The Python ecosystem

    View full-size slide

  15. Collecting data from collaborators
    1. Upload to django website
    2. Annotate manually
    3. Save annotations in
    database using SQLAlchemy

    View full-size slide

  16. 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

    View full-size slide

  17. Derivation of time series models
    u …custom code!
    u scipy.linalg

    View full-size slide

  18. 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

    View full-size slide

  19. (BONUS ROUND)
    Part IV: Conclusions and future
    directions

    View full-size slide

  20. 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

    View full-size slide

  21. Future directions
    u Normal / Abnormal is an
    oversimplification…
    u Unsupervised motion
    clustering pipeline
    u Associate specific motion
    phenotypes with
    clinical conditions

    View full-size slide

  22. Thank you!
    u [email protected]
    u @SpectralFilter
    u https://magsol.github.io/

    View full-size slide