HNSC classifier
Project description
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:
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:
- 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.
- 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
- install virtualenv
$ pip install virtualenv
- Create virtual environment
$ virtualenv ven
- Activate environment
$ source ven/bin/activate
- install HNSC-classifier
$pip install HNSC-classifier
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
HNSC-classifier-1.0.tar.gz
(22.3 kB
view details)
File details
Details for the file HNSC-classifier-1.0.tar.gz.
File metadata
- Download URL: HNSC-classifier-1.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef6735908d5504ef2b70f37fcab60b59643d9e0999059566aa47c718389e4e20
|
|
| MD5 |
f2c8eece666c3f2cdbb96cd56a0a6662
|
|
| BLAKE2b-256 |
8d063de7da8216df6a925593ba43dc446a5a14b674bec91defdf71902228d60a
|