Histo-Seg is a skeleton for rapid prototyping of image analysis methods applied to digital pathology whole slide images. It uses the openslide library to read from svs
image pyramids. Really it's a set of functions strung together with a couple "pipeline" scripts. Development is mostly to facilitate our projects, while certain quality of life improvements are made along the way.
For plug-and-play use, train models with the tfmodels package.
- prostate cancer growth patterns, from manual annotation (paper)
- clear cell renal cancer microenvironment, automatic transfer of Immunohistochemistry annotation (WIP)
- WSI Image-to-Image translation for H&E to IHC or IF (WIP)
- WSI feature distributions for hot-spot finding (WIP)
A partial list of package dependecies:
- python 2.7
- openslide-python
- numpy
- scipy
- matplotlib
- OpenCV 2
- TensorFlow >= 1.4
Processing happens in 3 phases:
- Data preparation from Whole Slide Images (WSI) and low-level ROI finding
- High-resolution processing
- Gather and stitch
The script histoseg.py
will run the WSI pipeline on svs
files found in a user defined directory.
Example usage:
$ python ~/histo-seg/core/histoseg.py --slide=/path/to/slide.svs --settings=/path/to/settings.pkl
The example script uses a RAM drive available by default on Ubuntu OS at /dev/shm
.
An alternative is to mount a RAMDISK to a path of your choosing using tmpfs
.
Then again, reading from an SSD or fast HDD could be fast enough, in which case set ramdisk
to None
.
Please provide citation if you use this library for your research.
BIBTEX
Copyright 2017 BioImageInformatics Lab, Cedars Sinai Medical Center
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This package was developed with support from the departments of Surgery and Biomedical Sciences at Cedars Sinai Medical Center, Los Angeles, CA.