Git Product home page Git Product logo

pathology-tile-embedding's Introduction

An interative pathology image viewer

This repo contains code for the Capstone Project of the MS Heath Data Science at Harvard University. We developed an interactive viewer to help pathologists view images through embeddings generated from deep learning models.

Source of demo image

Camelyon 2016 dataset. This can be applied to any pathology images.

Pipeline flow explained

  1. Divide images into tiles
  2. Generate embeddings of tiles using a model pre-trained on pathology images
  3. Conduct K-means to classify tiles based on their embeddings
  4. Run the xml parser to parse the cancerous polygons annotated on the image
  5. Integrate the above info into the Napari viewer

How to run pipeline

Run pipeline by running python main.py

--image_path [path of the input wsi]

--model_path [path of the model to generate embedding]

--prefix [path to store the media data]

--tile_size [tile size]

--level [perform embedding at which level of image. the higher the level, the quicker the preprocess]

--xml_path [the path of label xml file]

--tissue_ratio [filter out tiles whose tissue ratio is below this value]

If there is no media data in the prefix directory, program will run preprocessing from very begining and could take a long time. Otherwise, preprocessed data will be loaded.

Requirement

Aside from packages listed in requirment.txt, the program also needs pathml. Please refer to their homepage for instruction of installation.

xml_parser

Example xml file used: test_046.xml from the Camelyon 2016 dataset. Download image from this link: https://drive.google.com/drive/folders/0BzsdkU4jWx9Bb19WNndQTlUwb2M?resourcekey=0-FREBAxB4QK4bt9Zch_g5Mg

Demo

https://youtu.be/MdAcIYptNvE

pathology-tile-embedding's People

Contributors

leehaoyuan avatar jiesun1990 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.