Skip to content

Commit

Permalink
Consolidate training and inference
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolphpienaar committed Apr 9, 2024
1 parent 3c5f61f commit dbbd8ac
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions spleenseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,29 @@

DISPLAY_TITLE = r"""
███████╗██████╗ ██╗ ███████╗███████╗███╗ ██╗███████╗███████╗ ██████╗ ████████╗██████╗ █████╗ ██╗███╗ ██╗
██╔════╝██╔══██╗██║ ██╔════╝██╔════╝████╗ ██║██╔════╝██╔════╝██╔════╝ ╚══██╔══╝██╔══██╗██╔══██╗██║████╗ ██║
███████╗██████╔╝██║ █████╗ █████╗ ██╔██╗ ██║███████╗█████╗ ██║ ███╗ ██║ ██████╔╝███████║██║██╔██╗ ██║
╚════██║██╔═══╝ ██║ ██╔══╝ ██╔══╝ ██║╚██╗██║╚════██║██╔══╝ ██║ ██║ ██║ ██╔══██╗██╔══██║██║██║╚██╗██║
███████║██║ ███████╗███████╗███████╗██║ ╚████║███████║███████╗╚██████╔╝███████╗██║ ██║ ██║██║ ██║██║██║ ╚████║
╚══════╝╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═══╝╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
███████╗██████╗ ██╗ ███████╗███████╗███╗ ██╗███████╗███████╗ ██████╗
██╔════╝██╔══██╗██║ ██╔════╝██╔════╝████╗ ██║██╔════╝██╔════╝██╔════╝
███████╗██████╔╝██║ █████╗ █████╗ ██╔██╗ ██║███████╗█████╗ ██║ ███╗
╚════██║██╔═══╝ ██║ ██╔══╝ ██╔══╝ ██║╚██╗██║╚════██║██╔══╝ ██║ ██║
███████║██║ ███████╗███████╗███████╗██║ ╚████║███████║███████╗╚██████╔╝
╚══════╝╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═══╝╚══════╝╚══════╝ ╚═════╝
"""


parser = ArgumentParser(
description="""
A ChRIS DS plugin based on Project MONAI 3D Spleen Segmentation.
This plugin performs the training component, with some gentle
This plugin implements both training and inference, with some
refactoring and pervasive type hinting.
""",
formatter_class=ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
"--mode",
type=str,
default="training",
help="mode of behaviour: training or inference",
)
parser.add_argument(
"--trainImageDir",
type=str,
Expand Down Expand Up @@ -472,7 +478,7 @@ def model_check(

@chris_plugin(
parser=parser,
title="Spleen 3D image segmentation training (MONAI)",
title="Spleen 3D image segmentation (MONAI)",
category="", # ref. https://chrisstore.co/plugins
min_memory_limit="16Gi", # supported units: Mi, Gi
min_cpu_limit="1000m", # millicores, e.g. "1000m" = 1 CPU core
Expand Down

0 comments on commit dbbd8ac

Please sign in to comment.