From 0c25c2d111678bc55ed5d929e7f872c1c8c17714 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Fri, 15 May 2026 15:44:17 +0100 Subject: [PATCH 1/4] Adding schemas Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- meta_schema_20220324.json | 241 +++++++++++++++ meta_schema_20220729.json | 315 +++++++++++++++++++ meta_schema_20240725.json | 220 ++++++++++++++ meta_schema_generator_20220718.json | 201 ++++++++++++ meta_schema_generator_ldm_20230507.json | 348 +++++++++++++++++++++ meta_schema_generator_ldm_20240318.json | 386 ++++++++++++++++++++++++ meta_schema_hf_20250321.json | 18 ++ meta_schema_hovernet_20221124.json | 238 +++++++++++++++ 8 files changed, 1967 insertions(+) create mode 100644 meta_schema_20220324.json create mode 100644 meta_schema_20220729.json create mode 100644 meta_schema_20240725.json create mode 100644 meta_schema_generator_20220718.json create mode 100644 meta_schema_generator_ldm_20230507.json create mode 100644 meta_schema_generator_ldm_20240318.json create mode 100644 meta_schema_hf_20250321.json create mode 100644 meta_schema_hovernet_20221124.json diff --git a/meta_schema_20220324.json b/meta_schema_20220324.json new file mode 100644 index 0000000..5d5cf8a --- /dev/null +++ b/meta_schema_20220324.json @@ -0,0 +1,241 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "network_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "label": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "image" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "network_data_format" + ] +} diff --git a/meta_schema_20220729.json b/meta_schema_20220729.json new file mode 100644 index 0000000..c972e9d --- /dev/null +++ b/meta_schema_20220729.json @@ -0,0 +1,315 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "network_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "label": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "latent": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + } + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "latent": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + } + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "network_data_format" + ] +} diff --git a/meta_schema_20240725.json b/meta_schema_20240725.json new file mode 100644 index 0000000..ae2775d --- /dev/null +++ b/meta_schema_20240725.json @@ -0,0 +1,220 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "tensor": { + "$comment": "Represents a tensor object argument/return value, can be MetaTensor.", + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array", + "items": { + "type": [ + "string", + "integer" + ] + } + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "argument": { + "$comment": "Acceptable input types for model forward pass, arbitrary Python objects not covered.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/$defs/tensor" + } + ] + }, + "result": { + "$comment": "Return value from a model's forward pass, same as an argument for now.", + "$ref": "#/$defs/argument" + }, + "network_io": { + "description": "Defines the format, shape, and meaning of inputs, outputs (and optionally post-processed outputs) to the model.", + "type": "object", + "$comment": "Arguments/return values described by pattern property, order considered significant.", + "properties": { + "inputs": { + "type": "object", + "patternProperties": { + "^.+$": { + "$ref": "#/$defs/argument" + } + } + }, + "outputs": { + "type": "object", + "patternProperties": { + "^.+$": { + "$ref": "#/$defs/result" + } + } + }, + "post_processed_outputs": { + "$comment": "Return value format after post-processing, not needed if not changed.", + "type": "object", + "patternProperties": { + "^.+$": { + "$ref": "#/$defs/result" + } + } + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "Version number of the bundle.", + "type": "string" + }, + "changelog": { + "description": "Dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "Version of MONAI the bundle was generated with.", + "type": "string" + }, + "pytorch_version": { + "description": "Version of PyTorch the bundle was generated with.", + "type": "string" + }, + "numpy_version": { + "description": "Version of NumPy the bundlewas generated with.", + "type": "string" + }, + "required_packages_version": { + "description": "Dictionary relating required package names to their versions. The bundle requires these packages to operate which are additional to the base requirements for MONAI.", + "type": "object" + }, + "task": { + "description": "Plain-language description of what the bundle is meant to do.", + "type": "string" + }, + "description": { + "description": "Longer form description of what the bundle is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "State author(s) of the bundle.", + "type": "string" + }, + "copyright": { + "description": "State copyright of the bundle.", + "type": "string" + }, + "data_source": { + "description": "Where to download or prepare the data used in this bundle.", + "type": "string" + }, + "data_type": { + "description": "Type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "Description for every class of the input tensors.", + "type": "string" + }, + "label_classes": { + "description": "Description for every class of the input tensors if present.", + "type": "string" + }, + "pred_classes": { + "description": "Description for every class of the output prediction(s).", + "type": "string" + }, + "eval_metrics": { + "description": "Dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "What the bundle is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "List of published referenced relating to the bundle.", + "type": "array", + "items": { + "type": "string" + } + }, + "supported_apps": { + "description": "List of supported applications, eg. 'monai-label'", + "type": "object" + }, + "network_data_format": { + "$ref": "#/$defs/network_io" + } + }, + "$comment": "This permits definitions for multiple networks with format _data_format", + "patternProperties": { + "^[_a-zA-Z0-9]+_data_format$": { + "$ref": "#/$defs/network_io" + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "required_packages_version", + "task", + "description", + "authors", + "copyright", + "network_data_format" + ] +} diff --git a/meta_schema_generator_20220718.json b/meta_schema_generator_20220718.json new file mode 100644 index 0000000..f5882a2 --- /dev/null +++ b/meta_schema_generator_20220718.json @@ -0,0 +1,201 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "network_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "latent": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "latent" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "network_data_format" + ] +} diff --git a/meta_schema_generator_ldm_20230507.json b/meta_schema_generator_ldm_20230507.json new file mode 100644 index 0000000..1624a34 --- /dev/null +++ b/meta_schema_generator_ldm_20230507.json @@ -0,0 +1,348 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "autoencoder_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the autoencoder model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "image" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + }, + "generator_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the latent feature generator.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "latent": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "condition": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "latent" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "autoencoder_data_format", + "generator_data_format" + ] +} diff --git a/meta_schema_generator_ldm_20240318.json b/meta_schema_generator_ldm_20240318.json new file mode 100644 index 0000000..66bcda6 --- /dev/null +++ b/meta_schema_generator_ldm_20240318.json @@ -0,0 +1,386 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "autoencoder_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the autoencoder model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "body_region": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "value_range" + ] + }, + "anatomy_list": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "value_range" + ] + } + }, + "required": [ + "image", + "body_region", + "anatomy_list" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + }, + "generator_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the latent feature generator.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "latent": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "condition": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "latent" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "pred" + ] + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "autoencoder_data_format", + "generator_data_format" + ] +} diff --git a/meta_schema_hf_20250321.json b/meta_schema_hf_20250321.json new file mode 100644 index 0000000..1b8a563 --- /dev/null +++ b/meta_schema_hf_20250321.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "required": [ + "schema", + "version", + "changelog", + "monai_version", + "pytorch_version", + "numpy_version", + "required_packages_version", + "name", + "task", + "description", + "authors", + "copyright", + "huggingface_url" + ] +} diff --git a/meta_schema_hovernet_20221124.json b/meta_schema_hovernet_20221124.json new file mode 100644 index 0000000..33e635a --- /dev/null +++ b/meta_schema_hovernet_20221124.json @@ -0,0 +1,238 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema": { + "description": "URL of the schema file.", + "type": "string" + }, + "version": { + "description": "version number of the model package.", + "type": "string" + }, + "changelog": { + "description": "dictionary relating previous version names to strings describing the version.", + "type": "object" + }, + "monai_version": { + "description": "version of MONAI the model package was generated on.", + "type": "string" + }, + "pytorch_version": { + "description": "version of PyTorch the model package was generated on.", + "type": "string" + }, + "numpy_version": { + "description": "version of NumPy the model package was generated on.", + "type": "string" + }, + "optional_packages_version": { + "description": "dictionary relating optional package names to their versions.", + "type": "object" + }, + "task": { + "description": "plain-language description of what the model is meant to do.", + "type": "string" + }, + "description": { + "description": "longer form plain-language description of what the model is, what it does, etc.", + "type": "string" + }, + "authors": { + "description": "state author(s) of the model package.", + "type": "string" + }, + "copyright": { + "description": "state copyright of the model package.", + "type": "string" + }, + "data_source": { + "description": "where to download or prepare the data used in this model package.", + "type": "string" + }, + "data_type": { + "description": "type of the data, like: `dicom`, `nibabel`, etc.", + "type": "string" + }, + "image_classes": { + "description": "description for every class of the input image.", + "type": "string" + }, + "label_classes": { + "description": "description for every class of the input label.", + "type": "string" + }, + "pred_classes": { + "description": "description for every class of the output prediction.", + "type": "string" + }, + "eval_metrics": { + "description": "dictionary relating evaluation metrics to the achieved scores.", + "type": "object" + }, + "intended_use": { + "description": "what the model package is to be used for, ie. what task it accomplishes.", + "type": "string" + }, + "references": { + "description": "list of published referenced relating to the model package.", + "type": "array" + }, + "network_data_format": { + "description": "defines the format, shape, and meaning of inputs and outputs to the model.", + "type": "object", + "properties": { + "inputs": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + }, + "label": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + }, + "required": [ + "image" + ] + }, + "outputs": { + "type": "object", + "properties": { + "pred": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "format": { + "type": "string" + }, + "num_channels": { + "type": "integer" + }, + "spatial_shape": { + "type": "array" + }, + "dtype": { + "type": "string" + }, + "value_range": { + "type": "array", + "items": { + "type": "number" + } + }, + "is_patch_data": { + "type": "boolean" + }, + "channel_def": { + "type": "object" + } + }, + "required": [ + "type", + "format", + "num_channels", + "spatial_shape", + "dtype", + "value_range" + ] + } + } + } + }, + "required": [ + "inputs", + "outputs" + ] + } + }, + "required": [ + "schema", + "version", + "monai_version", + "pytorch_version", + "numpy_version", + "optional_packages_version", + "task", + "description", + "authors", + "copyright", + "network_data_format" + ] +} From 5ea504377bc50ccdbf774fbec03899e9c7390e7d Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Sat, 16 May 2026 23:59:56 +0100 Subject: [PATCH 2/4] Update meta_schema_20240725.json Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- meta_schema_20240725.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta_schema_20240725.json b/meta_schema_20240725.json index ae2775d..875e55b 100644 --- a/meta_schema_20240725.json +++ b/meta_schema_20240725.json @@ -132,7 +132,7 @@ "type": "string" }, "numpy_version": { - "description": "Version of NumPy the bundlewas generated with.", + "description": "Version of NumPy the bundle was generated with.", "type": "string" }, "required_packages_version": { From 3264b36fb11aeaa04f788b2ae1dddbcd5db66b2b Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Sun, 17 May 2026 00:02:33 +0100 Subject: [PATCH 3/4] Replace tabs Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- meta_schema_20220729.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta_schema_20220729.json b/meta_schema_20220729.json index c972e9d..e8c44fb 100644 --- a/meta_schema_20220729.json +++ b/meta_schema_20220729.json @@ -165,7 +165,7 @@ "value_range" ] }, - "latent": { + "latent": { "type": "object", "properties": { "type": { @@ -250,7 +250,7 @@ "value_range" ] }, - "latent": { + "latent": { "type": "object", "properties": { "type": { From 26078b630a28867722a5913cfcc1cd2b18fa1d9c Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Sun, 17 May 2026 00:05:26 +0100 Subject: [PATCH 4/4] Remove non-bundle schema Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- meta_schema_hf_20250321.json | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 meta_schema_hf_20250321.json diff --git a/meta_schema_hf_20250321.json b/meta_schema_hf_20250321.json deleted file mode 100644 index 1b8a563..0000000 --- a/meta_schema_hf_20250321.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "schema", - "version", - "changelog", - "monai_version", - "pytorch_version", - "numpy_version", - "required_packages_version", - "name", - "task", - "description", - "authors", - "copyright", - "huggingface_url" - ] -}