Skip to content

Commit

Permalink
Add warning in doc and docstrings regarding RAM capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
mariehbourget committed Jul 13, 2022
1 parent 4fd6d5e commit aae3bb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Please see section ``TUTORIALS`` to run this command on an example dataset.

Additional optional flags with ``--segment`` command for models trained with 2D patches:

``--no-patch``: 2D patches are not used while segmenting with models trained with patches. The ``--no-patch`` argument supersedes the
``--overlap-2d`` argument.
``--no-patch``: 2D patches are not used while segmenting with models trained with patches. The ``--no-patch`` flag supersedes the
``--overlap-2d`` flag. This option may not be suitable with large images depending on computer RAM capacity.

``--overlap-2d``: Custom overlap for 2D patches while segmenting. Example: ``--overlap-2d 48 48`` for an overlap of 48 pixels between patches in X and Y respectively. Default model overlap is used otherwise.
3 changes: 2 additions & 1 deletion ivadomed/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ def segment_volume(folder_model: str, fname_images: list, gpu_id: int = 0, optio
where X is the width, Y the height and Z the depth of the image.
* 'pixel_size_units': (str) Units of pixel size (Must be either "mm", "um" or "nm")
* 'no_patch': (bool) 2D patches are not used while segmenting with models trained with patches. \
The "no_patch" option supersedes the "overlap_2D" option.
The "no_patch" option supersedes the "overlap_2D" option. \
This option may not be suitable with large images depending on computer RAM capacity.
* 'overlap_2D': (list of int) List of overlaps in pixels for 2D patching. Length equals 2 [OverlapX, OverlapY], \
where X is the width and Y the height of the image.
* 'metadata': (str) Film metadata.
Expand Down
3 changes: 2 additions & 1 deletion ivadomed/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def get_parser():
'for resume training. This training state is saved everytime a new best model is saved in the output directory specified with flag "--path-output"')
optional_args.add_argument('--no-patch', dest="no_patch", action='store_true', required=False,
help='2D patches are not used while segmenting with models trained with patches '
'(command "--segment" only). The "--no-patch" argument supersedes the "--overlap-2D" argument.')
'(command "--segment" only). The "--no-patch" argument supersedes the "--overlap-2D" argument. '
' This option may not be suitable with large images depending on computer RAM capacity.')
optional_args.add_argument('--overlap-2d', dest="overlap_2d", required=False, type=int, nargs="+",
help='Custom overlap for 2D patches while segmenting (command "--segment" only). '
'Example: "--overlap-2d 48 48" for an overlap of 48 pixels between patches in X and Y respectively. '
Expand Down

0 comments on commit aae3bb6

Please sign in to comment.