Skip to main content

No project description provided

Project description

Python-TAWNYAPI

Documentation

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


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 details)

Uploaded Source

Built Distribution

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

tawnyapi-0.2.5-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file tawnyapi-0.2.5.tar.gz.

File metadata

  • Download URL: tawnyapi-0.2.5.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.8.12 Linux/5.4.0-84-generic

File hashes

Hashes for tawnyapi-0.2.5.tar.gz
Algorithm Hash digest
SHA256 a7e29db137ed10c2d2270c5e16c7fe93c83157f55303cd2f1d2d30d9fae5974a
MD5 ef2224704872099a88fbd08f21836686
BLAKE2b-256 d2f41e6f4fa2d7b6274c3a0e5509c428cd13230aba69fb6857c7d9cb8906aacb

See more details on using hashes here.

File details

Details for the file tawnyapi-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: tawnyapi-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.8.12 Linux/5.4.0-84-generic

File hashes

Hashes for tawnyapi-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca22ea794a5ffcb51df1282352945a270b67236f5e677cafa45de071caccd9d
MD5 ab18ef0d784c9fbd36f512a1312f8bbd
BLAKE2b-256 9b748b702f979e3f89ca9ed4cad17dbdbb0baba480445da0e7394cef447be57e

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