Skip to content

Commit bb3847c

Browse files
authored
Update README.md
1 parent c8a74a4 commit bb3847c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
11
# lsd-lite
22
Simple LSD and affinity graph computation
3+
4+
Install: `pip install lsd-lite`
5+
6+
Tutorial: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/funkelab/lsd-lite/blob/main/lsd_lite_tutorial.ipynb)
7+
8+
Example:
9+
10+
```py
11+
from lsd_lite import get_affs, get_lsds
12+
13+
# 2d short range affs example
14+
affs = get_affs(segmentation, neighborhood=[[1,0],[0,1]])
15+
16+
# 2d long range affs example
17+
affs = get_affs(
18+
segmentation,
19+
neighborhood=[
20+
[1,0],
21+
[0,1],
22+
[3,0],
23+
[0,3],
24+
[6,0],
25+
[0,6]
26+
]
27+
)
28+
29+
# 3d long range adds example
30+
affs = get_affs(
31+
segmentation,
32+
neighborhood=[
33+
[1,0,0],
34+
[0,1,0],
35+
[3,0,0],
36+
[0,3,0],
37+
[0,0,3],
38+
[6,0,0],
39+
[0,6,0],
40+
[0,0,6]
41+
]
42+
)
43+
44+
# lsds example
45+
lsds = get_lsds(segmentation, sigma=10, downsample=2)
46+
```

0 commit comments

Comments
 (0)