Skip to content

looooongChen/instSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instSeg - Instance segmentation via pixel embedding learning

This repository contains the implementation of pixel embedding learning model for instance segmentation, as described in the papers:

instSeg

a collection python implementatsions of deep learning approaches for instance segmentation of biomedical images

Overview:

Prerequisites

Python dependencies:

  • tensorflow 2.x
  • tensorflow-addons
  • scikit-image
  • opencv
  • tqdm
  • numpy

Usage

a very brief example

import instSeg
from skimage.io import imread, imsave
import numpy as np

config = instSeg.Config(image_channel=1)

# a list containing images of size H x W x C
imgs_train, imgs_val = [...], [...] 
# a list contraining instance mask of size H x W x 
masks_train, masks_val = [...], [...] 

ds_train = {'image': imgs_train, 'instance': masks_train}
ds_val = {'image': imgs_val, 'instance': masks_val}


X_train, y_train = [], [] # list of img/gt path for training
X_val, y_val = [], [] # list of img/gt path for test

val_ds = {'image': np.array(list(map(imread,X_val))),
            'instance': np.expand_dims(np.array(list(map(imread,y_val))), axis=-1)}
train_ds = {'image': np.array(list(map(imread,X_train))),
            'instance': np.expand_dims(np.array(list(map(imread,y_train))), axis=-1)}

# create model and train
model = instSeg.InstSegParallel(config=config, model_dir=model_dir)
model.train(train_ds, val_ds, batch_size=4, epochs=300)

train the model

prediction

evaluation

Results

dataset 1

dataset 1

dataset 1

How to cite


@inproceedings{LongMACCAIInstance,  
  author = {Long Chen, Martin Strauch, Dorit Merhof},  
  title = {Instance Segmentation of Biomedical Images with an Object-Aware Embedding Learned with Local Constraints},  
  booktitle = {MICCAI 2019},  
  year = {2019},  
}

@inproceedings{LongMACCAIInstance,  
  author = {Long Chen, Martin Strauch, Dorit Merhof},  
  title = {Instance Segmentation of Biomedical Images with an Object-Aware Embedding Learned with Local Constraints},  
  booktitle = {MICCAI 2019},  
  year = {2019},  
}


About

Instance segmtnation via pixel embedding learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages