Skip to content

Promote Child Items to Top Level #5553

@bhashemian

Description

@bhashemian

The MONAO dict-based transforms acts on the top level keys, for instance data={"image": ..., "pred": ...}; however, when the output is nested (like in the hovernet model), the actual data will lie one level below like data={"image": ..., "pred": {"a":..., "b":...}}.

Currently, if user want to apply transform on "a" or "b", it can use Lambdad and apply that transfrom on data["pred"] instead and use "a" and "b" as keys. However, if the user want to apply a transform on "image" and "a" for instance, I didn't find any transform that can enable it.

Here a transform that can promote these children items ("a" and "b") to the same level of "image" can solve the problem.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

💯 Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions