Skip to main content

Python-first computer vision library with C++ bindings for speed.

Project description

NextCV

Python's ease, C++'s speed. Finally.

License: Apache-2.0 Python 3.8+ C++17 Build Status


For those who want the full story, read the docs. For everyone else, here's the gist.


What is this? 🤔

It's a computer vision library. You write Python, because you're not a masochist. But when your code inevitably becomes a bottleneck, you need speed. That's where this library can help.

The philosophy is simple:

Write Python. When it's slow, make it fast with C++.


Does it actually work? 🚀

Yes. Here's a Non-Maximum Suppression (NMS) benchmark. We pitted our C++ implementation against a standard NumPy version.

import time
import numpy as np
from nextcv.postprocessing import nms_cpp, nms_np

# A respectable amount of data
N = 10000
rng = np.random.default_rng(42)
bboxes = rng.uniform(0, 100, (N, 4)).astype(np.float32)
scores = rng.uniform(0.1, 1, N).astype(np.float32)

# Time the C++ version
start_time = time.perf_counter()
result_cpp = nms_cpp(bboxes, scores, 0.5)
cpp_time = time.perf_counter() - start_time

# Time the NumPy version
start_time = time.perf_counter()
result_np = nms_np(bboxes, scores, 0.5)
np_time = time.perf_counter() - start_time

print("NMS Timing Comparison:")
print(f"   Dataset: {len(bboxes)} bounding boxes")
print(f"   nms_cpp(): {len(result_cpp)} boxes kept in {cpp_time * 1000:.2f}ms")
print(f"   nms_np(): {len(result_np)} boxes kept in {np_time * 1000:.2f}ms")

Fingers' crossed, the C++ version is significantly faster. 🎯


How do I use it? 🛠️

Prerequisites

# Ubuntu/Debian
sudo apt-get install libeigen3-dev cmake

# MacOS
brew install eigen cmake

Installation 📦

pip install nextcv

# or from git
pip install git+https://github.com/kevinconka/nextcv.git

# uv
uv add nextcv

Check it's working ✅

uv run python -c "import nextcv; print(nextcv.__version__)"

Building from source 🔨

This project uses a dual-configuration approach to support both modern development and legacy compatibility:

  • Modern builds (Python 3.9+): Uses scikit-build-core with pyproject.toml
  • Legacy builds (Python 3.6...3.8): Uses scikit-build with pyproject.legacy.toml + setup.py

For development:

# create a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install -e .

# or let uv handle it for you
uv sync

For legacy builds (Python 3.6...3.8):

# Copy legacy config and build
cp pyproject.legacy.toml pyproject.toml
pip install -e .

Contributing 🤝

