Select Language

Open Dataset

顕微鏡下の細胞画像における細胞核の分割データ、DSB 2018で10位を獲得した分割データセットの集合

顕微鏡下の細胞画像における細胞核の分割データ、DSB 2018で10位を獲得した分割データセットの集合

336.32M
856 hits
1 likes
3 downloads
0 discuss
Earth and Nature,Computer Science,Biology,Travel Classification

コンテンツ:COCOセグメンテーション形式に変換されたデータセットのコレクション。前処理:いくつかの画像をリサイズ、一部の画像をタイリング......

Data Structure ? 336.32M

    Data Structure ?

    *The above analysis is the result extracted and analyzed by the system, and the specific actual data shall prevail.

    README.md

    内容

    COCOセグメンテーション形式に変換されたデータセットのコレクション。

    前処理:

    • いくつかの画像のサイズを変更しました

    • 多くのアノテーションがある一部の画像をメモリに収まるようにタイル状に分割しました

    • 輪郭のみが利用可能な場合、マスクを抽出しました

      • これは輪郭を見つけることによって行われます

    フォルダ階層

    DATASETS = {
        'nuclei_stage1_train': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/stage_1_train',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/stage1_train.json'
        },
        'nuclei_stage_1_local_train_split': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/stage_1_train',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/stage_1_local_train_split.json'
        },
        'nuclei_stage_1_local_val_split': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/stage_1_train',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/stage_1_local_val_split.json'
        },
        'nuclei_stage_1_test': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/stage_1_test',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/stage_1_test.json'
        },
        'nuclei_stage_2_test': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/stage_2_test',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/stage_2_test.json'
        },
        'cluster_nuclei': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/cluster_nuclei',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/cluster_nuclei.json'
        },
        'BBBC007': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/BBBC007',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/BBBC007.json'
        },
        'BBBC006': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/BBBC006',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/BBBC006.json'
        },
        'BBBC018': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/BBBC018',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/BBBC018.json'
        },
        'BBBC020': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/BBBC020',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/BBBC020.json'
        },
        'nucleisegmentationbenchmark': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/nucleisegmentationbenchmark',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/nucleisegmentationbenchmark.json'
        },
        '2009_ISBI_2DNuclei': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/2009_ISBI_2DNuclei',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/2009_ISBI_2DNuclei.json'
        },
        'nuclei_partial_annotations': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/nuclei_partial_annotations',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/nuclei_partial_annotations.json'
        },
        'TNBC_NucleiSegmentation': {
            IM_DIR:
                _DATA_DIR + '/Nuclei/TNBC_NucleiSegmentation',
            ANN_FN:
                _DATA_DIR + '/Nuclei/annotations/TNBC_NucleiSegmentation.json'
        },
    }

    使用例:

    import json
    from pathlib import Path
    import numpy as np
    from PIL import Image
    from pycocotools import mask as mask_util
    
    ROOT_DIR = Path('/media/gangadhar/DataSSD1TB/ROOT_DATA_DIR/')
    DATASET_WORKING_DIR = ROOT_DIR / 'Nuclei'
    
    annotations_file = DATASET_WORKING_DIR / 'annotations/stage1_train.json'
    
    COCO = json.load(open(annotations_file.as_posix()))
    
    image_metadata = COCO['images'][0]
    print image_metadata
    
    # {'file_name': '4ca5081854df7bbcaa4934fcf34318f82733a0f8c05b942c2265eea75419d62f.jpg',
    #   'height': 256,
    #   'id': 0,
    #   'nuclei_class': 'purple_purple_320_256_sparce',
    #   'width': 320}
    
    
    def get_masks(im_metadata):
        image_annotations = []
        for annotation in COCO['annotations']:
            if annotation['image_id'] == im_metadata['id']:
                image_annotations.append(annotation)
    
        segments = [annotation['segmentation'] for annotation in image_annotations]
        masks = mask_util.decode(segments)
        return masks
    
    
    masks = get_masks(image_metadata)
    
    print masks.shape
    # (256, 320, 37)
    
    
    def show(i):
        i = np.asarray(i, np.float)
        m,M = i.min(), i.max()
        I = np.asarray((i - m) / (M - m + 0.000001) * 255, np.uint8)
        Image.fromarray(I).show()
    
    
    show(np.sum(masks, -1))
    # これはすべてのマスクが含まれた画像を表示するはずです


    ×

    The dataset is currently being organized and other channels have been prepared for you. Please use them

    The dataset is currently being organized and other channels have been prepared for you. Please use them

    Note: Some data is currently being processed and cannot be directly downloaded. We kindly ask for your understanding and support.
    No content available at the moment
    No content available at the moment
    • Share your thoughts
    Go share your ideas~~

    ALL

      Welcome to exchange and share
      Your sharing can help others better utilize data.
    Points:10 Go earn points?
    • 856
    • 3
    • 1
    • collect
    • Share