Microbe segmentation in dense colonies
Project description
MiSiC
Microbe segmentation in dense colonies.
Installation
Requires version python version 3.6 or 3.7
pip install TOBEFILLED
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.0.tar.gz
(3.9 kB
view details)
Built Distribution
MiSiC-1.0.0-py3-none-any.whl
(16.6 kB
view details)
File details
Details for the file MiSiC-1.0.0.tar.gz
.
File metadata
- Download URL: MiSiC-1.0.0.tar.gz
- Upload date:
- Size: 3.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.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d21fb3c5e60b09a9db8dbb402a2c5c5e3970873dfcb34b40e0b84a4a09bb70e |
|
MD5 | ca0be8204e84c92c611f25bebe680dcb |
|
BLAKE2b-256 | 742cb687472c680387331c2c2ef44dff8bbaff416b679944d1421273848cf6e9 |
File details
Details for the file MiSiC-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: MiSiC-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.6 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.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4810d77eae50fa3d6a91d56da7fec68799d962c147134187c6455cfa0409996b |
|
MD5 | 0997ab137a1b17961f7d097129fa2c88 |
|
BLAKE2b-256 | b5d2c1e5c6ccd2f0ba0c23c95ece302407155175890252218f648a223f2a125b |