Skip to main content

Microbe segmentation in dense colonies

Project description

MiSiC

Microbe segmentation in dense colonies.

Installation

Requires version python version 3.6/7

pip install MiSiC

Usage

use package

from MiSiC.MiSiC import *
from skimage.io import imsave,imread
from skimage.transform import resize,rescale

filename = 'awesome_image.tif'

# read image using your favorite package
im = imread(filename)

# Parameters that need to be changed
## Ideally, use a single image to fine tune two parameters : mean_width and noise_variance (optional)

#input the approximate mean width of microbe under consideration
mean_width = 8

# compute scaling factor
scale = (10/mean_width)

# Initialize MiSiC
misic = MiSiC()

# preprocess using inbuit function or if you are feeling lucky use your own preprocessing
im = rescale(im,scale,preserve_range = True)

# add local noise
img = add_noise(im,sensitivity = 0.13,invert = True)

# segment
yp = misic.segment(img,invert = True)
yp = resize(yp,[sr,sc,-1])

# watershed based post processing
yp = postprocess_ws(img,yp)

# save 8-bit segmented image and use it as you like
imsave('segmented.tif', yp.astype(np.uint8))
''''

### In case of gpu error, one might need to disabple gpu before importing MiSiC [ os.environ["CUDA_VISIBLE_DEVICES"]="-1" ]

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

MiSiC-1.0.8.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

MiSiC-1.0.8-py3-none-any.whl (7.3 MB view details)

Uploaded Python 3

File details

Details for the file MiSiC-1.0.8.tar.gz.

File metadata

  • Download URL: MiSiC-1.0.8.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for MiSiC-1.0.8.tar.gz
Algorithm Hash digest
SHA256 326f5c4c21b19ff05ee2c5fcb5d5a75868a05775fcbe3064382cee5359e454d4
MD5 571a4b278bc8edf5e1fc8a934f38fa3e
BLAKE2b-256 4511d9946073c5a8cf1ab3bcd0bb907a9833cf8bc3b4dae5352b02d2ccb811f5

See more details on using hashes here.

File details

Details for the file MiSiC-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: MiSiC-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for MiSiC-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 792fcd80896a5e220098e54c31e888f099b9b136ad0aa3bd3ece0295e45c4e9d
MD5 140ffa1a0be11addafbc57ac698a0159
BLAKE2b-256 dd823e0bc0ae9697a26e5adca6c0c52fc8b3d53a509ff702f1fe8c86a8af5cd7

See more details on using hashes here.

Supported by

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