You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I use PyRadiomics to extract voxel-based features and noticed that it is extremely slow, especially GLCM features, like #679.
I use pyinstrument to profile extraction and I found that numpy.delete and ndarray.copy takes lots of time.
so I try to speed up and made a PR(#882).
After this modification, I got improvement of 14s:
with very small error:
all close: True
max abs diff: 2.7939677238464355e-09
max rel diff1: 3.6155523019942848e-12
max rel diff2: 3.6156633242967473e-12
Version (please complete the following information):
OS: Windows 11
Python version: 3.10
PyRadiomics version: 3.1.0
Additional context
Obviously, this PR cannot fully solve this problem.
So, I try to use GPU(PyTorch) to accelerate: pytorchradiomics
Using pytorch gains about 20x~30x acceleration in voxel-based GLCM extraction.
I am not sure it should be included in pyradiomics or just a standalone package.
Any suggestions?
The text was updated successfully, but these errors were encountered:
Description
![image](https://private-user-images.githubusercontent.com/3370369/342679127-8178b1db-e02b-4101-bc00-23e0b15246d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMzQ5NDAsIm5iZiI6MTcyNjEzNDY0MCwicGF0aCI6Ii8zMzcwMzY5LzM0MjY3OTEyNy04MTc4YjFkYi1lMDJiLTQxMDEtYmMwMC0yM2UwYjE1MjQ2ZDQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDk1MDQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmY5MzE1OWY5OTYwMTg4ZjRkODhiNDQyMWI0Mjc3ODljZGJhMzdmYmE1Y2EzMmVhOGVmN2I5YjI3MGVlM2VhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.teDy3iaJDlaQ6Z6RLF8643fDW2YmdbPeMkxdeVx3XCs)
I use PyRadiomics to extract voxel-based features and noticed that it is extremely slow, especially GLCM features, like #679.
I use pyinstrument to profile extraction and I found that
numpy.delete
andndarray.copy
takes lots of time.so I try to speed up and made a PR(#882).
![image](https://private-user-images.githubusercontent.com/3370369/342679288-7016b06f-5811-4193-81d7-e71a7c991d2d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMzQ5NDAsIm5iZiI6MTcyNjEzNDY0MCwicGF0aCI6Ii8zMzcwMzY5LzM0MjY3OTI4OC03MDE2YjA2Zi01ODExLTQxOTMtODFkNy1lNzFhN2M5OTFkMmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDk1MDQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjRlYmZiOTgzMWEzYmQ2YzEyNGFlMWUyMzY1ODU2ZTg3YWQ0ZDI2YjgwOTQxNzgyNTM0YTNlMzYwMjhjOGQxYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jtKGoSe3WsCanSJOoLaagK32YJc5dyLZnr-eP0I2cXE)
After this modification, I got improvement of 14s:
with very small error:
PyRadiomics configuration
NA
PyRadiomics log file
To Reproduce
RadiomicsGLCM2
is the modified version.Version (please complete the following information):
Additional context
Obviously, this PR cannot fully solve this problem.
So, I try to use GPU(PyTorch) to accelerate: pytorchradiomics
Using pytorch gains about 20x~30x acceleration in voxel-based GLCM extraction.
I am not sure it should be included in pyradiomics or just a standalone package.
Any suggestions?
The text was updated successfully, but these errors were encountered: