Skip to main content

RGB search with numba.cuda - 10 x faster than numpy

pip install locate-pixelcolor-numbacuda

from locate_pixelcolor_numbacuda import search_colors
from a_cv_imwrite_imread_plus import open_image_in_cv
import numpy as np
colors=[(66,  71,  69),(62,  67,  65),(144, 155, 153),(52,  57,  55),(127, 138, 136),(53,  58,  56),(51,  56,  54),(32,  27,  18),(24,  17,   8),]

image'https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/'

picnp = open_image_in_cv('pexels-alex-andrews-2295744.jpg',channels_in_output=3)
coords=search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)
print(coords)
%timeit search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)


# [[[  19   14]
#   [  19   14]
#   [  11   17]
#   ...
#   [6613 4524]
#   [6614 4524]
#   [6615 4524]]]
# 135 ms ± 3.5 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

# More benchmarks: https://github.com/hansalemaos/locate_pixelcolor_cpp

Metadata

Release files for locate-pixelcolor-numbacuda 0.12

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

Source distribution (sdist)

Source distribution for locate-pixelcolor-numbacuda 0.12
File Size Uploaded Provenance Actions
locate_pixelcolor_numbacuda-0.12.tar.gz 4.8 kB Without provenance Details for locate_pixelcolor_numbacuda-0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for locate-pixelcolor-numbacuda 0.12
File Interpreter ABI Platform Actions
locate_pixelcolor_numbacuda-0.12-py3-none-any.whl Python 3 none any Details for locate_pixelcolor_numbacuda-0.12-py3-none-any.whl

Total release size: 11.6 kB

Release files / locate_pixelcolor_numbacuda-0.12.tar.gz

Download URL locate_pixelcolor_numbacuda-0.12.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4be17bc1996ba6dff3e21e6f9ef698411b768c75cc60149dd2d79cfaaa0f4bc1
BLAKE2b-256 checksum
How to use checksums
d95c56f7f6951b5ea88ebf3add799807f5ada620639c17cb81f94b507420ad79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / locate_pixelcolor_numbacuda-0.12-py3-none-any.whl

Download URL locate_pixelcolor_numbacuda-0.12-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a544ca61fc2edb326aa301717ff536f119d4a5e6bbdb3be4225a5e847c9cc8fe
BLAKE2b-256 checksum
How to use checksums
b81325c3bf17022eedb479f4070a5f9cde95b8b5ccc87dc9fea2d6a21887ee90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for locate-pixelcolor-numbacuda 0.12

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.

Release history Release notifications | RSS feed

This release

0.12 This release

2 release files No provenance

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