Skip to main content

Algocore: High-Performance Image Processing Functions

Algocore is a library of optimized atomic functions designed for efficient image processing. These functions serve as the foundation for Albumentations, a popular image augmentation library.

Overview

Image processing operations can be implemented in various ways, each with its own performance characteristics depending on the image type, size, and number of channels. Algocore aims to provide the fastest implementation for each operation by leveraging different backends such as NumPy, OpenCV, and custom optimized code.

Key features:

  • Optimized atomic image processing functions
  • Automatic selection of the fastest implementation based on input image characteristics
  • Seamless integration with Albumentations
  • Extensive benchmarking for performance validation

Installation

pip install algocore

Usage

import numpy as np
import algocore
# Create a sample image
image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)
# Apply a function
result = algocore.multiply(image, 1.5)

Algocore automatically selects the most efficient implementation based on the input image type and characteristics.

Functions

Algocore includes optimized implementations for various image processing operations, including:

  • Arithmetic operations (add, multiply, power)
  • Normalization (per-channel, global)
  • Geometric transformations (vertical flip, horizontal flip)
  • Helper decorators (to_float, to_uint8)

Performance

Algocore uses a combination of techniques to achieve high performance:

  1. Multiple Implementations: Each function may have several implementations using different backends (NumPy, OpenCV, custom code).
  2. Automatic Selection: The library automatically chooses the fastest implementation based on the input image type, size, and number of channels.
  3. Optimized Algorithms: Custom implementations are optimized for specific use cases, often outperforming general-purpose libraries.

Benchmarks

We maintain an extensive benchmark suite to ensure Algocore's performance across various scenarios. You can find the benchmarks and their results in the benchmarks directory.

License

MIT

Acknowledgements

Algocore is part of the Albumentations project. We'd like to thank all contributors to Albumentations and the broader computer vision community for their inspiration and support.

Metadata

Release files for algocore 0.1.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 algocore 0.1.0
File Size Uploaded
algocore-0.1.0.tar.gz 36.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for algocore 0.1.0
File Interpreter ABI Platform
algocore-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.1 kB

Release files / algocore-0.1.0.tar.gz

Download URL algocore-0.1.0.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
43480036e8575c8291e55a54952265f1024c177721e5c8b35c55e436304cbdcb
BLAKE2b-256 checksum
How to use checksums
6984e639efe04407761fc64948482082aae52685b3056a81b5d26bb26b660223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / algocore-0.1.0-py3-none-any.whl

Download URL algocore-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
675cfd0c95d2ef5950b51eb51f35be6788f00de657d5ab6e66b71975d65ee72f
BLAKE2b-256 checksum
How to use checksums
4c05878b667ec794c12b20907dbae64295307b8d2d5ed8e3def77069312660d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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