Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] add graycomatrix and graycoprops in skimage.feature #530

Open
maxbut38 opened this issue Apr 5, 2023 · 3 comments
Open

[FEA] add graycomatrix and graycoprops in skimage.feature #530

maxbut38 opened this issue Apr 5, 2023 · 3 comments
Labels
feature request New feature or request

Comments

@maxbut38
Copy link

maxbut38 commented Apr 5, 2023

New generation of artificial intelligence (CNN or Classification) for texture analysis use the grey level co-occurence matrix (GLCM) and its features (contrast, dissimilarity, homogeneity, energy,correlation, ASM) for better classification.

Those methods are alreday in skimage.feature. Thus, i would know if it is possible to add to cucim.skimage.feature to make calculations faster.

Hereafter, the code to transform.

glcm = graycomatrix(image, distances=distances, 
			angles=angles, levels=levels,symmetric=False,normed=True)
contrast = graycoprops(glcm, 'contrast')
dissimilarity = graycoprops(glcm, 'dissimilarity')
homogeneity = graycoprops(glcm, 'homogeneity')
energy = graycoprops(glcm, 'energy')
correlation = graycoprops(glcm, 'correlation')
asm = graycoprops(glcm, 'ASM')
features = np.concatenate([contrast, dissimilarity, homogeneity, energy, correlation, asm])
@maxbut38 maxbut38 added the feature request New feature or request label Apr 5, 2023
@talakhlaif
Copy link

I would like to work on this issue and implement the graycomatrix

@monzelr
Copy link
Contributor

monzelr commented May 30, 2023

I will help @talakhlaif with the implementation

@grlee77
Copy link
Contributor

grlee77 commented Jun 9, 2023

Thank you for volunteering to work on the feature.

I had briefly looked for existing implementations and found these two that are MIT-licensed:
https://github.com/Eve-ning/glcm-cupy
https://github.com/teamsar/glcmwithcuda

I did not try either one to see what the relative performance was or how close they are to the scikit-image API. If you have experience with either I would be glad to hear about it. The first one is already CuPy based and actually seems to optionally use cuCIM here:
https://github.com/Eve-ning/glcm-cupy/blob/master/glcm_cupy/cross/glcm_cross.py#L12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants