L2Cs-Net
हमारे Serverless Hosted API के माध्यम से gaze detection model L2Cs-Net का उपयोग करें
कोड नमूना
3
मॉडल चलाएँ
import os
import cv2
import numpy as np
import requests
from inference_sdk import InferenceHTTPClient
content = requests.get("https://media.roboflow.com/inference/man.jpg").content
image = cv2.imdecode(np.frombuffer(content, np.uint8), cv2.IMREAD_COLOR)
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
).select_api_v1()
result = client.detect_gazes(image)
for prediction in result[0]["predictions"]:
face = prediction["face"]
yaw = prediction["yaw"]
pitch = prediction["pitch"]
print(f"Face at ({face['x']}, {face['y']}) - yaw: {yaw:.3f}, pitch: {pitch:.3f}")Inference speed
मॉडल
विलंबता (ms)
अंतिम अपडेट
क्या यह उपयोगी था?