Registry / ai-ml / albucore

albucore

JSON →
library0.2.15pypypi✓ verified 24d ago

Albucore is a high-performance Python library offering optimized atomic functions for image processing in deep learning and computer vision. It serves as a foundational component for the AlbumentationsX library, automatically selecting the fastest implementation for operations using backends like NumPy and OpenCV. Currently at version 0.1.5, the library is actively maintained with frequent updates and performance enhancements.

pip install albucore
INSTALL
IMPORT
SIG · ALBUCORE
A
albucore
ai-mlpythonv0.2.15
Install
6.7s avg
Import
302ms
Disk
332MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.15 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/5 runs
✓ 6.82s
py 3.11
1/5 runs
✓ 6.12s
py 3.12
1/5 runs
✓ 5.64s
py 3.13
1/5 runs
✓ 6s
py 3.9
✕ build_error
✓ 8.68s
332MB installed
● package 332MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

multiply
from albucore import multiply
from albucore import multiply

This quickstart demonstrates how to import and use a basic image processing function (`multiply` and `add`) from Albucore. It highlights the crucial image shape convention by providing examples for both RGB and grayscale images, ensuring the channel dimension is always present.

import numpy as np import albucore # Create a sample RGB image (H, W, C) - uint8 is a supported dtype image_rgb = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8) # Create a sample grayscale image (H, W, 1) - explicit channel dimension is required image_gray = np.random.randint(0, 256, (100, 100, 1), dtype=np.uint8) # Apply a function, e.g., multiply by a constant result_rgb = albucore.multiply(image_rgb, 1.5) result_gray = albucore.add(image_gray, 50) print(f"Original RGB shape: {image_rgb.shape}, dtype: {image_rgb.dtype}") print(f"Result RGB shape: {result_rgb.shape}, dtype: {result_rgb.dtype}") print(f"Original Grayscale shape: {image_gray.shape}, dtype: {image_gray.dtype}") print(f"Result Grayscale shape: {result_gray.shape}, dtype: {result_gray.dtype}")
Debug
Known issues
gotchaAlbucore strictly expects images to follow specific shape conventions, always including a channel dimension. For grayscale images, this means a shape of (H, W, 1) (Height, Width, 1 Channel), not (H, W). For RGB, it's (H, W, C).
fix
Always reshape grayscale images to `(H, W, 1)` using `np.expand_dims(image, axis=-1)` or ensure they are created with this shape. For batches, ensure shapes like `(N, H, W, C)`.
affects: All versions
gotchaAlbucore functions primarily support `uint8` and `float32` dtypes for optimal performance. Using other dtypes may lead to errors or significantly degraded performance as the library might fall back to less optimized paths or raise exceptions.
fix
Ensure input images are converted to `np.uint8` or `np.float32` before passing them to Albucore functions. For float images, normalize pixel values to the expected range (e.g., [0, 1] or [0, 255]) as appropriate for the operation.
affects: All versions
Upgrade
Version history
0.2.15latest on PyPI · released Aug 25, 2026
Audit
Dependencies
numpyrequiredCore array manipulation
stringzillarequiredInternal utility
numkongrequiredInternal utility for optimized computations
opencv-python-headlessoptionalBackend for image processing functions; installed via [headless] extra
opencv-pythonoptionalBackend for image processing functions with GUI support; installed via [gui] extra
opencv-contrib-pythonoptionalBackend for image processing functions with contrib modules (GUI); installed via [contrib] extra
opencv-contrib-python-headlessoptionalBackend for image processing functions with contrib modules (headless); installed via [contrib-headless] extra
Agent activity
49 hits · last 30 days
node
42
OpenAI (training)
1
Resources
albucore — pip install albucore · libregistry