Skip to main content

Project Fake Doctors

Simple Deep learning tools for Bio-informatics & Digital Pathology.

  • Due to the compatibility issue of the Openslide library, only installation in Ubuntu environment is now supported. We promise to support you on all platforms as soon as possible.

It is not a stable project yet, so there maybe some minor|majgor bugs. We will provide a complete product in the near future, so we ask for your patience.

Installation

python3 -m pip install fake-doctors -U

Download Datasets

Now support only Camelyon16 whole slide image dataset(train/test).

  • Warning: There is an issue related to the wget library, so debugging is in progress. If it is confirmed that a problem with wget lib itself, we will migrate to a more stable library such as requests.

※ 800GB+ or free storage is required.

In the near future, we will provide a lightweight benchmark dataset of dozens of gigabytes for computer vision research in the field of digital pathology.

from fake_doctors.dataset import Camelyon16

downloader = Camelyon16(urls_dir_in=/path/to/cache/download/urls,
                        wsi_dir_out=/path/to/save/dataset,
                        annots_dir_out=/path/to/save/annotations)

# Download training data
downloader.download_trainset()
# Split training/validation data
downloader.split_train_valid(ratio=0.2)

# Download test data
downloader.download_testset()

Convert XML annotation to JSON

from fake_doctors.annotation import xml_to_json

xml_to_json(xml_path_in=/path/to/xml/annotations,
            json_path_out=/path/to/save/json/annotations)

Extract ROI from whole slide image(convert to binary mask)

from fake_doctors.mask import generate_roi_mask

generate_roi_mask(wsi_path_in=/path/to/dataset,
                  mask_path_out=/path/to/save/mask)

Filter tumor coordinates from whole slide image

from fake_doctors.annotation import LesionAnnotations

lesion_annots = LesionAnnotations(annot_path=/path/to/annotation)
tumor_coords = lesion_annots.filter_tumor_coords(save_dir='/path/to/save/tumor/coords/list,
                                                 points=coordinates,
                                                 is_pos=True)

Sample train/valid patch images

from fake_doctors.sampling import 

num_train_patches = 2000000
num_valid_patches = 20000

train_patch_sampler = PatchSampler(wsi_dir_in=/path/to/dataset/dir
                                   masks_dir_in=/path/to/dataset/masks/dir,
                                   annots_dir_in=/path/to/annotations/dir,
                                   tumor_coords_dir_in=/path/to/tumor/coordinates/cache,
                                   normal_coords_dir_in=/path/to/normal/coordinates/cache,
                                   patches_dir_out=/path/to/save/sampled/patches)

valid_patch_sampler = PatchSampler(wsi_dir_in=/path/to/dataset/dir
                                   masks_dir_in=/path/to/dataset/masks/dir,
                                   annots_dir_in=/path/to/annotations/dir,
                                   tumor_coords_dir_in=/path/to/tumor/coordinates/cache,
                                   normal_coords_dir_in=/path/to/normal/coordinates/cache,
                                   patches_dir_out=/path/to/save/sampled/patches)

train_patch_sampler.sample_patches(num_patches=num_train_patches)
valid_patch_sampler.sample_patches(num_patches=num_valid_patches)

Prototyping metastasis classifier model and training

  • Working in progress:
    The model used in our project is still being trained. After the model has completely converged, it will be released as soon as the stability of the model is proven, because otherwise, it can confuse users or learners. Since transfer learning cannot be used and the computer power is insufficient, the model is expected to be released in January 2021.

Load checkpoints

  • Working in progress:
    The model used in our project is still being trained. After the model has completely converged, it will be released as soon as the stability of the model is proven. Since transfer learning cannot be used and the computer power is insufficient, the model is expected to be released in January 2021.

Metadata

Release files for fake-doctors 0.0.5.2

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

Source distribution (sdist)

Source distribution for fake-doctors 0.0.5.2
File Size Uploaded Provenance Actions
fake-doctors-0.0.5.2.tar.gz 12.5 kB Without provenance Details for fake-doctors-0.0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fake-doctors 0.0.5.2
File Interpreter ABI Platform Actions
fake_doctors-0.0.5.2-py3-none-any.whl Python 3 none any Details for fake_doctors-0.0.5.2-py3-none-any.whl

Total release size: 26.2 kB

Release files / fake-doctors-0.0.5.2.tar.gz

Download URL fake-doctors-0.0.5.2.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
068fc565193109fc3f1a074ea31b1ccfa234d62c41181c479880f81816a5956d
BLAKE2b-256 checksum
How to use checksums
8e850e679ee19e79f3e9673afe70592e65da8c060ceca1eb226fb21e9b072b72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

Release files / fake_doctors-0.0.5.2-py3-none-any.whl

Download URL fake_doctors-0.0.5.2-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56e65946238a2707608058ffa75038f46933db4994d6cb7da5db1eed22a160ed
BLAKE2b-256 checksum
How to use checksums
ead74261e46a5c8c2ef790a4260d518b7bb677719bc1474907e1539ad02e859e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

Security for fake-doctors 0.0.5.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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