Giter Club home page Giter Club logo

pprecogg's Introduction

PPReCOGG

What is this?

PPReCOGG is a machine learning model for the Per-Pixel Recognition of Cancers using Oriented Gabor filters on the GPU.

More helpfully, PPReCOGG is software that uses texture-based features to help classify and differentiate early breast cancer lesions in microscopy images of fluorescently labelled breast tissue, such as that you'd extract from a breast biopsy.

This library is almost, but not quite complete; much like the master's thesis for which it was written.

Result Example

Documentation

Documentation is available here.

Installation

N.B.: Ease of installation and portability needs to be improved. Environments other than Anaconda Python 3 on Windows & Linux are not supported at this time.

PPReCOGG Dependencies:

Usage

PPReCOGG can be used as a python library or interactively through its CLI.

Library Usage Example

from pprecogg import gaborExtract, classifyFeatures

# path to the image you wish to classify
unknown_img_path = "/path/to/unknown/image"

# paths to the images whose class you know
adh_img_path = "/path/to/adh/image"
dcis_img_path = "/path/to/dcis/image"

# features are extracted into HDF5 files, and extract_gabor_features
# returns the path to said file
unknown_features_path = gaborExtract.extract_gabor_features(unknown_img_path)
adh_features_path = gaborExtract.extract_gabor_features(adh_img_path)
dcis_features_path = gaborExtract.extract_gabor_features(dcis_img_path)

# classify features from unknown image. 
# returns an array of class ID and an array of classified coordinates
# indexed by class (see: that array of class IDs)
class_names,classified_coords = classifyFeatures.classify_features(unknown_features_path,
known_features_paths)


# we can convert this into a dictionary where the key is the class name
# and the value are the coordinates that belong to it
classified_coords_dict = {class_names[class_num]: class_coords for class_num, class_coords in enumerate(classified_coords)}

# small ergonomic function to plot classified pixels on to the
# unknown image
classifyFeatures.plot_coords(classified_coords_dict,
                                 unknown_img_path)

CLI Usage

Simplest way to use PPReCOGG in CLI mode is to use the full_auto mode.

Step One: Create configuration file config.json

{
  "unknown_image": "/path/to/unknown/image",

  /* optional, for rerunning */
  "unknown_features": "/path/to/unknown/features.h5",

  "known_images":[
    "/path/to/known/image",
    "/path/to/known/image"],

  /* optional, for rerunning */
  "known_features":[
    "/path/to/known/features.h5",
    "/path/to/known/features.h5"
  ],

  /* 
      the smaller, the faster the computations. 
      the bigger, the higher resolution output.
  */
  "resize": 510
}

Step Two: Run PPReCOGG in full_auto mode

python -m pprecogg full_auto --config_file config.json

pprecogg's People

Contributors

jszym avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

yaokeepmoving

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.