Skip to content
Discussion options

You must be logged in to vote

Here is a simple demo.

trans = Compose([
         LoadImaged(...),
         EnsureChannelFirstd(...),
         RepeatChanneld(..., repeats=5),
         SplitDimd(..., dim=0, list_output=True)
])
ds_p = monai.data.Dataset([{"img": image_path}], transform=trans)

BTW, you can also specify your own collate_fn in MONAI.

if "collate_fn" not in kwargs:
kwargs["collate_fn"] = list_data_collate

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@KumoLiu
Comment options

@pcanas
Comment options

@KumoLiu
Comment options

Answer selected by pcanas
@pcanas
Comment options

@KumoLiu
Comment options

@pcanas
Comment options

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