model_description
Module use to build BMZ model description.
create_model_description(config, name, general_description, data_description, authors, inputs, outputs, weights_path, torch_version, careamics_version, config_path, env_path, covers, channel_names=None, model_version='0.1.0')
#
Create model description.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config | Configuration | CAREamics configuration. | required |
name | str | Name of the model. | required |
general_description | str | General description of the model. | required |
data_description | str | Description of the data the model was trained on. | required |
authors | list[Author] | Authors of the model. | required |
inputs | Union[Path, str] | Path to input .npy file. | required |
outputs | Union[Path, str] | Path to output .npy file. | required |
weights_path | Union[Path, str] | Path to model weights. | required |
torch_version | str | Pytorch version. | required |
careamics_version | str | CAREamics version. | required |
config_path | Union[Path, str] | Path to model configuration. | required |
env_path | Union[Path, str] | Path to environment file. | required |
covers | list of pathlib.Path or str | Paths to cover images. | required |
channel_names | Optional[list[str]] | Channel names, by default None. | None |
model_version | str | Model version. | "0.1.0" |
Returns:
Type | Description |
---|---|
ModelDescr | Model description. |
Source code in src/careamics/model_io/bioimage/model_description.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
|
extract_model_path(model_desc)
#
Return the relative path to the weights and configuration files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_desc | ModelDescr | Model description. | required |
Returns:
Type | Description |
---|---|
tuple of (path, path) | Weights and configuration paths. |