Skip to content

funkelab/lsd-lite

Repository files navigation

lsd-lite

Simple LSD and affinity graph computation

Install: pip install lsd-lite

Tutorial: Open In Colab

Example:

from lsd_lite import get_affs, get_lsds

# 2d short range affs example
affs = get_affs(segmentation, neighborhood=[[1,0],[0,1]])

# 2d long range affs example
affs = get_affs(
    segmentation,
    neighborhood=[
      [1,0],
      [0,1],
      [3,0],
      [0,3],
      [6,0],
      [0,6]
    ]
)

# 3d long range adds example
affs = get_affs(
    segmentation,
    neighborhood=[
      [1,0,0],
      [0,1,0],
      [3,0,0],
      [0,3,0],
      [0,0,3],
      [6,0,0],
      [0,6,0],
      [0,0,6]
    ]
)

# lsds example
lsds = get_lsds(segmentation, sigma=10, downsample=2)

About

Simple LSD and affinity graph computation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages