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.0.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.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pekat_vision_sdk-2.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ee1d9413497d15eb1c28913905824bff4882835a0902e4f9a0dade25a75939c0
MD5 b7fbaffc365e8154dae7f875fc8a0304
BLAKE2b-256 d5ce57357aae0c50775ffda9816a18190341ba7ff324572049f86c7bc3e6ab98

See more details on using hashes here.

Provenance

The following attestation bundles were made for pekat_vision_sdk-2.3.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pekat_vision_sdk-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 944d84035884683eb382769b399301d603bd04a25e4a65a7f7f5234b88ef05c0
MD5 434a3fcfaab7888bffb0ceb2d16b33bf
BLAKE2b-256 9444a376cd44d0bcb6fe901b9418038df5b8a7068ea670bbaf47f7dbb5d56c86

See more details on using hashes here.

Provenance

The following attestation bundles were made for pekat_vision_sdk-2.3.0-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