thyroid brs v1

jamesdolezal

Introduction

The THYROID BRAF-RAS SCORE (BRS) V1 model is a deep convolutional neural network developed by James Dolezal. It predicts the BRAF-RAS Score (BRS) from H&E-stained images of thyroid neoplasms. The BRS is a gene expression score that ranges from -1 (BRAF-like) to +1 (RAS-like), indicating the similarity of a tumor's gene expression to BRAF-mutant and RAS-mutant tumors.

Architecture

The model is based on the Xception architecture and includes two dropout-enabled hidden layers. It processes images of H&E-stained pathology slides at a resolution of 299 x 299 pixels. Images must be stain-normalized using a modified Reinhard normalizer and standardized with TensorFlow's tf.image.per_image_standardization().

Training

The model was trained on The Cancer Genome Atlas (TCGA) THCA cohort, which includes 369 slides of BRAF-like and RAS-like tumors. Training involved preprocessing images with stain normalization, random transformations, and Gaussian blur, and utilized an Xception block with subsequent hidden layers. The training was performed using Adam optimizer on an A100 GPU with a batch size of 128 and a learning rate of 0.0001.

Guide: Running Locally

  1. Setup Environment: Install TensorFlow and Slideflow.
  2. Load Model:
    • With TensorFlow:
      import tensorflow as tf
      model = tf.keras.models.load_model('/path/')
      
    • With Slideflow:
      import slideflow as sf
      model = sf.model.load('/path/')
      
  3. Stain Normalization: Use Slideflow to apply stain normalization:
    normalizer = sf.util.get_model_normalizer('/path/')
    dataset = dataset.map(normalizer.tf_to_tf)
    
  4. Prediction: For whole-slide image predictions, use Slideflow's project setup:
    import slideflow
    P = sf.Project('/path/to/slideflow/project')
    P.predict('/model/path')
    

For better performance, it is recommended to use cloud GPUs such as those available from AWS, Google Cloud, or Azure.

License

This model is licensed under the GPL-3.0 license, which allows for free use, modification, and distribution under the same license terms.

More Related APIs