Skip to main content

Reasonably fast implementation of HOG descriptor calculation

Project description

FastHOG

Reasonably fast implementation of Histogram of Oriented Gradients. Designed to be roughly equivalent to skimage.feature.hog. While slightly less flexible (it only supports float64 single-channel images), it is significantly faster, so ideal in workloads where HOG calculation is a bottleneck, as was in the https://github.com/flatironinstitute/ManifoldEM project that inspired this repository.

Installation

pip install fasthog

Usage

Example taken from https://scikit-image.org/docs/stable/auto_examples/features_detection/plot_hog.html

from fasthog import hog
from skimage import data
from skimage.color import rgb2gray

image = rgb2gray(data.astronaut())

fd, hog_image = hog(
    image,
    n_bins=8,
    pixels_per_cell=(16, 16),
    cells_per_block=(1, 1),
)

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(8, 4), sharex=True, sharey=True)

ax1.axis('off')
ax1.imshow(image, cmap=plt.cm.gray)
ax1.set_title('Input image')

# Rescale histogram for better display
hog_image_rescaled = exposure.rescale_intensity(hog_image, in_range=(0, 10))

ax2.axis('off')
ax2.imshow(hog_image_rescaled, cmap=plt.cm.gray)
ax2.set_title('Histogram of Oriented Gradients')
plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fasthog-0.1.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fasthog-0.1.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fasthog-0.1.7-pp39-pypy39_pp73-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded PyPymacOS 11.0+ ARM64

fasthog-0.1.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fasthog-0.1.7-pp38-pypy38_pp73-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded PyPymacOS 11.0+ ARM64

fasthog-0.1.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp313-cp313-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp312-cp312-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp311-cp311-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp311-cp311-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fasthog-0.1.7-cp310-cp310-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp310-cp310-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fasthog-0.1.7-cp39-cp39-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp39-cp39-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

