Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Which datatype to use saving nifti labels #722

Description

@davidkvcs

Hello

In your guide (https://github.com/microsoft/InnerEye-DeepLearning/blob/main/docs/creating_dataset.md) you write:

  • For images can be encoded as float32 with dimensions (X, Y, Z)
  • For segmentations should be encoded as binary masks with dimensions (X, Y, Z)

For segmentations: What do you mean by "encoded as binary masks"? that the array should be converted to an np.bool_?
This gives the following error with nifti (for me at least):
HeaderDataError: data dtype "<class 'numpy.bool_'>" not supported

Would for instance int8 be OK instead?
And of course in practice the label file will contain ones and zeros alone (I think this is what you mean by "binary encoding").

AB#5937

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions