Skip to main content

A Python module for communication with PEKAT VISION

Project description

PEKAT VISION SDK - Python

A Python module for communication with PEKAT VISION.

Full SDK documentation available here: https://pekat-vision.github.io/pekat-vision-sdk-python

Installation

Type pip install "pekat-vision-sdk" into your terminal.

Installing with pip install "pekat-vision-sdk[opencv]" also installs opencv.

Example

Creating the analyzer

from PekatVisionSDK import Instance

# Start a project locally (host 0.0.0.0 - listen on all interfaces)

p_local = Instance("~/PekatVisionProjects/my_project", port=8100, host="0.0.0.0")

# Connect to an already running project

p_remote = Instance(port=8000, already_running=True)

Sending an image to analyze

import numpy as np

# p = Instance(...)

# Analyze image from disk

result = p.analyze("path_to_image.png", response_type="annotated_image")

# Analyze a numpy image

# image: np.ndarray = ...
result = p.analyze(image)

Accessing the results

# Get the evaluation result (True/False)

flow_result = result.context["result"]

# Decode image bytes and save image on disk

import cv2

if result.image_bytes is not None:
    image = result.get_decoded_image()
    cv2.imwrite("result_with_annotations.png", image)

Stopping a project

# Project must have been started using the SDK
p_local.stop()

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

pekat_vision_sdk-2.3.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

pekat_vision_sdk-2.3.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pekat_vision_sdk-2.3.1.tar.gz.

File metadata

  • Download URL: pekat_vision_sdk-2.3.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pekat_vision_sdk-2.3.1.tar.gz
Algorithm Hash digest
SHA256 b2c240b76bdf81e9cdc0883f2d1babdcd6cc1f17c4b0b8b7eab8b00aa736debf
MD5 8c2c61ca34e4d039e124b20a8217d48c
BLAKE2b-256 01452255c2b8f031cae579799c5013b76c961c6a48fa924b891a1e4d571e489c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pekat_vision_sdk-2.3.1.tar.gz:

Publisher: release.yml on pekat-vision/pekat-vision-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pekat_vision_sdk-2.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pekat_vision_sdk-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8d6be9587cec3a10872bed9f833dd7a8ecec24092058e859d656c94c6ba1f4d
MD5 c09a747339f99071dcba5395ecc3cece
BLAKE2b-256 0742b2d04c0b429b41b62499d0049c872ce865e4bc31bfafd0621895984737c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pekat_vision_sdk-2.3.1-py3-none-any.whl:

Publisher: release.yml on pekat-vision/pekat-vision-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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