Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARCADE dataset #258

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update task defaults
anwai98 committed May 15, 2024
commit 03658d99c4c119653bec328d939cb7cf0bfb2a71
12 changes: 9 additions & 3 deletions torch_em/data/datasets/medical/arcade.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from glob import glob
from tqdm import tqdm
from typing import Union, Tuple, Optional
from typing import Union, Tuple
from collections import defaultdict

import cv2
@@ -129,11 +129,17 @@ def get_arcade_dataset(
path: Union[os.PathLike, str],
patch_shape: Tuple[int, int],
split: str,
task: Optional[str] = None,
task: str = "syntax",
resize_inputs: bool = False,
download: bool = False,
**kwargs
):
"""
"""
# TODO: the "stenosis" data has 3 channels, the "syntax" data has 1 channel
# for us, the relevant one is the "syntax" task, as we are interest in segmenting vessels for our workflows.
# for the "stenosis" task, the segmentations are only for the
# "stenotic valves" (i.e. abnormal narrowing of a certain region of the arteries)
image_paths, gt_paths = _get_arcade_paths(path=path, split=split, task=task, download=download)

if resize_inputs:
@@ -161,7 +167,7 @@ def get_arcade_loader(
patch_shape: Tuple[int, int],
batch_size: int,
split: str,
task: Optional[str] = None,
task: str = "syntax",
resize_inputs: bool = False,
download: bool = False,
**kwargs