Skip to content

External checkpoints

When you call load_results(), PhenoMe needs to match each row in your HDF5 file to the image files currently on disk. There are two ways.

You provide a unique identifier per image.

  • In HDF5: include /metadata/id (one unique string per row).
  • In code: call pipeline.find_files(image_dir) first.
  • Matching: the pipeline matches HDF5 IDs to the IDs generated by find_files. By default find_files uses the filename stem (for example cell_01 for cell_01.png).

You provide the literal file path.

  • In HDF5: store absolute paths in /img_path, or relative paths plus _storage_root root attribute.
  • In code: call pipeline.set_file_df(df) with a DataFrame that has a file_path column.
  • Matching: the pipeline matches rows where the path strings are identical.

Attributes are metadata attached to the root / of the file.