Skip to content

jinseikenai/glomeruli_detection

Repository files navigation

Glomeruli Detector

This site introduces an example of a glomeruli detector that detects glomeruli from Whole Slide Images.

We uses the Faster RCNN method and the Tensorflow Object Detection API for its implementation.

set up

Please set up by the following procedure.

  1. Installing Tensorflow and Tensorflow Object Detection API

    Please run through the installation instructions to install "Tensorflow Object Detection API" and all it dependencies.

  2. Download our tools

    Please download our glomeruli detection programs.

    git clone https://github.com/jinseikenai/glomeruli_detection.git
    
  3. dependencies

    Our glomeruli detection programs depends on the following libraries. Please install the following libraries.

    Operation Environment: We confirmed the operation in the following environment.

    • python 3.5
    • tensorflow 1.4.1

Quick Start

We provide our pre-trained models trained on our WSI datasets.

Creative Commons License
Our pre-trained models are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Each of them is pre-trained for each staining type. Please choose a pre-trained model in accord with your purpose of use among the following inside.

  • PAS : for PAS(periodic acid-Schiff) stain slides.
  • PAM : for PAM(periodic acid-methenamine silver) stain slides.
  • MT : for MT(Masson trichrome) stain slides.
  • Azan : for Azan stain slides.

The downloaded files are compressed. You can un-tar each tar.gz file via, e.g.,:

tar -xvfz pas.train1.tar.gz

Even if there is no match exactly, if you find similar one in its characteristics, please try it. Or, you could try Transfer Learning on your data to detect glomeruli more correctly.

The Whole Slide Images (WSIs) for your trial can be download from here. These data are not included in the training data of our pre-trained models.

Creative Commons License
These data are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Using these data, you could confirm the Faster R-CNN-Based Glomerular Detector and its result. Please see Quick Start Guide for how to do it.

Based on our pre-trained model, you could do your transfer learning or additional learning.

For reference information on how to do learning, Please refer to the following notes, and my_train.py and my_trainer.py.

  1. Data Preparation

Please prepare a set of learning data and annotations showing correct answers. And see the TensorFlow's "Preparing Inputs" manual and Programmer's Guide:"Importing Data".

  1. Configuration

Please configure a variable "PATH_TO_BE_CONFIGURED" in "config/glomerulus_train.config" and "config/input.config" appropriately to your environment.

  1. Learning Execution

You could execute learning with the following command.

python my_train.py --logtostderr \
  --train_dir=${TRAIN_DATA_PATH} \
  --model_config_path=${CONFIG_PATH}/glomerulus_model.config \
  --train_config_path=${CONFIG_PATH}/glomerulus_train.config \
  --input_config_path=${CONFIG_PATH}/input.config \
  --gpu_list=${GPU}
  • Set the path of learning data to ${TRAIN_DATA_PATH}
  • Set the path of configuration files to ${CONFIG_PATH}.
  • Set the path of directory of output files to ${TRAIN_DATA_PATH}.
  • Set the path of configuration files to ${CONFIG_PATH}. You could specify different paths for each.
    • glomerulus_model.config
    • glomerulus_train.config
    • input.config
  • Set the GPU list you can use to ${GPU} like "--gpu_list=0,1" or "--gpu_list=1".

If you get the error message of "ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].", Please check here and here.

List of programs

Here is the list of programs included in this repository listed by its function.

Releases

No releases published

Packages

No packages published

Languages