Skip to main content

HNSC-classifier: an accuracy tool for head and neck cancer detection in digitized whole-slide histology using deep learning

an accuracy tools for head and neck cancer detection and stage inferred in digitized whole-slide histology using deep learning

The HNSC-classifier scheme and Deep learning framework:

Workflow

options

option Description
-i Path to a whole slide image
-o Name of the output file directory [default: output/]"
-p The pixel width and height for tiles
-l Extract tiles form resolution of level
-c The deep model path of cancer/normal classification
-s The deep model path of stage classification
-t The deep model path of T classification (TNM Staging System)
-n The deep model path of N classification (TNM Staging System)
-m The deep model path of M classification (TNM Staging System)

Dependents

pandas==1.4.3
pillow==8.4.0
matplotlib==3.5.2
scipy==1.8.0
numpy==1.22.3
openslide-python
fastai==2.7.9
histolab==0.5.1

Installation:

  1. install system dependency:

HNSC-classifier has one system-wide dependency: OpenSlide.

You should first download and install it from https://openslide.org/download/ according to your operating system.

  1. install HNSC-classifier
$pip install HNSC-classifier

Usage:

$ HNSC-calssifier - i TCGA-BB-4223-01A-01-BS1.7d09ad3d-016e-461a-a053-f9434945073b.svs -c learn.pkl

Example (test in linux OS: Ubuntu 20.4, python 3.9)

Download test data

The test Whole slide image download form TCGA TCGA-BB-4223-01A-01-BS1.7d09ad3d-016e-461a-a053-f9434945073b.svs.

Download deep learning model

DP model tarin tiles Description
learn.pkl 1,392,135 The deep learn model for detected tumor/normal
learn_S.pkl 1,428,765 The deep learn model for classified stage
learn_M.pkl 1,428,765 The deep model for classified stage M (TNM Staging System)
learn_N.pkl 1,428,765 The deep model for classified stage N (TNM Staging System)
learn_T.pkl 1,428,765 The deep model for classified stage T (TNM Staging System)

If you can not clink the hyperlink to obtain test data and DP model, you can download test data from ftp://23.105.208.65

Run HNSC-classifier in virtualenv

  1. install virtualenv
$ pip install virtualenv
  1. Create virtual environment
$ virtualenv ven
  1. Activate environment
$ source ven/bin/activate
  1. install HNSC-classifier
$pip install HNSC-classifier
  1. validate installation
$HNSC-classifier -h

HNSC-classifier for cancer detected.

$ HNSC-calssifier - i TCGA-BB-4223-01A-01-BS1.7d09ad3d-016e-461a-a053-f9434945073b.svs -c learn.pkl

HNSC-classifier for stage detected.

$ HNSC-calssifier - i TCGA-BB-4223-01A-01-BS1.7d09ad3d-016e-461a-a053-f9434945073b.svs -s learn_S.pkl

HNSC-classifier for TNM Staging System detected.

$ HNSC-calssifier - i TCGA-BB-4223-01A-01-BS1.7d09ad3d-016e-461a-a053-f9434945073b.svs -t learn_T.pkl -m learn_M.pkl -n learn_N.pkl

Output

Extract_tiles/  
                tile_0_level0_1499-7466-1723-7690.png
                tile_1_level0_1499-7690-1723-7914.png
                tile_2_level0_1499-8810-1723-9034.png
                tile_3_level0_1499-9034-1723-9258.png
                ...
cancer_heatmap.png
stage_heatmap.png
TNM_system_M_heatmap.png
TNM_system_N_heatmap.png
TNM_system_T_heatmap.png
summary.png
summary.csv

  • Extract_tiles: the tiles extract from WSI.
  • cancer_heatmap.png: cancer detected result.
  • stage_heatmap.png: stage detected result.
  • TNM_system_M_heatmap.png: TNM stage system (M) detected result.
  • TNM_system_N_heatmap.png: TNM stage system (N) detected result.
  • TNM_system_T_heatmap.png: TNM stage system (T) detected result.
  • summary.png: the summary of extracted and predicted tiles info.
  • summary.csv: the summary of extracted and predicted tiles info.

Metadata

Release files for HNSC-classifier 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HNSC-classifier 1.0
File Size Uploaded
HNSC-classifier-1.0.tar.gz 22.3 kB Details

Release files / HNSC-classifier-1.0.tar.gz

Download URL HNSC-classifier-1.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef6735908d5504ef2b70f37fcab60b59643d9e0999059566aa47c718389e4e20
BLAKE2b-256 checksum
How to use checksums
8d063de7da8216df6a925593ba43dc446a5a14b674bec91defdf71902228d60a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page