https://github.com/cbarrick/ewc-pathology
Continual learning for digital pathology
https://github.com/cbarrick/ewc-pathology
Last synced: 3 months ago
JSON representation
Continual learning for digital pathology
- Host: GitHub
- URL: https://github.com/cbarrick/ewc-pathology
- Owner: cbarrick
- Created: 2017-10-10T21:47:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T03:29:22.000Z (over 7 years ago)
- Last Synced: 2025-01-11T04:14:05.240Z (5 months ago)
- Language: Python
- Homepage:
- Size: 106 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multitask learning for Digital Pathology
This experiment implements [elastic weight consolidation][ewc] to train a single network to perform two distinct computer vision tasks in Digital Pathology using a single set of parameters.
[ewc]: https://arxiv.org/abs/1612.00796
## Reproducing the experiment
The experiment can be executed by running the `experiments.pathology` module from the root of this repository:
```
python -m experiments.pathology -e100 -n1000 -w25 -- +nuclei -nuclei +epi -epi -nuclei
```The experiment accepts a number of parameters. Here is the full help output:
```
$ python -m experiments.pathology --help
usage: pathology.py [-n X] [-k X] [-e X] [-l X] [-p X] [-w X] [-b X] [-c X]
[-d] [-v] [--seed SEED] [--name NAME] [--help]
[TASK [TASK ...]]Runs an experiment.
Tasks are specified with either a plus (+) or a minus (-) followed by the
name of a dataset. Tasks beginning with a plus fit the model to the dataset,
while tasks beginning with a minus test the model against a dataset.For example, the default task list of `+nuclei -nuclei` will first fit the
model to the nuclei dataset, then test against against the nuclei dataset.
EWC terms are computed after each fitting and are used for subsequent fits.Since tasks may begin with a minus (-) you need to separate the task list
from the other arguments by using a double-dash (--). For example:python -m experiments.pathology --cuda=0 -- +nuclei -nuclei
Note that the experiment is intended to be executed from the root of the
repository using `python -m`.Hyper-parameters:
-n X, --data-size X
-k X, --folds X
-e X, --epochs X
-l X, --learning-rate X
-p X, --patience X
-w X, --ewc XPerformance:
-b X, --batch-size X
-c X, --cuda XDebugging:
-d, --dry-run
-v, --verboseOther:
--seed SEED
--name NAME
--helpPositional:
TASKDatasets:
nuclei A nuclei segmentation dataset
epi An epithelium segmentation dataset
```Protip: To tee the output to a file and keep the pretty progress report in the
terminal, use `python -u`:```
$ python -u -m experiments.pathology | tee experiment.out
```## Credits
- Chris Barrick ([email protected], [@cbarrick](github.com/cbarrick))
- Aditya Shinde ([email protected], [@adityashinde1506](github.com/adityashinde1506))
- Prajay Shetty ([email protected], [@CodeMaster001](github.com/CodeMaster001))