Export to BMZ#
The BioImage Model Zoo is a zoo of models that can be run in a variety of software thanks to the BMZ format. CAREamics is compatible with the BMZ format and can export and load (CAREamics) models in this format.
To export a trained model, you can simply call careamist.export_to_bmz
:
careamist.export_to_bmz(
path_to_archive=export_path / "my_model.zip", # (1)!
friendly_model_name="CARE_mito", # (2)!
input_array=my_array, # (3)!
authors=[
{
"name": "Ignatius J. Reilly",
"affiliation": "Levy Pants",
"email": "ijr@levy.com",
},
{"name": "Myrna Minkoff", "orcid": "0000-0002-3291-8524"}, # (4)!
],
general_description="This model was trained to denoise 2D images of mitochondria.", # (5)!
data_description="The data was acquired on a confocal microscope [...]", # (6)!
)
-
The model export should be a
.zip
file, if not CAREamics will add the extension. -
Give the model a name that is informative! It should consist of letters, numbers, hyphens and underscores.
-
We need an input array to verify the export, the input and the prediction will be packaged in the BMZ model. They will also be used to create the cover of the model if it is uploaded to the BioImage Model Zoo.
-
You can have multiple authors, and
affiliation
,email
,orcid
andgithub _user
. -
A README will automatically be generated by CAREamics, containing information on how the model was trained. The general description should be a short description of what the model is used for.
-
The
data_description
should contain precise information on the type of data the model was trained on, this can include the type of data (specimen, modality), the dimensions (physical, number of pixels) and the content (type of structures).
Optional parameters#
The export_to_bmz
function has an optional parameter:
careamist.export_to_bmz(
path_to_archive=export_path / "my_model.zip",
friendly_model_name="CARE_mito",
input_array=my_array,
authors=[
{
"name": "Ignatius J. Reilly",
"affiliation": "Levy Pants",
"email": "ijr@levy.com",
},
{"name": "Myrna Minkoff", "orcid": "0000-0002-3291-8524"},
],
general_description="This model was trained to denoise 2D images of mitochondria.",
data_description="The data was acquired on a confocal microscope [...]",
channel_names=["mito", "nucleus"], # (1)!
)
- If your data has channels, then you should add their name!
Examples of CAREamics models#
In progress
This page is still in construction.