Hi everyone!
If you work with texture analysis (medical imaging, satellite data, or industrial defect detection), you've likely noticed that classic libraries like mahotas and scikit-image compute Gray-Level Co-occurrence Matrices (GLCM) and Haralick features strictly on the CPU. On large datasets, this quickly becomes a major pipeline bottleneck.
To solve this, I wrote and open-sourced haralickt — a library that offloads these computations to the GPU using vectorized matrix operations in PyTorch and CUDA.
Key highlights:
• > 20x faster than traditional CPU implementations on high-resolution images and batches.
• Identical numerical precision to classic implementations (verified against mahotas).
• PyTorch-native: works seamlessly with torch.Tensor on GPU without costly CPU-GPU data transfers.
• Open Source (MPL 2.0): free to use in research and commercial projects.
Quick installation:
bash
pip install haralickt
Используйте код с осторожностью.
GitHub repository & benchmarks: [https://github.com/SergeiyVaryukhin/haralickt-1.0.0]
This is my first public release (v1.0.0), so I would really appreciate any feedback, bug reports, or ideas for new features. If you find it useful for your projects, a star on GitHub would mean a lot!
AI & ML
Source:https://dev.to/sergeiyvaryukhin/i-built-haralickt-20x-faster-gpu-accelerated-haralick-texture-features-glcm-in-pytorch-with-12ln
I built haralickt: > 20x faster GPU-accelerated Haralick texture features (GLCM) in PyTorch with identical precision to Mahotas
dev.to OpenSource0 views
PreviousManaging CentOS from Python: Reemote's `dnf` and `systemd` modulesNextHow to identify meeting notetakers with an open dataset
Related posts
AI Doesn’t Have to Go Rogue to Break the World
0Schneier on Security
Hotwire guide and more
0Ruby on Rails
A Practical Website Accessibility Review for Small Teams
0dev.to UX

Chatbots for E-commerce: Boosting Sales and Support
0dev.to UX

The 2-Micron Particle That Can Paralyze an 800G AI Fabric: Why Skipping SN-MT End-Face Inspection Is a Silent Disaster
0dev.to Data
Phân tích hiệu suất của Cole Palmer và dấu ấn của Morgan Rogers tại tuyển Anh
0dev.to Data