If you think you can make this better, feel free. Just don't break anything.

  1. Fork it.

  2. Create a branch. (git checkout -b my-brilliant-idea)

  3. Install UV (if you don't have it yet).

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  4. Install C++ tools.

    # macOS
    brew install clang-format llvm
    # Add LLVM to PATH (add to ~/.zshrc or ~/.bash_profile)
    echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc
    
    # Ubuntu/Debian
    sudo apt-get install clang-format clang-tidy
    
  5. Set up the environment.

    uv sync
    uvx pre-commit install
    
  6. Write code. And tests. Don't forget the tests.

  7. Run the checks.

    uv run pytest
    uvx pre-commit run --all-files
    
  8. Open a pull request. Make it a good one.


That's it. Now you know. 🎉

Project details


Download files

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

Source Distribution

nextcv-1.0.2.tar.gz (212.8 kB view details)

Uploaded Source

Built Distributions

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

nextcv-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (187.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nextcv-1.0.2-cp313-cp313-macosx_11_0_arm64.whl (161.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nextcv-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (187.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nextcv-1.0.2-cp312-cp312-macosx_11_0_arm64.whl (161.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nextcv-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (185.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nextcv-1.0.2-cp311-cp311-macosx_11_0_arm64.whl (159.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nextcv-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (184.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nextcv-1.0.2-cp310-cp310-macosx_11_0_arm64.whl (158.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

nextcv-1.0.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (184.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nextcv-1.0.2-cp39-cp39-macosx_11_0_arm64.whl (158.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file nextcv-1.0.2.tar.gz.

File metadata

  • Download URL: nextcv-1.0.2.tar.gz
  • Upload date:
  • Size: 212.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ff7212db72415b07943e2f8eb191dc7cb7a6645b800155ec4b55b67c95e5ff2f
MD5 634739c3b611d40b16978ebc0e01aec1
BLAKE2b-256 84910312163b9b660d0d93d26a2c828b78ac55ace73d236840a3a17c666e6a0e

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 187.2 kB
  • Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cee41b007302f1e7a9f5f920b264bc825a16d0d89b8b0802574e182d6259008e
MD5 71cb294e4668a95b3d8191258c394297
BLAKE2b-256 a10c8444c8f64c388f6ba53e029dcc26e8a1a14d3a200f1f53fb3af8a3442713

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 161.5 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf00f9e0a624a6f59732b2aed4d2ff2d1ee45151011ad6b431bca73356516afb
MD5 9e9ebe1a85c09a22d97625e6e8f36217
BLAKE2b-256 cc987736363198ad3e5101e83db472932b3c41082d3576f255d1c9241f431516

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 187.2 kB
  • Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d98402984169a24c63d9d0177ef5d67f49bfb2ba29195c136b754f651d74eba
MD5 def144bd80d3df169d1b591688b7a687
BLAKE2b-256 0e760d52771b2766f888c75a5e9af5624eb82848f20fb07e0e58996e00665bf9

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 161.5 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36eb6910fa3aac9d485fbd1d07d63c4bc173b13cabf8f65d8f9e1660c7484446
MD5 bd3fffffc252d2502382b37d79bd0a9f
BLAKE2b-256 dc8bfa981f7b6610e4d8fec62699029f5a4d76183ad0e72fbf09b069ac3a5a5c

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 185.7 kB
  • Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 92415290ce3a36b101419b8e9adf4f2c67e407bccff877fd6ea6d8e07f835342
MD5 2db1c4280776ec6d845e115baccaeb1a
BLAKE2b-256 e470adbdb2f282b00bd0ada8d39ee95d4cf09e55a05d5b227b74d14aef75d60f

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 159.7 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c691c09f17f83369c9845226510fcfbe761ad8cdf65cf44689dc5cf62ef1346
MD5 d58a052277a8d8231e87870d2cc15d6b
BLAKE2b-256 513e9bd7f5b9214ad12b2610a764c2954a57b85cbea0a9d9f8e893ce504db25c

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 184.5 kB
  • Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1149de1a6f2e17b1868abb8c6a88a2265698dd1d0cc49e056efc3993bdfd8c41
MD5 aa33024f242b4fb7a56c8ad178853fbc
BLAKE2b-256 66d014b4a73d23defe20a99a92647ddcd376ffe67647d09aa16262ced4917556

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 158.6 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9dbd979735b7e4341f9742163b2845b9d965f94984d53c47f8db2eb6e67dd44
MD5 d24ff4e46ec60279e61316b39fc7006a
BLAKE2b-256 5b4ac25c980d7daaba459ae3953206afa7fdff40689a3ee575dad58c54759db5

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 184.7 kB
  • Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d836c6383b306d6795a6a26166ba1dc0577ab9de205c3f719fcd9ff044f11cb
MD5 f8b362e1e15bb92a945a7ec0a72b1983
BLAKE2b-256 cc3f6a4d6fab5cc19ad1f330dab64881ab68a93f1c3249f0f72ecbc130c8e4e3

See more details on using hashes here.

File details

Details for the file nextcv-1.0.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nextcv-1.0.2-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 158.7 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nextcv-1.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fec35f35d72ce257802f1a19b36dc5eb02fe8dfc8417e0e2550f1b10dd18d4ce
MD5 d7561520b0cf256872a2ae7e95811ae8
BLAKE2b-256 84e9ba195ae4afba8a795d3a100e9d00bf1cd507f02c75f3d5635bd8ef9be7c1

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