using a GridSampler with a Queue
See original GitHub issueRight now this doesn’t exactly make sense, e.g. you need to pass samples_per_volume
to Queue
which is not quite coherent, and it’s not clear how to pass arguments (specifically patch_overlap
) to the GridSampler
.
(Use case: I want my validation to be done deterministically and from the entire image which is however too big to be segmented in a single pass, even without gradients. I guess there are also some minor issues with computing validation metrics on the patches rather than after stitching the patches but this is a start.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Queue with different samples_per_volume for each volume
Ideally, one would set sample_per_volume=number_of_2D_slices in combination to UniformSampler. To avoid this, I was tempted to use GridSampler, however, ...
Read more >Patch samplers - Training - TorchIO
A patches list is filled with patches extracted by the sampler, and the queue is shuffled once it has reached a specified maximum...
Read more >Using Queues - SAS Help Center
By using multiple queues, you can control the workflow of jobs that are processed on the grid. By default, SAS uses a queue...
Read more >TorchIO: Tools for loading, augmenting and writing 3D ...
torchio is a Python package containing a set of tools to efficiently read, sample and write 3D medical images in deep learning applications ......
Read more >TorchIO tutorial.ipynb - Colaboratory - Google Colab
In this tutorial, we will train a 3D U-Net to perform brain segmentation from T1-weighted MRI using the Information eXtraction from Images (IXI)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you don’t need to assemble the volume, you can still use the code from the notebook minus the aggregator bits. Here’s some pseudocode:
After thinking a bit more and looking at the code, I think the problem with the snippet above is that the
GridSampler
should take a sample as input, not just a tensor, like the other samplers. I’ll see what I can do and come up with a solution.@fepegar
I’ve put up a pull request to add @bcdarwin! 🎉