Skip to main content

haralick-torch

GPU-accelerated Haralick texture extraction for GeoTIFF images using PyTorch.

Installation

GDAL must be installed via precompiled wheels:

https://github.com/cgohlke/geospatial-wheels/releases

pip install GDAL-3.10.1-cp310-cp310-win_amd64.whl
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install haralick-torch

Usage CLI

haralick-torch image.tif --tile 256 --window 15 --levels 64 --out outputs

Usage API

import torch
from haralick_torch.io import read_tiff_as_tensor
from haralick_torch.tiling import process_in_tiles
from haralick_torch.utils import save_as_tif

device = "cuda" if torch.cuda.is_available() else "cpu"

img, ref = read_tiff_as_tensor("image.tif", device)
textures = process_in_tiles(img, tile_size=256, window_size=15, levels=32)

for name, tensor in textures.items():
    save_as_tif(tensor.numpy(), ref, f"{name}.tif")

Metadata

Release files for haralick-torch 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for haralick-torch 1.0.0
File Size Uploaded Provenance Actions
haralick_torch-1.0.0.tar.gz 5.4 kB Without provenance Details for haralick_torch-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for haralick-torch 1.0.0
File Interpreter ABI Platform Actions
haralick_torch-1.0.0-py3-none-any.whl Python 3 none any Details for haralick_torch-1.0.0-py3-none-any.whl

Total release size: 12.2 kB

Release files / haralick_torch-1.0.0.tar.gz

Download URL haralick_torch-1.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0b1d2819bc585692cfb9a38390a56ddc9676c4affa31d96e5c52b52e861e3f23
BLAKE2b-256 checksum
How to use checksums
7e9ff879a778a93b0fe35215f6fc6fce4c8766385204730df935c668e902cee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / haralick_torch-1.0.0-py3-none-any.whl

Download URL haralick_torch-1.0.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb2e67994919dce96cfe128f57268b60e2e4dbdb5e7fcbde29f68a4b4e4dc1e8
BLAKE2b-256 checksum
How to use checksums
51dd74cf67aecea5508aa6badfda227e8203f2edab238c0a484e187ad377e6d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for haralick-torch 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page