Skip to content

MapLabelValue is incorrect when mapping strings #2007

@wyli

Description

@wyli

Describe the bug
the issue is mainly with the string mapping

To Reproduce

from monai.transforms import MapLabelValue
xform = MapLabelValue(["label3", "label2", "label1"], ["label3", "label2", "label1"])
xform([["label3", "label1"], ["label1", "label2"]])

output:

array([[0., 0.],
       [0., 0.]], dtype=float32)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions