L2Cs-Net
L2Cs-Net の視線検出モデルを Serverless Cloud API で使用します
コード例
3
モデルを実行する
import os
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/inference/man.jpg")
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}")推論速度
モデル
レイテンシ(ms)
Inference(セルフホスト)で使用
Workflows での実行モード
参考資料
最終更新
役に立ちましたか?