This release is a pre-release and may not be stable for production use.
MAGDI Data
This python package named magdi_data is responsible for data loading to be used for
AI training.
It also contains the definition of a specific dataset structure.
Setup
pip install -r requirements.txtto run AI experimentspip install -r requirements-tests.txtto run pytest- Copy
.env-exampleas.envfile and set your credentials and other env variables there
dataset_meta.json
The dataset_meta.json describes a dataset in the Occurrence Instance Format. Its properties have to follow a strict format to be readable by humans and machines.
How to create a dataset
Read README_create_occ_inst_dataset.md
Terms
Occurrence
- An occurrence is a real scanned object. It can have one or more instances (replicates or measurements).
Instance
- An instance is a digitalized object.
Contents
| property | description | json type | example |
|---|---|---|---|
| status | Current status of the dataset. Default: "not_verified". Possible values: "not_verified", "verified", "deleted", "locked". | string | "not_verified" |
| id | Identifier of the dataset. Used as the folder name. Automatically generated from name, release, and uuid. Immutable after creation. |
string | "Maize_2025.07.02_abc123..." |
| uuid | Universally unique identifier assigned to this dataset. Immutable. | string | "abc123..." |
| name | English name of the dataset. | string | "Maize" |
| name_de | German translation of the dataset name. | string | "Mais" |
| name_la | Latin translation of the dataset name. | string | "Zea" |
| short_name | Abbreviation or short form of the dataset name. | string | "MZ" |
| release | Version release string (e.g., YYYY.MM.DD). Immutable. | string | "2025.07.02" |
| species_en | English name of the species. Replaces old field entity. |
string | "Zea mays" |
| species_de | German name of the species. | string | "Mais" |
| species_la | Latin name of the species. | string | "Zea mays" |
| organ_en | English name of the biological organ or structure. Replaces old field structure. |
string | "maize" |
| organ_de | German translation of the organ name. | string | "Mais" |
| organ_la | Latin translation of the organ name. | string | "maize" |
| development_stage_en | Development stage of the biological sample (e.g., "seedling", "mature"). | string | "seedling" |
| development_stage_de | German translation of development stage. | string | "Keimling" |
| description | Short description of the dataset. | string | "NMR dataset with all maize samples..." |
| reference | Source or publication where data was derived from. Can be URL or citation. | string | "Leibniz Institute of Plant Genetics and Crop Plant Research (IPK)" |
| license | License under which the dataset is published. | string | "IPK proprietary" |
| publishing_venue | Optional list of venues where the dataset or related work was published. | array of string | ["Nature Methods", "arXiv"] |
| tags | Modalities describing the dataset (e.g., imaging modality, domain). See Hugging Face modality list. | array of string | ["MRI", "3D", "Image"] |
| task_categories | ML tasks the dataset is intended for. See Hugging Face task list. | array of string | ["image-segmentation"] |
| labels | Optional class label mapping. Keys must be ascending integers starting at 0, formatted as strings. No gaps allowed. Missing keys must have empty string as value. | object | { "0": "background", "1": "embryo", "2": "endosperm" } |
| image_format | File extension of the image files (e.g., .nii.gz, .png). | string | ".nii.gz" |
| annotation_format | Optional. File extension of annotation files (e.g., masks). | string | ".nii.gz" |
| num_instances_total | Total number of instances across all splits. Immutable. | integer | 4 |
| num_instances_training | Number of instances in training split. Immutable. | integer | 2 |
| num_instances_test | Optional. Number of instances in test split. Immutable. | integer | 2 |
| num_instances_validation | Optional. Number of instances in validation split. Immutable. | integer | 2 |
| num_occurrences_total | Total number of occurrences (biological samples). Immutable. | integer | 4 |
| num_occurrences_training | Number of occurrences in training split. Immutable. | integer | 2 |
| num_occurrences_test | Optional. Number of occurrences in test split. Immutable. | integer | 2 |
| num_occurrences_validation | Optional. Number of occurrences in validation split. Immutable. | integer | 2 |
| image_data_type | Data type of image values compatible with NumPy (np.dtype). | string | "int16" |
| annotation_data_type | Optional. Data type of annotation values. | string | "uint8" |
| value_channels | Number of channels per image (e.g., 1 for grayscale, 3 for RGB). | integer | 1 |
| range | Manual specification of possible voxel value range across all instances. | array of number | [0, 1000] |
| range_max | Maximum value across all instances. Automatically calculated during validation. | number | 1000 |
| range_min | Minimum value across all instances. Automatically calculated during validation. | number | 0 |
| range_avg | Average value across all instances. Automatically calculated during validation. | number | 500.0 |
| dimensions_max | Dimensions of the largest image. Automatically calculated. | array of integer | [96, 128, 150] |
| dimensions_min | Dimensions of the smallest image. Same shape as dimensions_max. Automatically calculated. | array of integer | [41, 64, 78] |
| dimensions_avg | Average dimensions across all images. Same shape as dimensions_max. Automatically calculated. | array of number | [57.496, 92.015, 115.603] |
| resolution_unit | Unit used for voxel size (e.g., mm, µm). | string | "mm" |
| resolution_voxel_size | Manual specification of voxel size per dimension. | array of number | [0.1, 0.1, 0.1] |
| resolution_voxel_size_max | Maximum voxel size across all instances. Automatically calculated. | array of number | [0.1, 0.1, 0.1] |
| resolution_voxel_size_min | Minimum voxel size across all instances. Automatically calculated. | array of number | [0.1, 0.1, 0.1] |
| resolution_voxel_size_avg | Average voxel size across all instances. Automatically calculated. | array of number | [0.1, 0.1, 0.1] |
| training | List of image and annotation paths for training instances. "image" is required; "annotations" is required only for labeled data. Immutable. | array of object | [{"image": "occurrence-0001/instance-0000/image.nii.gz", "annotations": "occurrence-0001/instance-0000/annotations.nii.gz"}] |
| test | Optional. Same structure as training for test split. | array of object | [{"image": "occurrence-0004/instance-0000/image.nii.gz", "annotations": "occurrence-0004/instance-0000/annotations.nii.gz"}] |
| validation | Optional. Same structure as training for validation split. | array of object | [{"image": "occurrence-0002/instance-0000/image.nii.gz", "annotations": "occurrence-0002/instance-0000/annotations.nii.gz"}] |
| showcase_images | Optional subset of instances for presentation (e.g., in websites). | array of object | [{"image": "...", "annotations": "..."}] |
| data_references | Maps file paths to real-world identifiers (e.g., sample IDs). Used for traceability. Immutable. | object | {"occurrence-0000/instance-0000/image.nii.gz": "sample_001"} |
Example:
{
"id": "mais_seed_matured_2025-7-5_806fd055-b90d-46d5-a1ce-dd7e61b286ee",
"uuid": "806fd055-b90d-46d5-a1ce-dd7e61b286ee",
"species_en": "maize",
"species_de": "Mais",
"species_la": "frumentum",
"organ_en": "seed",
"organ_de": "Samen",
"organ_la": "semen",
"development_stage_en": "matured",
"development_stage_de": "gereift",
"name": "Maize Seed Matured",
"name_de": "Mais Samen Gereift",
"name_la": "Spelta Semen Matured",
"original_name": "Maize_mix_Classic_mix_M1_res_multi_inst",
"release": "2025.7.5",
"line name": "Mais",
"development_state": "10 DAP",
"device": "NMR Device",
"coil": "CRP 13C/1H 5mm 400MHz",
"measurement channel": "structure",
"description": "NMR dataset with all maize samples. Test set dispersed among sets 7,8, 10, 11, tree set7 samples discarded.",
"reference": "Leibniz Institute of Plant Genetics and Crop Plant Research (IPK) ",
"license": "IPK proprietary",
"publishing_venue": [],
"tags": [
"MRI",
"3D",
"Image"
],
"task_categories": [
"image-segmentation"
],
"labels": {
"0": "background",
"1": "embryo",
"2": "endosperm",
"3": "aleuron"
},
"image_format": ".nii.gz",
"annotation_format": ".nii.gz",
"num_instances_total": 6,
"num_instances_training": 2,
"num_instances_test": 2,
"num_instances_validation": 2,
"num_occurrences_total": 6,
"num_occurrences_training": 2,
"num_occurrences_test": 2,
"num_occurrences_validation": 2,
"image_data_type": "int16",
"annotation_data_type": "uint8",
"value_channels": 1,
"range": [
0,
16000
],
"range_max": 1002,
"range_min": 0,
"range_avg": 167.57250248655913,
"dimensions_max": [
96,
128,
150
],
"dimensions_min": [
41,
64,
78
],
"dimensions_avg": [
57.49618320610687,
92.01526717557252,
115.6030534351145
],
"resolution_unit": "mm",
"resolution_voxel_size": [
0.1,
0.1,
0.1
],
"resolution_voxel_size_max": [
0.1,
0.1,
0.1
],
"resolution_voxel_size_min": [
0.1,
0.1,
0.1
],
"resolution_voxel_size_avg": [
0.1,
0.1,
0.1
],
"training": [
{
"annotations": "occurrence-0000/instance-0000/annotations.nii.gz",
"image": "occurrence-0000/instance-0000/image.nii.gz"
},
{
"annotations": "occurrence-0001/instance-0000/annotations.nii.gz",
"image": "occurrence-0001/instance-0000/image.nii.gz"
}
],
"validation": [
{
"annotations": "occurrence-0002/instance-0000/annotations.nii.gz",
"image": "occurrence-0002/instance-0000/image.nii.gz"
},
{
"annotations": "occurrence-0003/instance-0000/annotations.nii.gz",
"image": "occurrence-0003/instance-0000/image.nii.gz"
}
],
"test": [
{
"annotations": "occurrence-0004/instance-0000/annotations.nii.gz",
"image": "occurrence-0004/instance-0000/image.nii.gz"
},
{
"annotations": "occurrence-0005/instance-0000/annotations.nii.gz",
"image": "occurrence-0005/instance-0000/image.nii.gz"
}
],
"showcase_images": [
{
"annotations": "occurrence-0000/instance-0000/annotations.nii.gz",
"image": "occurrence-0000/instance-0000/image.nii.gz"
}
],
"data_references": {
"occurrence-0000/instance-0000/image.nii.gz": "example1",
"occurrence-0001/instance-0000/image.nii.gz": "example2",
"occurrence-0002/instance-0000/image.nii.gz": "example3",
"occurrence-0003/instance-0000/image.nii.gz": "folder_xyz/exampleA",
"occurrence-0004/instance-0000/image.nii.gz": "folder_xyz/exampleB",
"occurrence-0005/instance-0000/image.nii.gz": "folder_xyz/exampleC"
}
}
Data migration scripts:
There was a migration at Nov 2026.
Change TARGET_FOLDER to the folder of your local datasets and inside the file and then run it to migrate older files than Nov 2026.
migration_script_datasetmeta_json_11_2026.py
Metadata
Release files for magdi-data 0.4.5b389
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magdi_data-0.4.5b389.tar.gz | 26.5 kB | Without provenance | Details for magdi_data-0.4.5b389.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magdi_data-0.4.5b389-py3-none-any.whl | Python 3 | none | any | Details for magdi_data-0.4.5b389-py3-none-any.whl |
Total release size: 55.2 kB
Release files / magdi_data-0.4.5b389.tar.gz
| Download URL | magdi_data-0.4.5b389.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
524a5d40f8fe91354f2a0ca5939f90dbcee4d2ce441dd021edc18ef2ea830bc7
|
|
BLAKE2b-256 checksum How to use checksums |
c5c6ce85e7647a5c09b8cd29e6392b2da0a93f764171b0c3b3b5655978ef9389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / magdi_data-0.4.5b389-py3-none-any.whl
| Download URL | magdi_data-0.4.5b389-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62310e68f6ec24cfb9eb7f51409068d7aa9e7a457ac0119862f6cfd8f19be737
|
|
BLAKE2b-256 checksum How to use checksums |
504d05e24857a6d3b0fa5147fdbf430708a65011e6f1cbf0abdeff4e8a751add
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for magdi-data 0.4.5b389
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.