No project description provided
Project description
Python-TAWNYAPI
Documentation
- Find documentation under docs.tawny.ai
- More information about tawny.ai under info@tawny.ai
Simple Example with OpenCV
import cv2
from tawnyapi.vision.client import TawnyVisionApiClient
from tawnyapi.vision import apitypes
VIDEO_PATH = "<PATH TO YOUR VIDEO FILE>"
API_KEY = "<YOUR TAWNY API KEY>"
client = TawnyVisionApiClient(api_key=API_KEY)
cap = cv2.VideoCapture(VIDEO_PATH)
while True:
ret, frame = cap.read()
if not ret:
break
# Analyzing images already in memory:
result = client.analyze_images(
images=[frame],
max_results=1,
resize=None,
features=[
apitypes.ImageAnnotationFeatures.FACE_DETECTION,
apitypes.ImageAnnotationFeatures.FACE_EMOTION,
apitypes.ImageAnnotationFeatures.FACE_DESCRIPTOR,
apitypes.ImageAnnotationFeatures.HEAD_POSE,
apitypes.ImageAnnotationFeatures.FACE_LANDMARKS,
apitypes.ImageAnnotationFeatures.ATTENTION,
apitypes.ImageAnnotationFeatures.POSE
])
print(result)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tawnyapi-0.2.5.tar.gz
(7.6 kB
view hashes)