Using GridSampler as sampler in tio.Queue() #1061
Unanswered
MirenLurBarquin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Hi, @MirenLurBarquin. I recommend you use a weighted sampler or a label sampler for this. If you really want to use something like a grid sampler, you could precompute the number of patches it will take from each volume and add specify it when instantiating the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
in the example for
tio.data.Queue()given in TorchIOs documentation the patch sampler used istio.data.UniformSampler, which does not need the subject as input. Thus, I can pass atio.SubjectDataset()with multiple elements as an argument intio.data.Queue()and the patches will be loaded without any problem later withtorch.utils.data.DataLoader().Say that in
tio.data.Queue()I want to usetio.data.GridSampler()which needs a subject as an argument. In my case I have customized theGridSampler()function so that it only takes patches with no background; thus, the output ofCustomGridSampler()will be different for each subject.Is there any way that I can use my customized grid sampler following the given example code:
so that it takes the each subject as argument?
Thank you in advance :)
Beta Was this translation helpful? Give feedback.
All reactions