Skip to content

Commit 7ccdb62

Browse files
committed
docs: add example config and describe options
1 parent db57c8e commit 7ccdb62

1 file changed

Lines changed: 51 additions & 1 deletion

File tree

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,60 @@ vesskel run --input HRF/manual1 --config config.json --out outputs
3232
```
3333

3434
CLI outputs:
35+
3536
- `outputs/summary.csv` with one feature row per image
3637
- Optional per-image skeleton outputs (default: `.npy`)
3738
- Optional per-image branch tables when `output.write_branch_csv=true`
3839

40+
## Configuration
41+
42+
Extraction and output settings are defined in a JSON config file (e.g. the one exported from napari or written by hand).
43+
44+
```json
45+
{
46+
"schema_version": 2,
47+
"extraction": {
48+
"branches": false,
49+
"branch_text": false,
50+
"summary": true,
51+
"fractal_dimension": false,
52+
"vessel_radius": false,
53+
"junction_cleanup": false,
54+
"cleanup_threshold_factor": 2.5,
55+
"closing_iterations": 0,
56+
"fill_holes": false,
57+
"max_hole_size": 0,
58+
"show_preprocessed": false
59+
},
60+
"output": {
61+
"write_skeleton_npy": true,
62+
"write_skeleton_png": false,
63+
"write_summary_csv": true,
64+
"write_branch_csv": false,
65+
"write_radius": false
66+
}
67+
}
68+
```
69+
70+
| Key | Type | Default | Description |
71+
|---|---|---|---|
72+
| `extraction.branches` | bool | `false` | Extract per-branch features for CSV export or napari visualization |
73+
| `extraction.branch_text` | bool | `false` | Display branch ID, length, and tortuosity labels on the napari branch layer |
74+
| `extraction.summary` | bool | `false` | Compute summary features |
75+
| `extraction.fractal_dimension` | bool | `false` | Compute fractal dimension of the skeleton |
76+
| `extraction.vessel_radius` | bool | `false` | Estimate vessel radius using EDT from the segmentation |
77+
| `extraction.junction_cleanup` | bool | `false` | Clean up ambiguous junction pixels after thinning |
78+
| `extraction.cleanup_threshold_factor` | float | `2.5` | Sensitivity for junction cleanup (higher = larger cycles get collapsed) |
79+
| `extraction.closing_iterations` | int | `0` | Morphological closing iterations applied before thinning (0 = disabled) |
80+
| `extraction.fill_holes` | bool | `false` | Fill holes in the binary segmentation before thinning |
81+
| `extraction.max_hole_size` | int | `0` | Maximum hole area (px) to fill when `fill_holes` is true; 0 = fill all |
82+
| `extraction.show_preprocessed` | bool | `false` | Show preprocessed binary layer (after closing and hole filling) in the napari viewer |
83+
| `output.write_skeleton_npy` | bool | `true` | Save skeleton as `.npy` (NumPy array) per image |
84+
| `output.write_skeleton_png` | bool | `false` | Save binary skeleton mask as `.png` per image |
85+
| `output.write_summary_csv` | bool | `true` | Write aggregated per-image features to `summary.csv` |
86+
| `output.write_branch_csv` | bool | `false` | Write per-branch CSV tables (requires `extraction.branches`) |
87+
| `output.write_radius` | bool | `false` | Write per-pixel radius matrix as `.npy` (requires `extraction.vessel_radius`) |
88+
3989
### Shell completions
4090

4191
```sh
@@ -69,6 +119,7 @@ First run (or `--update-baseline`) generates baselines in `tests/skeletons/` and
69119
This project uses the High-Resolution Fundus (HRF) Image Database, established by a collaborative research group to support comparative studies on automatic segmentation algorithms on retinal fundus images.
70120

71121
The database contains 45 images total:
122+
72123
- 15 images of healthy patients
73124
- 15 images of patients with diabetic retinopathy
74125
- 15 images of glaucomatous patients
@@ -84,4 +135,3 @@ Binary gold standard vessel segmentation images and field of view (FOV) masks ar
84135
The HRF dataset is released under the **Creative Commons 4.0 Attribution License**.
85136

86137
For more information, visit the [HRF Image Database](https://www5.cs.fau.de/research/data/fundus-images/).
87-

0 commit comments

Comments
 (0)