cd /news/computer-vision/i-built-haralickt-20x-faster-gpu-acc… · home › topics › computer-vision › article
[ARTICLE · art-168960] src=dev.to ↗ pub= topic=computer-vision verified=true sentiment=↑ positive

I built haralickt: > 20x faster GPU-accelerated Haralick texture features (GLCM) in PyTorch with identical precision to Mahotas

A developer released haralickt, an open-source PyTorch library that computes Gray-Level Co-occurrence Matrices (GLCM) and Haralick texture features on GPUs using vectorized matrix operations and CUDA. The library claims to run more than 20x faster than CPU implementations such as mahotas and scikit-image on high-resolution images and batches, while matching mahotas' numerical precision. It is available via pip under the MPL 2.0 license and works directly with torch.Tensor on GPU without CPU-GPU transfers.

by read1 min views1 publishedNov 13, 2026

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!

── more in #computer-vision 4 stories · sorted by recency
── more on @haralickt 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-haralickt-20…] indexed:0 read:1min 2026-11-13 · —