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 0.1.2

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 0.1.2
File Size Uploaded Provenance Actions
haralick_torch-0.1.2.tar.gz 6.4 kB Without provenance Details for haralick_torch-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 14.2 kB

Release files / haralick_torch-0.1.2.tar.gz

Download URL haralick_torch-0.1.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f73ffd41017c8052093b15d93309e70a78396882f79d6fa20d1678e6cf8dd9c9
BLAKE2b-256 checksum
How to use checksums
6d3ee429c1e985be8be44af41bb06d51403bdb04045420794133233e161ca99e
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-0.1.2-py3-none-any.whl

Download URL haralick_torch-0.1.2-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48dd49b9e32ef36d56c067dbcc22c4e6caad4c14146c2468dcaf6b7f8c236f21
BLAKE2b-256 checksum
How to use checksums
e1844cafadd2daa61c0360f853e8a37f522efff4b5e2b3cffd640cfdb042a256
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 0.1.2

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