# StaNoSA **Repository Path**: a-dot/StaNoSA ## Basic Information - **Project Name**: StaNoSA - **Description**: [Paper Implementation]Stain Normalization using Sparse AutoEncoders (StaNoSA): Application to digital pathology. - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-04-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # StaNoSA [Stain Normalisation using Sparse Auto-Encoders](https://www.sciencedirect.com/science/article/abs/pii/S0895611116300404). 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](https://www.anaconda.com/download/) as per the instructions for your OS. 2. Create environment and install the dependencies > conda create --name stanosa python=3.6 --file req.txt 3. 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