fasthog-0.1.7-cp38-cp38-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp38-cp38-macosx_11_0_arm64.whl (12.4 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

fasthog-0.1.7-cp37-cp37m-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

fasthog-0.1.7-cp36-cp36m-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6mmusllinux: musl 1.2+ x86-64

fasthog-0.1.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

File details

Details for the file fasthog-0.1.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3710d7763822b38f8d6e604749c64ae365a873469c333fdfa0ece0bda13f5975
MD5 410dda20a6a70848b063bd01d010d04c
BLAKE2b-256 38383e45d89366396aa7e5a5a86abad5b61f9e51d31882732c9cf92267a3c124

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ecdb5289b6cedbdeb817acb0d5fcf9c02441491b6016ca29506cdcd8dad8e26b
MD5 a7f880eb577d79d4d166e0e0f92b227d
BLAKE2b-256 aceb816bc10375dec95ae40757daa5b4f99c54794bce6f29f8093f1d278b5f9f

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-pp39-pypy39_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp39-pypy39_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd633800516e735c4ad6065e5c5e99b278814393a216642d688332941ae6eed1
MD5 97e881de4d225d12263b495d9f90c650
BLAKE2b-256 7434433949ca3e14c1ef350d3db79e88dffdd6613b063f276b5d79e3a28b51ed

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16b3e4f0769b1e875b836f2eefdbd8634672c8fab303f9f9e818d8e67120e38f
MD5 b926bb4b8a807da20c878c064925a82a
BLAKE2b-256 f41df2d5ea42404becd3997e46fca951b96608da0ba68152dbe16176f074f1bf

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-pp38-pypy38_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp38-pypy38_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c24b04766826e5c0e4fc78803048d9fcc05ec73c1ffa501a2d83f8ff887e829
MD5 07e0b8c013ab8cc81f07f96c4fc0bd44
BLAKE2b-256 6748671f516343a014e4b5a869802144a153c58afcdffcae4f277fb76fa02c22

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 daa181031aca017110adb2bc7465ca956214c9891cfb081c37fdde43754d2548
MD5 05383dde119774c762b7b600b80a6389
BLAKE2b-256 409b1883875381c550069efb9f8e1d067c35c42eabafb0908e26f6eb1b597331

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5fb44359e8484a2936291ca475477096e6e10772ca0cca897f0ba95f02e1400c
MD5 b0e9098555cd520f0b2e35496fd7b282
BLAKE2b-256 e45c32a4a13edd024aed563bed959ebddfc7163baca0a2bea3940c0bfc5af505

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d293977298e4224e161d2362a83ada86cabb2f9efa7d8519bdcbda935ae568bb
MD5 0b27c3ad7ee1d34cfb96b44487c7d56b
BLAKE2b-256 da112b28583bc14dc5fad0500f0bed44adab59259c2f9eee8652f180bc269341

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 eb74b13fc11648fe1015884a82233b4c0c6583fbec3bf79c46d62df55d8c0a89
MD5 b722d7dc77f84e030481efa01f5f4f08
BLAKE2b-256 216903574be4b0f242ab0cb5f6be529ff58d7a918e95567c76f3d0a27bab760c

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c73051f58b0973dd08277de5eed9152a6e2034d2825a5802eaca0247d564e829
MD5 27798539597aa3d7a03993ca3c79444c
BLAKE2b-256 85b39209ac14098875648f41849b8bd5323ec65731e1a8a82aba590a3cc7e849

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dbda3b056b3664969b6f570e3d1adbb6f51e90b8733418f4827b913383cc0dc6
MD5 aad42db795785b42859a312ba2150f63
BLAKE2b-256 cd36416fe47cc9446ceb54056bdc3a6e7de9faf5b750266cf7f87d1b415802d6

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc2ee3546112d54bdab4462cf15c6f6bf1806314eba192eb1ea2c2923a661345
MD5 c17fd2fa3cbf3e80671d091b9d68b232
BLAKE2b-256 d0a47251e00d7109c1053392b58740b93cb33c31ec28fb65e9d65286c95e5d4e

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 825bd52f8c0f3dfafca88747af4423e86d44a02a1da2321dbb10c9dd8739f6cd
MD5 3b08c1819d249ce4ebf1c69a371243f2
BLAKE2b-256 288835843cf469ab525784d8874ac43e8ce9a37af3d9d0fe0084fe18369c328e

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2c40efe22ce279c251264c1a7076d4d49164c3d653e9517be50b3446d25838b8
MD5 f3ac1a6b5d2ca0f23b5d02caaa09e485
BLAKE2b-256 b3f6b68ba3ba706a943e165165233389de551664f7ee59ea3d2cf720ade9246b

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c98060f0375db8c811809aab266d9d79cb31367e1eb4bbe1251ed5dca6d4f58b
MD5 eea8db6d2542ce0e140e98b950f48c03
BLAKE2b-256 58f6a94da703dccd3d1666a9638f77e55270f7289e08e08553fcf4f1d08ed9da

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a593b717f6e864203a0f7ad30c8116dd95bfcc04e6fb82b2d66d083cddd569a1
MD5 1b153225851638f04dc17e4becd839ba
BLAKE2b-256 c4ac7ba2679c66b96baf71919ba5144ad67d83bb688a07d496c5913f43ec056a

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d2f9d4aa230ab00bd4265b134a145fa78c4c6c3c4ac9b1ef31d21f15161ad93b
MD5 19483253d882e8e6c1dcd2109ad5eb60
BLAKE2b-256 a31a98419fbd2c36b8e0aab05339d98b3c71ba8342cb993117561ab100ce3e2e

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67c95c75e910a31264dd565328ce76150d4ac23f66273fa441d9a15cc14112f6
MD5 b593c95e9a111b4b71913420fe945170
BLAKE2b-256 9d64dc5c9f5d7138228a74e4a1d56d30097741349a2ea61c97c50d878c605e6a

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7b467e91c25d16e700012d02813bd8ddff543b46113ae742c6114fe2159ec7b
MD5 4ac0a14288423536ffe72377d6a74dab
BLAKE2b-256 402d05fb51d6546fafc2344a48fdedb74b3c60f1bcc3e628130c89af48ab7b56

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d8fd7b444816f0275a003eb2b755dffbe780562aa0e079fdb60db8c4d521a5a3
MD5 d3d280c023ba7099aa7269e15b9cbd1e
BLAKE2b-256 bb2a81824c3c8abd0d395834bcbb3faf9327cc92e4cf1a256668e039ce75d9b0

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b44f98bc5e43c4b566fac08e6839b509911c23620f87bcf654894668845de852
MD5 6bf50790e5f48ace2f4258e84e756d82
BLAKE2b-256 ce12df7295d546b2af835b65b2bff05802bab09a0d676ad09760f38889457464

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2853a93099fc4c7b430209bd64cc78b574ab84c6632c5a392d14cbadead1a62c
MD5 2cf3994dbae56d2cc53ffd206575e933
BLAKE2b-256 58a516dbf91996ef5fa5f9b36c28729a6536b3aa6ec160835e7f1a202f5e4563

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp37-cp37m-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 994164e5a993ccc8af3fd2fb62e8ceab5f0df1473bd3625a4b723681a3766bcb
MD5 b49879c5b285b878ba3e2ef44593e0e8
BLAKE2b-256 9eff7c02ac9086a9c7dc9b6fc81fac53cba725d08d9cc20b505967f742c6ab5d

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2132963bee23e087872febb01e49fdaace1e01c35b98132ea020bdf43609aa6e
MD5 d2af96db3b2a75ae8d342fc5938f22b5
BLAKE2b-256 c4f798847c6b05d9110c9a86fa72f5cf35e3f08677650687b0a55a5a4f8a73ae

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp36-cp36m-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp36-cp36m-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 aabe08fdcb19d4e4b2d316ea1bfd2a42ed88165fd848a262fd60d81ba6c1161d
MD5 1c962dca148384bebe333439c45fbca1
BLAKE2b-256 efebd90d2906c8597ec209bceada4f8159d34ece54b34c3f9c85a6d1176e2ea3

See more details on using hashes here.

File details

Details for the file fasthog-0.1.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fasthog-0.1.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f7081c763341e8e6587acca5d7f71ab71988629895574447f1d3807faf691c0
MD5 141a2efc2f13b8258796d55ff1dd568c
BLAKE2b-256 d7449a394a5be57ef354e412634c88cca108de815e58a966885d27e707fa0287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page