Project-MONAI / Project-MONAI/model-zoo

Add dice per label metric to segmentation bundles

Open
#660 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
338
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
In segmentation tasks the user would need ot

Describe the solution you'd like
we should add this in the val section

        "additional_metrics": {
            "val_dice_lb": {
                "_target_": "MeanDice",
                "include_background": true,
                "output_transform": "$monai.handlers.from_engine(['pred', 'label'])",
                "num_classes": "@output_classes",
                "return_with_label": true,
                "reduction": "mean_batch"
            }
        },
        "evaluator": {
            "_target_": "SupervisedEvaluator",
            "device": "@device",
            "val_data_loader": "@validate#dataloader",
            "network": "@network",
            "inferer": "@validate#inferer",
            "postprocessing": "@validate#postprocessing",
            "key_val_metric": "@validate#key_metric",
            "additional_metrics": "@validate#additional_metrics",
            "val_handlers": "@validate#handlers",
            "amp": true
        }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the segmentation bundle configurations and inspect the validation val section, especially additional_metrics and the evaluator wiring shown in the issue. Add the per-label Dice metric where appropriate and verify that validation reports Dice values for each label.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.