Downloads · 30 days
0
jamesdolezal/lung-adeno-squam-v1
lung-adeno-squam-v1 is a machine learning model from jamesdolezal. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for tf-keras. The card lists the license as gpl-3.0.
This model card describes the model associated with the manuscript "Uncertainty-informed deep learning models enable high-confidence predictions for digital histopathology", by Dolezal et al, available here.
Downloads · 30 days
0
Access
Public
Updated Mar 27, 2023
Repo size
293 MB
Likes
0
Public
Click a slice to open those files.
.data-00000-of-00001288 MB · 98%
From the Hugging Face model README
This model card describes the model associated with the manuscript "Uncertainty-informed deep learning models enable high-confidence predictions for digital histopathology", by Dolezal et al, available here.
Developed by: James Dolezal
Model type: Deep convolutional neural network image classifier
Language(s): English
License: GPL-3.0
Model Description: This is a model that can classify H&E-stained pathologic images of non-small cell lung cancer into adenocarcinoma or squamous cell carcinoma and provide an estimate of classification uncertainty. It is an Xception model with two dropout-enabled hidden layers enabled during both training and inference. During inference, a given image is passed through the network 30 times, resulting in a distribution of predictions. The mean of this distribution is the final prediction, and the standard deviation is the uncertainty.
Image processing: This model expects images of H&E-stained pathology slides at 299 x 299 px and 302 x 302 μm resolution. Images should be stain-normalized using a modified Reinhard normalizer ("Reinhard-Fast") available here. The stain normalizer should be fit using the target_means and target_stds listed in the model params.json file. Images should be should be standardized with tf.image.per_image_standardization().
Resources for more information: GitHub Repository, Paper
Cite as:
@ARTICLE{Dolezal2022-qa,
title = "Uncertainty-informed deep learning models enable high-confidence
predictions for digital histopathology",
author = "Dolezal, James M and Srisuwananukorn, Andrew and Karpeyev, Dmitry
and Ramesh, Siddhi and Kochanny, Sara and Cody, Brittany and
Mansfield, Aaron S and Rakshit, Sagar and Bansal, Radhika and
Bois, Melanie C and Bungum, Aaron O and Schulte, Jefree J and
Vokes, Everett E and Garassino, Marina Chiara and Husain, Aliya N
and Pearson, Alexander T",
journal = "Nature Communications",
volume = 13,
number = 1,
pages = "6572",
month = nov,
year = 2022
}
For direct use, the model can be loaded using Tensorflow/Keras:
import tensorflow as tf
model = tf.keras.models.load_model('/path/')
or loaded with Slideflow version 1.1+ with the following syntax:
import slideflow as sf
model = sf.model.load('/path/')
The stain normalizer can be loaded and fit using Slideflow:
normalizer = sf.util.get_model_normalizer('/path/')
The stain normalizer has a native Tensorflow transform and can be directly applied to a tf.data.Dataset:
# Map the stain normalizer transformation
# to a tf.data.Dataset
dataset = dataset.map(normalizer.tf_to_tf)
Alternatively, the model can be used to generate predictions for whole-slide images processed through Slideflow in an end-to-end Project. To use the model to generate predictions on data processed with Slideflow, simply pass the model to the Project.predict() function:
import slideflow
P = sf.Project('/path/to/slideflow/project')
P.predict('/model/path')
This model is intended for research purposes only. Possible research areas and tasks include
Excluded uses are described below.
This model should not be used in a clinical setting to generate predictions that will be used to inform patients, physicians, or any other health care members directly involved in their health care outside the context of an approved research protocol. Using the model in a clinical setting outside the context of an approved research protocol is a misuse of this model. This includes, but is not limited to:
The model has not been validated to discriminate lung adenocarcinoma vs. squamous cell carcinoma in contexts where other tumor types are possible (such as lung small cell carcinoma, neuroendocrine tumors, metastatic deposits, etc.)
This model was trained on The Cancer Genome Atlas (TCGA), which contains patient data from communities and cultures which may not reflect the general population. This datasets is comprised of images from multiple institutions, which may introduce a potential source of bias from site-specific batch effects (Howard, 2021). The model was validated on data from the Clinical Proteomics Tumor Analysis Consortium (CPTAC) and an institutional dataset from Mayo Clinic, the latter of which consists primarily of data from patients of white and western cultures.
Training Data The following dataset was used to train the model:
This model was trained on the full dataset, with a total of 941 slides.
Training Procedure Each whole-slide image was sectioned into smaller images in a grid-wise fashion in order to extract tiles from whole-slide images at 302 x 302 μm. Image tiles were extracted at the nearest downsample layer, and resized to 299 x 299 px using Libvips. During training,
tf.image.per_image_standardization()During inference,
Tile-level and slide-level uncertainty thresholds are calculated and applied as discussed in the Paper. For this model, θ_tile=0.0228 and θ_slide=0.0139.
External evaluation results in the CPTAC and Mayo Clinic dataset are presented in the Paper and shown here:

@ARTICLE{Dolezal2022-qa,
title = "Uncertainty-informed deep learning models enable high-confidence
predictions for digital histopathology",
author = "Dolezal, James M and Srisuwananukorn, Andrew and Karpeyev, Dmitry
and Ramesh, Siddhi and Kochanny, Sara and Cody, Brittany and
Mansfield, Aaron S and Rakshit, Sagar and Bansal, Radhika and
Bois, Melanie C and Bungum, Aaron O and Schulte, Jefree J and
Vokes, Everett E and Garassino, Marina Chiara and Husain, Aliya N
and Pearson, Alexander T",
journal = "Nature Communications",
volume = 13,
number = 1,
pages = "6572",
month = nov,
year = 2022
}