Skip to content

Add a command to convert datasets with aneurysm masks - #28

Merged
youssefassis merged 7 commits into
mainfrom
feat/prepare-dataset
Sep 30, 2026
Merged

youssefassis merged 7 commits into
mainfrom
feat/prepare-dataset

Conversation

@youssefassis

Copy link
Copy Markdown
Owner

Based on #27 (merge that first; this PR then only shows its own commits).

deepaneseg-prepare converts a dataset of scans and aneurysm label masks to the pipeline's layout. The defaults match the ADAM challenge; other datasets only need their scan and mask patterns:

uv run deepaneseg-prepare source_dir=ADAM data_dir=Data 'labels=[1]'

Each aneurysm becomes a two-point annotation, and cases.csv maps patients to the original cases.

The scripts and their configs only worked from a clone. They now live
in the package (deepaneseg/cli, deepaneseg/configs) and are installed
as commands: deepaneseg-remove-skull, -extract-points, -preprocess,
-train, -predict and -evaluate. `pip install git+<repo>` is enough to
run them from any folder. configs/ is a package so that Hydra finds
it once installed. Existing tests now run the modules instead of the
script paths; the Docker image and CI use the commands.
deepaneseg-prepare converts a dataset of scans and aneurysm label
masks, by default in the ADAM challenge layout, to the P????/F.csv/
config.json layout the pipeline reads. Scans and masks are found
with {case} patterns, each mask component becomes a two-point
diameter annotation (the sphere fit used by the evaluation code), and
cases.csv maps patients back to the original cases. Cases with an
empty mask become patients without aneurysm.
@youssefassis
youssefassis merged commit e464146 into main Sep 30, 2026
4 checks passed
@youssefassis
youssefassis deleted the feat/prepare-dataset branch September 30, 2026 05:42
youssefassis added a commit that referenced this pull request Sep 30, 2026
Add a command to convert datasets with aneurysm masks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant