imsegm.utilities.data_samples module¶
Sandbox with some sample images
Some images are taken from following sources:
[ANHIR challenge](https://anhir.grand-challenge.org)
[PhD Thesis](https://www.researchgate.net/publication/323120618)
Copyright (C) 2015-2018 Jiri Borovec <jiri.borovec@fel.cvut.cz>
- imsegm.utilities.data_samples.get_image_path(name_img, path_base='/home/docs/checkouts/readthedocs.org/user_builds/pyimsegm/checkouts/latest/data-images')[source]¶
merge default image path and sample image
>>> p = get_image_path(IMAGE_LENNA) >>> os.path.isfile(p) True >>> os.path.basename(p) 'lena.png'
- imsegm.utilities.data_samples.load_sample_image(name_img='others/lena.png')[source]¶
load sample image
- Parameters
name_img (str) –
- Return ndarray
>>> img = load_sample_image(IMAGE_LENNA) >>> img.shape (512, 512, 3)
- imsegm.utilities.data_samples.sample_color_image_rand_segment(im_size=(150, 100), nb_classes=3, rand_seed=None)[source]¶
create samoe image and segmentation
>>> im, seg = sample_color_image_rand_segment((5, 6), 2, rand_seed=0) >>> im.shape (5, 6, 3) >>> seg array([[1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 0], [0, 0, 1, 0, 1, 0]])
- imsegm.utilities.data_samples.sample_segment_vertical_2d(seg_size=(20, 10), nb_labels=3)[source]¶
create sample segmentation with vertical stripes
>>> sample_segment_vertical_2d((7, 5), 2) array([[0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1]])
- imsegm.utilities.data_samples.sample_segment_vertical_3d(seg_size=(10, 5, 6), nb_labels=3, levels=2)[source]¶
create sample regular 3D segmentation
- Parameters
- Return ndarray
>>> im = sample_segment_vertical_3d((10, 5, 6), 3) >>> im[:, :, 3] array([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [4, 4, 4, 4, 4], [4, 4, 4, 4, 4], [4, 4, 4, 4, 4]])
- imsegm.utilities.data_samples.ANNOT_DROSOPHILA_DISC = 'drosophila_disc/annot/img_6.png'[source]¶
three class tissue annotation of microscopy image of Drosophila imaginal disc
- imsegm.utilities.data_samples.ANNOT_DROSOPHILA_OVARY_2D = 'drosophila_ovary_slice/annot_struct/insitu7545.png'[source]¶
four class tissue annotation of microscopy image of Drosophila ovary
- imsegm.utilities.data_samples.IMAGE_3CLS = 'synthetic/texture_rgb_3cls.jpg'[source]¶
sample image with three different textures
- imsegm.utilities.data_samples.IMAGE_DROSOPHILA_DISC = 'drosophila_disc/image/img_6.jpg'[source]¶
sample microscopy image of Drosophila imaginal disc
- imsegm.utilities.data_samples.IMAGE_DROSOPHILA_OVARY_2D = 'drosophila_ovary_slice/image/insitu7545.jpg'[source]¶
sample microscopy image of Drosophila ovary
- imsegm.utilities.data_samples.IMAGE_DROSOPHILA_OVARY_3D = 'drosophila_ovary_3D/AU10-13_f0011.tif'[source]¶
sample 3D microscopy image of Drosophila ovary
- imsegm.utilities.data_samples.IMAGE_HISTOL_CIMA = 'histology_CIMA/29-041-Izd2-w35-CD31-3-les1.jpg'[source]¶
sample image of histology tissue from CIMA dataset - ANHIR challenge
- imsegm.utilities.data_samples.IMAGE_HISTOL_FLAGSHIP = 'histology_Flagship/Case001_Cytokeratin.jpg'[source]¶
sample image of histology tissue
- imsegm.utilities.data_samples.IMAGE_LANGER_ISLET = 'langerhans_islets/image/gtExoIsl_21.jpg'[source]¶
sample microscopy image of Langernat islets
- imsegm.utilities.data_samples.IMAGE_OBJECTS = 'synthetic/reference.jpg'[source]¶
sample image with three color objects of different shape
- imsegm.utilities.data_samples.IMAGE_STAR = 'others/sea_starfish-2.jpg'[source]¶
sample image of sea starfish
- imsegm.utilities.data_samples.LIST_ALL_IMAGES = ['others/lena.png', 'synthetic/texture_rgb_3cls.jpg', 'synthetic/reference.jpg', 'others/sea_starfish-2.jpg', 'histology_CIMA/29-041-Izd2-w35-CD31-3-les1.jpg', 'histology_Flagship/Case001_Cytokeratin.jpg', 'langerhans_islets/image/gtExoIsl_21.jpg', 'drosophila_disc/image/img_6.jpg', 'drosophila_disc/annot/img_6.png', 'drosophila_ovary_slice/image/insitu7545.jpg', 'drosophila_ovary_slice/annot_struct/insitu7545.png', 'drosophila_ovary_3D/AU10-13_f0011.tif'][source]¶
list of all default images
- imsegm.utilities.data_samples.PATH_IMAGES = '/home/docs/checkouts/readthedocs.org/user_builds/pyimsegm/checkouts/latest/data-images'[source]¶
path to the folder with all sample image/data
- imsegm.utilities.data_samples.SAMPLE_SEG_SIZE_2D_NORM = (150, 100)[source]¶
image size for normal 2D sample image