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
Built Distribution
File details
Details for the file pekat_vision_sdk-2.1.0.tar.gz
.
File metadata
- Download URL: pekat_vision_sdk-2.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c88522ede10e73fbcb6433577d29576d417b68cf972d59758ab2a30b6706cdea |
|
MD5 | 1775d5b35f3e076d6d50173ad2a94d95 |
|
BLAKE2b-256 | c9c29f581b5416ed2c22a7b268e5e99f393003321dac9135c265c13ec465db1f |
File details
Details for the file pekat_vision_sdk-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: pekat_vision_sdk-2.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 232364dd93e5e72dd1bdca4c4310098987304f6cc687eff10a9ac03b3866bbc1 |
|
MD5 | 9a48c3891ac492b0c614ed6fdc89bd69 |
|
BLAKE2b-256 | c40736aeebb7684983d4ff92df28b12b4af3f225bcecdce0d9e6caddb2927a76 |