GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yiqings/staintrick: Tricks based on stain variations for histology analysis

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
model
model
 
 
preprocess
preprocess
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
config.yaml
config.yaml
 
 
main.py
main.py
 
 
set.py
set.py
 
 
trainer.py
trainer.py
 
 
utils.py
utils.py
 
 

Repository files navigation

Support training the classification network on histology datasets. Explore multiple tricks based on stain variations.

Code Organizations

Run main.py to train the models.

Tune all the hyper-parameters in config.yaml.

  • train_root: Path to the training set.
  • test_root: Path to the test set.
  • output_path: Path to the output. Output files will be exported to a folder created in output_path started with the date, hence no worry for overriding.

Dataset

Datasets can be downloadee use preprocess/download.py.

  • Normalized-v1: Stain normalized with template NORM-AAAWMSFI.tif (from training set).
  • Normalized-v2: Stain normalized with template STR-AAEILWWE.tif (from training set).
  • Normalized-v3: Stain normalized with template NORM-TCGA-AASSYQPA.tif (from test set).

To Run the Experinments

Generally, we don't depend on any specific libraries.

If datasets are not on you device, use download.py to download the zip files and unzip in the terminal.

  1. Firstly, change the hyperparameters in config.yaml, e.g., train_root pointed to the training set, test_root to the validation set, output_path to the output path where loggings and checkpoints are saved.
  2. To train the model, simpily run
python main.py

Methods

  1. LabPreNorm: Learnable normalization parameters (i.e., channel mean and channel std) of the template in LAB color space, and use the Reinhard's normalization method.
  2. LabEMAPreNorm: Use EMA to update the normalization template. Hyper-parameter: lambda. When lambda=0, degenerates to vanilla Reinhard's normalization method; when lambda=1, degenerates to a speical case of LabRandNorm.
  3. LabRandNorm: Randomly select template in each mini-batch, and use the Reinhard's normalization method.

Results

ResNet-18 w/o Pretrain w/ Pretrain
w/o Norm 64.958 58.788
w/ Norm v1 78.914 78.106
w/ Norm v3 89.624 89.262
w/ RandNorm 88.454
w/ PreNorm 92.549
w/ EMAPreNorm (lambd=0) 91.504

About

Tricks based on stain variations for histology analysis

Topics

deep-learninghistologymedical-imagingstain-augmentationstain-normalization

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.