Skip to main content

Panoptes for cancer H&E image prediction and visualization (PyPI version)

panoptes is a InceptionResnet-based multi-resolution CNN architecture for cancer H&E histopathological image features prediction. It is initially created to predict visualize features of endometrial carcinoma (UCEC), hoping to automate and assist gynecologic pathologists making quicker and accurate decisions and diagnosis without sequencing analyses. Details can be found in the paper: https://doi.org/10.1016/j.xcrm.2021.100400 It can also be applied to other cancer types.

Features included

Currently, it includes training/validating/testing of following features of endometrial cancer:

  • 18 mutations (ARID1A, ATM, BRCA2, CTCF, CTNNB1, FAT1, FBXW7, FGFR2, JAK1, KRAS, MTOR, PIK3CA, PIK3R1, PPP2R1A, PTEN, RPL22, TP53, ZFHX3)
  • 4 molecular subtypes (CNV.H, CNV.L, MSI, POLE). if you want to predict only 1 subtype (eg. CNV.H), then type "CNV.H".
  • Histological subtypes (Endometrioid, Serous)

Modes

  • train: training a new model from scratch.
  • validate: load a trained model and validate it on a set of prepared samples.
  • test: load a trained model and apply to a intact H&E slide.

Variants

PC are architectures with the branch integrating BMI and age; P are original Panoptes

  • Panoptes1 (InceptionResnetV1-based; P1/PC1)
  • Panoptes2 (InceptionResnetV2-based; P2/PC2)
  • Panoptes3 (InceptionResnetV1-based; P3/PC3)
  • Panoptes2 (InceptionResnetV2-based; P4/PC4)

Usage

  • Install the package version through pip pip install panoptes-he
  • Requirements are listed in requirements.txt
  • from panoptes.execute import panoptes, get_default_data
  • Get default label_file and split_file: label_file, split_file = get_default_data()

Parameters

panoptes(mode, outdir, feature, architecture, log_dir, image_dir, tile_dir=None, modeltoload=None, imagefile=None, batchsize=24, epoch=100000, resolution=None, BMI=np.nan, age=np.nan, label_file=None, split_file=None, cancer='UCEC')

  • mode(required): select a mode to use (train, validate, test)
  • outdir(required): name of the output directory
  • feature(required): select a feature to predict (histology, subtype, POLE, MSI, CNV.L, CNV.H, ARID1A, ATM, BRCA2, CTCF, CTNNB1, FAT1, FBXW7, FGFR2, JAK1, KRAS, MTOR, PIK3CA, PIK3R1, PPP2R1A, PTEN, RPL22, TP53, ZFHX3)
  • architecture(required): select a architecture to use (P1, P2, P3, P4, PC1, PC2, PC3, PC4)
  • log_dir(required): directory for log file, which will also contain the outdir.
  • image_dir(required): directory contains the svs/scn scanned H&E slides
  • tile_dir(required for train and validate): directory contains tiles of svs/scn scanned H&E slides
  • modeltoload(required for validate and test): full path to trained model to load (without .meta)
  • imagefile(required for test): the svs/scn scanned H&E slide to be tested in image_dir
  • batchsize(optional, default=24): batch size
  • epoch(optional, default=100): max epoch; early stop is enabled.
  • resolution(optional): resolution of scanned H&E slides. If known, enter 20 or 40. Otherwise, leave blank.
  • BMI(optional): patient BMI for test with PC models.
  • age(optional): patient age for test with PC models.
  • label_file(required for train and validate): label dictionary. Example can be used sample_lable.csv.
  • split_file(optional): For train and validate mode, random split is default for data separation.
  • cancer(currently optional): Currently only UCEC is supported. If you prefer a customized split, please provide a split file (example can be used sample_sep_file.csv)

Main repository and commandline, bash, GUI version can be found in: https://github.com/rhong3/Panoptes

Metadata

Release files for panoptes-he 0.1.17

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

Source distribution (sdist)

Source distribution for panoptes-he 0.1.17
File Size Uploaded Provenance
panoptes-he-0.1.17.tar.gz 270.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for panoptes-he 0.1.17
File Interpreter ABI Platform
panoptes_he-0.1.17-py3-none-any.whl Python 3 none any Details

Total release size: 545.9 kB

Release files / panoptes-he-0.1.17.tar.gz

Download URL panoptes-he-0.1.17.tar.gz
Size 270.4 kB
Tags Source
SHA-256 checksum
How to use checksums
34cd752caff89a9de9ae8bd503bc00ca0941f8f6ecf58e581bf4680678efa5d8
BLAKE2b-256 checksum
How to use checksums
4f5860d99f874242c863889c4ed8b22334867d4d40e9f6b3f3c1d36ddb680989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.5.0.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

Release files / panoptes_he-0.1.17-py3-none-any.whl

Download URL panoptes_he-0.1.17-py3-none-any.whl
Size 275.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
150bb9b9a7cb5c900f0a39b8a5324a69440cd92d2e04f95dea4b10793d221b1b
BLAKE2b-256 checksum
How to use checksums
7b870f4f8ce7a551a4726173952ef25c03d4631704a3c3b8cf3dd8f6a988009f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.5.0.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

Security for panoptes-he 0.1.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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