Skip to main content

A lightweight, PyTorch-free spatial computing and feature matching library.

Project description

spatialhub

PyPI version Python 3.12+ License GitHub Repo stars

A lightweight computer vision library built around ONNX Runtime.

spatialhub is a personal project that collects useful computer vision models behind a simple and consistent Python API. The focus is on lightweight inference, minimal dependencies, and easy deployment.

Status: Work in progress. The library is actively being developed by a single maintainer. APIs may change, and only a small number of models are currently available.


Why this project?

Many computer vision models are easy to use in research but harder to deploy because of large dependencies and different APIs.

The goal of spatialhub is to provide a simpler alternative by:

  • Using ONNX Runtime for inference.
  • Avoiding a direct PyTorch dependency where possible.
  • Downloading model weights automatically.
  • Providing a consistent interface across different models.
  • Supporting headless environments with opencv-python-headless.

The project is still growing, and the feature set will expand over time.


Available Models

Currently supported:


Planned

Some models and utilities planned for future releases include:

  • Monocular depth estimation
  • Pose estimation
  • Object tracking
  • Point cloud utilities

These are ideas, not promises, and development depends on available time.


Installation

Requires Python 3.12+.

Install from PyPI:

pip install spatialhub

Optional GPU support:

pip install "spatialhub[gpu]"

Quick Start

All models follow a similar API.

from spatialhub import EfficientLoFTR

model = EfficientLoFTR()

result = model.match(
    "image1.jpg",
    "image2.jpg",
    max_dim=1024,
)

result.visualize(
    top_k=50,
    save_path="output.png",
)

Project Goals

  • Simple Python API
  • Lightweight inference
  • Consistent model interfaces
  • Automatic model weight management
  • Easy deployment in scripts, servers, and containers

License

The core spatialhub library is licensed under the Apache 2.0 License.

Model architectures and pretrained weights keep the licenses provided by their original authors. See the documentation for each model for licensing details.

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

spatialhub-0.1.2.tar.gz (253.4 kB view details)

Uploaded Source

Built Distribution

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

spatialhub-0.1.2-py3-none-any.whl (237.4 kB view details)

Uploaded Python 3

File details

Details for the file spatialhub-0.1.2.tar.gz.

File metadata

  • Download URL: spatialhub-0.1.2.tar.gz
  • Upload date:
  • Size: 253.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for spatialhub-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3efe195aa53d4617aabf8c7d7f5cfbd8a41bdc41add6eb7fbc3d7f2a5cdb293a
MD5 1bb99a9ee287ec5a361d7efd9cccce14
BLAKE2b-256 194f88b0fe9befab5ef997155fcf14895691a2b47b2befbf5ad6270365e9f1ec

See more details on using hashes here.

File details

Details for the file spatialhub-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spatialhub-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 237.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for spatialhub-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3fa47b8e6472cb3d50a306a2a2fb494014975af31b6d3521ba1dfefcc6f07e06
MD5 e31cf25b46cdf0841d9de667b6d20bca
BLAKE2b-256 488e95c0a8a2cb517b863c3e8e4163cc0e843d53021bf7d645c85d3675c78a61

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