Skip to main content

No project description provided

Project description

To install, type in terminal:

pip install ki67segmentation

Then:

from cells_detection.ki67_segmentation import ki67_segmentation, load_data

This package contains two functions :

ki67_segmentation(original_image, positive_color=np.array([16.36, 110.89, 53.06]), negative_color=np.array([53.15, -18.15, 1.20]), background_color=np.array([53.15, -18.15, 1.20]), sigma=0.454, resize_factor=8, visualize_regions=False):

This function takes an image and return the ratio for cells marked by the ki-67 antigen.
Also, it is able to plot on the initial image the regions that the algorithm considers as positives cells,
negatives cells or background.
The parameters by default are the ones which work good with the images I have worked with.

:param original_image: original image with cells, without pre process
:param positive_color: color of positives cells as a np.array, in the color lab space,
np.array([16.36, 110.89, 53.06]) by default
:param negative_color: color of negatives cells as a np.array, in the color lab space,
np.array([53.15, -18.15, 1.20]) by default
:param background_color: color of the background as a np.array, in the color lab space,
np.array([53.15, -18.15, 1.20]) by default
:param sigma: variance of the 2 dimensional gaussian for the weight matrix, 0.454 by default
:param resize_factor: to resize the original image, 8 by default
:param visualize_regions: boolean, False by default
:return: the ratio of positives cells

load_data():

This function loads 5 examples of images and the positive and negative masks associated with each images.

:return: a list of dictionary with the followed keys : "sample_name", "original_image", "positive_mask"
and "negative_mask".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ki67segmentation-0.0.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ki67segmentation-0.0.2-py2-none-any.whl (12.8 kB view details)

Uploaded Python 2

File details

Details for the file ki67segmentation-0.0.2.tar.gz.

File metadata

  • Download URL: ki67segmentation-0.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.15+

File hashes

Hashes for ki67segmentation-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e8ce6ea8bbe9d007543cd19d8340fd7f0846ae4209eef5d7e5aea786b9259a92
MD5 8167fa2801115f8ef2d6ebfe08c38ce6
BLAKE2b-256 012d9c3aff2113a0cb054b3f459bce1674e7f74bd5b6ebb497068a6138127c6e

See more details on using hashes here.

File details

Details for the file ki67segmentation-0.0.2-py2-none-any.whl.

File metadata

  • Download URL: ki67segmentation-0.0.2-py2-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.15+

File hashes

Hashes for ki67segmentation-0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 770781e29db12157c8a57b2b3808919eeeceee987b8ae50a272206ca70f2c9ba
MD5 2bca3dbe4e445e15d33088f0c97f22d8
BLAKE2b-256 b65e3620306b3322f92cb045600c0f396fea69e8fc85983ffeb367420b0cc61c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page