Hey guys I was wondering if there is any way to speed up the voxel based extraction ? I’m trying to parallelise the extraction for multiple images and It works.But, the speed is too slow and of course if I parallelise too much images I run out of memory .
Thanks for any suggestion.
If you extract feature maps using masks that span the entire image, consider using masks only detailing the ROI, this will significantly reduce time. On the area of parallelisation, PyRadiomics has built-in paralellisation (using the --jobs
argument), but besides that there really isn’t anything easy I can think of.
Significant efforts have already been made to increase performance as much as possible for now, including paralellisation of cases and C extensions for the largest bottlenecks, but also batch-calculation of multiple voxels (making optimum use of numpy’s optimization, and reducing number of iterations made in python loops).
Keep in mind that calculating voxel-based radiomics simply is a very computational expensive operation, essentially the same as calculating segment-based radiomics, but once for every voxel in the ROI.
In the future, enhancements may be possible if we manage to make use of GPU accelerated calculations, but this is quite complex and not available at the moment.
Hi @JoostJM and @Alessio_Romita,
Is there a stride analog of a deep learning convolution stride to skip some voxels? I think this would have been of some use to us not to calculate radiomics with a step of size 1.
Could you also point the source code of the voxel-wise extraction please?
Thanks in advance!
Ivan
Hello @ivanzhovannik,
There is no stride analog in PyRadiomics’ voxel based calculation. If you want to skip certain voxels, exclude them from the mask. If you then set maskedKernel=False
, all voxels within the kernel will be included for feature calculation, regardless of whether they belong to the input mask or not.