Skip to content
Discussion options

You must be logged in to vote

Hi @juanprietob, Since most of the transforms in MONAI assume that the shape of the data is BxCxHxWx[D], you should add channel dim using EnsureChannelFirst.
Try something like:
image = np.random.randint(0, 256, (50, 50, 50), dtype=np.uint8)[None].

Hope it can help you, thanks!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wyli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6298 on April 05, 2023 16:06.