Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.wy-side-nav-search>div.version{color:#222;}a:visited{color:#0285b0;}.wy-menu-vertical a:visited{color:#d9d9d9;}.wy-menu-vertical p.caption{color:#7cccc7;}

@import url('https://fonts.googleapis.com/css?family=Lekton:700|Roboto&display=swap');
body{font-family:'Roboto',sans-serif;}.wy-side-nav-search>div.version{color:#222;}a:visited{color:#0285b0;}.wy-menu-vertical a:visited{color:#d9d9d9;}.wy-menu-vertical p.caption{color:#7cccc7;}
4 changes: 2 additions & 2 deletions docs/source/highlights.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pipelines.
transformation "compose" feature.
2. As medical image preprocessing often requires additional fine-grained
system parameters, MONAI provides transforms for input data encapsulated in
python dictionaries. Users are able to specify the keys corresponding to
python dictionaries. Users can specify the keys corresponding to
the expected data fields and system parameters to compose complex
transformations.

Expand Down Expand Up @@ -114,7 +114,7 @@ loss and generalized Dice loss.
## Network architectures
Some deep neural network architectures have shown to be particularly effective
for medical imaging analysis tasks. MONAI implements reference networks with
the aims of both flexibility and code readability. In order to leverage the
the aims of both flexibility and code readability. To leverage the
common network layers and blocks, MONAI provides several predefined layers
and blocks which are compatible with 1D, 2D and 3D networks. Users can easily
integrate the layer factories in their own networks.
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Links
- Test status: https://github.com/Project-MONAI/MONAI/actions
- PyPI package: https://pypi.org/project/monai/
- Docker Hub: https://hub.docker.com/r/projectmonai/monai
- Google Group: https://groups.google.com/forum/#!forum/project-monai
- Reddit: https://www.reddit.com/r/projectmonai/


Indices and tables
Expand Down
10 changes: 4 additions & 6 deletions docs/source/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
Metrics
========

.. automodule:: monai.metrics
.. currentmodule:: monai.metrics


`Mean Dice`
-----------
.. automethod:: monai.metrics.meandice.compute_meandice
.. automodule:: monai.metrics.meandice
:members:

`Area under the ROC curve`
--------------------------
.. automethod:: monai.metrics.rocauc.compute_roc_auc
.. automodule:: monai.metrics.rocauc
:members:
8 changes: 4 additions & 4 deletions docs/source/networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ Nets
~~~~~~~~~~~~
.. automodule:: monai.networks.nets.densenet
:members:
.. automethod:: monai.networks.nets.densenet.densenet121
.. automethod:: monai.networks.nets.densenet.densenet169
.. automethod:: monai.networks.nets.densenet.densenet201
.. automethod:: monai.networks.nets.densenet.densenet264
.. autofunction:: monai.networks.nets.densenet.densenet121
.. autofunction:: monai.networks.nets.densenet.densenet169
.. autofunction:: monai.networks.nets.densenet.densenet201
.. autofunction:: monai.networks.nets.densenet.densenet264

`Highresnet`
~~~~~~~~~~~~
Expand Down
7 changes: 3 additions & 4 deletions docs/source/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -542,19 +542,18 @@ Transform Adaptors
------------------

.. automodule:: monai.transforms.adaptors
.. currentmodule:: monai.transforms.adaptors

`adaptor`
~~~~~~~~~
.. automethod:: monai.transforms.adaptors.adaptor
.. autofunction:: monai.transforms.adaptors.adaptor

`apply_alias`
~~~~~~~~~~~~~
.. automethod:: monai.transforms.adaptors.apply_alias

.. autofunction:: monai.transforms.adaptors.apply_alias

`to_kwargs`
~~~~~~~~~~~
.. autofunction:: monai.transforms.adaptors.to_kwargs


Utilities
Expand Down
2 changes: 1 addition & 1 deletion monai/handlers/mean_dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


class MeanDice(Metric):
"""Computes dice score metric from full size Tensor and collects average over batch, class-channels, iterations.
"""Computes Dice score metric from full size Tensor and collects average over batch, class-channels, iterations.
"""

def __init__(self,
Expand Down
3 changes: 2 additions & 1 deletion monai/handlers/roc_auc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class ROCAUC(Metric):
Args:
to_onehot_y (bool): whether to convert `y` into the one-hot format. Defaults to False.
add_softmax (bool): whether to add softmax function to `y_pred` before computation. Defaults to False.
average (`macro|weighted|micro|None`): type of averaging performed if not binary classification. default is 'macro'.
average (`macro|weighted|micro|None`): type of averaging performed if not binary classification.
Default is 'macro'.

- 'macro': calculate metrics for each label, and find their unweighted mean.
this does not take label imbalance into account.
Expand Down
2 changes: 1 addition & 1 deletion monai/losses/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class DiceLoss(_Loss):
"""
Compute average Dice loss between two tensors. It can support both multi-classes and multi-labels tasks.
Input logits `pred` (BNHW[D] where N is number of classes) is compared with ground truth `ground' (BNHW[D]).
Input logits `pred` (BNHW[D] where N is number of classes) is compared with ground truth `ground` (BNHW[D]).
Axis N of `pred` is expected to have logit predictions for each class rather than being image channels,
while the same axis of `ground` can be 1 or N(one-hot format). The `smooth` parameter is a value added to the
intersection and union components of the inter-over-union calculation to smooth results and prevent divide by 0,
Expand Down
6 changes: 3 additions & 3 deletions monai/metrics/meandice.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def compute_meandice(y_pred,
mutually_exclusive=False,
add_sigmoid=False,
logit_thresh=0.5):
"""Computes dice score metric from full size Tensor and collects average.
"""Computes Dice score metric from full size Tensor and collects average.

Args:
y_pred (torch.Tensor): input data to compute, typical segmentation model output.
it must be One-Hot format and first dim is batch, example shape: [16, 3, 32, 32].
it must be one-hot format and first dim is batch, example shape: [16, 3, 32, 32].
y (torch.Tensor): ground truth to compute mean dice metric, the first dim is batch.
example shape: [16, 1, 32, 32] will be converted into [16, 3, 32, 32].
alternative shape: [16, 3, 32, 32] and set `to_onehot_y=False` to use 3-class labels directly.
Expand All @@ -41,7 +41,7 @@ def compute_meandice(y_pred,
`y_pred` into a binary matrix. Defaults to 0.5.

Returns:
Dice scores per batch and per class (shape: [batch_size, n_classes]).
Dice scores per batch and per class, (shape [batch_size, n_classes]).

Note:
This method provides two options to convert `y_pred` into a binary matrix
Expand Down
10 changes: 5 additions & 5 deletions monai/metrics/rocauc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ def _calculate(y, y_pred):

def compute_roc_auc(y_pred, y, to_onehot_y=False, add_softmax=False, average='macro'):
"""Computes Area Under the Receiver Operating Characteristic Curve (ROC AUC). Referring to:
`sklearn.metrics.roc_auc_score <http://scikit-learn.org/stable/modules/generated/
`sklearn.metrics.roc_auc_score <https://scikit-learn.org/stable/modules/generated/
sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score>`_.

Args:
y_pred (torch.Tensor): input data to compute, typical classification model output.
it must be One-Hot format and first dim is batch, example shape: [16] or [16, 2].
y (torch.Tensor): ground truth to compute ROC AUC metric, the first dim is batch.
example shape: [16, 1] will be converted into [16, 3].
example shape: [16, 1] will be converted into [16, 2] (where `2` is inferred from `y_pred`).
to_onehot_y (bool): whether to convert `y` into the one-hot format. Defaults to False.
add_softmax (bool): whether to add softmax function to y_pred before computation. Defaults to False.
add_softmax (bool): whether to add softmax function to `y_pred` before computation. Defaults to False.
average (`macro|weighted|micro|None`): type of averaging performed if not binary
classification. default is 'macro'.
classification. Default is 'macro'.

- 'macro': calculate metrics for each label, and find their unweighted mean.
this does not take label imbalance into account.
Expand All @@ -70,7 +70,7 @@ def compute_roc_auc(y_pred, y, to_onehot_y=False, add_softmax=False, average='ma
- None: the scores for each class are returned.

Note:
ROCAUC expects y to be comprised of 0's and 1's. y_pred must be either prob. estimates or confidence values.
ROCAUC expects y to be comprised of 0's and 1's. `y_pred` must be either prob. estimates or confidence values.

"""
y_pred_ndim = y_pred.ndimension()
Expand Down