Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Jul 9, 2024
1 parent e9e247f commit bd2e88f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion torch_em/data/datasets/light_microscopy/cellseg_3d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""This dataset contains annotation for nucleus segmentation in 3d fluorescence microscopy.
"""This dataset contains annotation for nucleus segmentation in 3d fluorescence microscopy from mesoSPIM microscopy.
This dataset is from the publication https://doi.org/10.1101/2024.05.17.594691 .
Please cite it if you use this dataset in your research.
Expand Down
19 changes: 12 additions & 7 deletions torch_em/data/datasets/light_microscopy/embedseg_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# https://github.com/juglab/EmbedSeg/releases/tag/v0.1.0
"""This dataset contains annotation for nucleus segmentation in 3d fluorescence microscopy
"""This dataset contains annotation for 3d fluorescence microscopy segmentation
that were introduced by the EmbedSeg publication.
This dataset is from the publication https://proceedings.mlr.press/v143/lalit21a.html.
Expand Down Expand Up @@ -29,17 +28,19 @@


def get_embedseg_data(path: Union[os.PathLike, str], name: str, download: bool) -> str:
"""Download the CellSeg3d training data.
"""Download the EmbedSeg training data.
Args:
path: Filepath to a folder where the downloaded data will be saved.
name:
split:
name: Name of the dataset to download.
download: Whether to download the data if it is not present.
Returns:
The filepath to the training data.
"""
if name not in URLS:
raise ValueError(f"The dataset name must be in {list(URLS.keys())}. You provided {name}.")

url = URLS[name]
checksum = CHECKSUMS[name]

Expand All @@ -63,11 +64,13 @@ def get_embedseg_dataset(
download: bool = False,
**kwargs
) -> Dataset:
"""Get the CellSeg3d dataset for segmenting nuclei in 3d fluorescence microscopy.
"""Get an EmbedSeg dataset for 3d fluorescence microscopy segmentation.
Args:
path: Filepath to a folder where the downloaded data will be saved.
patch_shape: The patch shape to use for training.
name: Name of the dataset to download.
split: The split to use for the dataset.
download: Whether to download the data if it is not present.
kwargs: Additional keyword arguments for `torch_em.default_segmentation_dataset`.
Expand Down Expand Up @@ -97,12 +100,14 @@ def get_embedseg_loader(
download: bool = False,
**kwargs
) -> DataLoader:
"""Get the CovidIF dataloder for segmenting nuclei or cells in immunofluorescence microscopy.
"""Get an EmbedSeg dataloader for 3d fluorescence microscopy segmentation.
Args:
path: Filepath to a folder where the downloaded data will be saved.
patch_shape: The patch shape to use for training.
batch_size: The batch size for training.
name: Name of the dataset to download.
split: The split to use for the dataset.
download: Whether to download the data if it is not present.
kwargs: Additional keyword arguments for `torch_em.default_segmentation_dataset` or for the PyTorch DataLoader.
Expand Down

0 comments on commit bd2e88f

Please sign in to comment.