Giter Club home page Giter Club logo

stanosa's Introduction

StaNoSA

Stain Normalisation using Sparse Auto-Encoders. Implemented as close to the paper as possible.

Environment Setup

(I use Ubuntu 16.04, so the following instructions are tailored for it. If you are using a different OS, you may have to change these accordingly)

  1. If you don't have Anaconda, download and install Anaconda as per the instructions for your OS.
  2. Create environment and install the dependencies

conda create --name stanosa python=3.6 --file req.txt

  1. Activate the environment

source activate stanosa

Note: if you experience anything like "conda: command not found" then just restart your terminal.

Training

Configuration is done in "stanosa.conf".

Ensure that your training images are all stored directory under the folder specified in the data_path variable in the stanosa.conf file.

When ready, simply run:

python train.py

Model states will be saved to "$output_path/states".

Testing

As before, ensure all testing images are under the data_path variable (in the [testing] section). Make sure you set the state_path variable properly so the weights are loaded from training.

Testing will take each image under the testing data path and pass it through the encoder, patch-by-patch and then applies clustering to the activations. The output of the clustering as well as the activations will be stored in a folder with the same name as the image.

When ready:

python test.py

stanosa's People

Contributors

hw-liang avatar

Stargazers

Peter Hsu avatar  avatar Serdar Balcı avatar  avatar Jack Robbins avatar Oliver_SN avatar AidenChen avatar Harshal Nishar avatar Tanishq Abraham avatar  avatar charles avatar Calvin Ku avatar Richard Ren avatar

stanosa's Issues

histogram matching

In the test.py the activations and labels are computed and stored. So, given I have successfully computed these activations and labels for the template and the test images how should I proceed for the histogram matching to achieve the finally normalized images?

generate normalized image

In the test.py file there is not any code chunk responsible for the generation of decoded normalized images .
Is there any chance to include that code or are there any hints that would help me to implement that by myself?
Thanks in advance.

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.