Skip to content

Commit d890497

Browse files
authored
Update README.md
1 parent 3a42bc4 commit d890497

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,37 @@
55

66
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
77

8-
Python package for assessing the accuracy of a predicted neuron segmentation by comparing it to a set of ground truth skeletons. This tool detects topological mistakes (i.e. splits and merges) in a predicted segmentation and then computes several skeleton-based metrics that quantify its topological accuracy.
8+
Python package that evaluates the topological accuracy of a predicted neuron segmentation by comparing it to a set of ground truth skeletons. Topological errors (e.g. splits and merges) are detected by examining skeleton edges and checking if the corresponding nodes belong to the same object in the segmentation. Once the accuracy of each edge has been determined, several skeleton-based metrics are then computed to quantify the topological accuracy.
99

10-
## Details
11-
12-
We begin with a set of ground truth skeletons stored as individual SWC files, where the "xyz" coordinates correspond to voxels in an image. Each ground truth skeleton is loaded and represented as a NetworkX graph with the voxel coordinates as a node-level attribute. The evaluation is performed by first labeling the nodes of each graph with the corresponding segment IDs from the predicted segmentation. Topological mistakes are then detected by examining the labels of each edge, see figure below for an overview of how splits and merges are detected.
13-
14-
<p>
15-
<img src="imgs/topological_mistakes.png" width="180" alt="Topological mistakes detected in skeleton">
10+
<p align="center">
11+
<img src="imgs/topological_mistakes.png" width="170" alt="Topological mistakes detected in skeleton">
1612
<br>
17-
<b> Figure: </b>Edges in skeletons are either correctly or incorrectly reconstructed based on the presence of mergers or splits that affect nodes attached to an edge. Colors correspond to segment IDs. From top to bottom: correct edge (both nodes have the same ID), split edge (nodes assigned to different segments), omitted edge (one or two nodes do not have an associated ID), merged edge (node assigned to a segment that covers more than one skeleton).
13+
<b> Figure: </b>Edges from skeleton superimposed on segmentation, where colors represent to segment IDs. From top to bottom: correct edge (nodes have same segment ID), split edge (nodes have different segment IDs), omit edge (one or two nodes do not have a segment ID), merged edge (segment intersects with multiple skeletons).
1814
</p>
1915

20-
Metrics computed for each ground truth skeleton:
16+
The pipeline to comptue skeleton metrics consists of three main steps:
17+
18+
<blockquote>
19+
<p>a. <strong>Label Graphs</strong>: To do...</p>
20+
<p>b. <strong>Error Detection</strong>: To do...</p>
21+
<p>c. <strong>Compute Metrics</strong>: To do...</p>
22+
</blockquote>
23+
<br>
24+
25+
## Method
26+
27+
### Step 1: Label Graphs
28+
We begin with a set of ground truth skeletons stored as individual SWC files, where the "xyz" coordinates correspond to voxels in an image. Each ground truth skeleton is loaded and represented as a NetworkX graph with the voxel coordinates as a node-level attribute. The evaluation is performed by first labeling the nodes of each graph with the corresponding segment IDs from the predicted segmentation.
29+
30+
31+
### Step 2: Error Detection
32+
33+
To do...
34+
35+
36+
### Step 3: Compute Metrics
37+
38+
To do...
2139

2240
- Number of Splits: Number of segments that a ground truth skeleton is broken into.
2341
- Number of Merges: Number of segments that are incorrectly merged into a single segment.
@@ -26,6 +44,7 @@ Metrics computed for each ground truth skeleton:
2644
- Edge Accuracy: Proportion of edges that are correctly reconstructed in the predicted segmentation.
2745
- Expected Run Length (ERL): Expected length of segments or edges in the predicted segmentation.
2846

47+
2948
## Usage
3049

3150
Here is a simple example of evaluating a predicted segmentation.
@@ -85,3 +104,5 @@ To use the software, in the root directory, run
85104
pip install -e .
86105
```
87106

107+
## License
108+
segmentation-skeleton-metrics is licensed under the MIT License.

0 commit comments

Comments
 (0)