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))
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
MiSiC-1.0.6.tar.gz
(4.7 kB
view details)
Built Distribution
MiSiC-1.0.6-py3-none-any.whl
(18.0 kB
view details)
File details
Details for the file MiSiC-1.0.6.tar.gz
.
File metadata
- Download URL: MiSiC-1.0.6.tar.gz
- Upload date:
- Size: 4.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c7a77ea4701a59f4d59f9c476602e9bb17128a01b426213cbc8c3b8e6f9787 |
|
MD5 | a83330c1a7c86df1b94cf0ec4edfeeb3 |
|
BLAKE2b-256 | 3e7e4cbd52022f3999479c9af03c481145030a588047e41ae41f74200eba0e65 |
File details
Details for the file MiSiC-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: MiSiC-1.0.6-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 897d4e244a37c6ac132d0a525c7d4a7abdc84e3805fe393c0f476cf3ec886e1c |
|
MD5 | f0a46b80169b863c6ddcde6356265cb4 |
|
BLAKE2b-256 | 31da5d794347948f6f574bf01e1c9961b5ce8217fc24efc68e5b666f89105db6 |