Page MenuHomePhabricator

nnUNet Python: Export available model information as JSON file
Closed, ResolvedPublic

Description

Pretrained models' info for different tasks are available in the nnUNet codebase itself [1]. This can be seen by running the command nnUNet_print_available_pretrained_models.
Currently, this information is only as shell text output for the user and not in a machine-readable format.

Extra functionality to export this information eg. as JSON can be added to the existing command.
Like, extending the command with an extra optional arg eg. nnUNet_print_available_pretrained_models --export can be done to save the available models' info as a (JSON) file.

[1]- https://github.com/MIC-DKFZ/nnUNet/blob/master/nnunet/inference/pretrained_models/download_pretrained_model.py

Event Timeline

a178n triaged this task as Normal priority.May 19 2022, 12:43 PM
a178n created this task.

The command nnUNet_print_available_pretrained_models calls nnunet.inference.pretrained_models.download_pretrained_model:print_available_pretrained_models.
This method can be expanded to take an extra optional argument eg. --export.
If the arg is provided, a JSON file will be exported to the RESULTS_FOLDER location by default.
Since it's an optional argument, there is no need for a documentation update by Python devs.

The python changes will be done on a fork and a PR can be made to the master repo.

a178n added a project: MITK (v2022.10).