We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用Yawcam将本地摄像头推流成网络摄像头
from XEdu.hub import Workflow as wf import cv2 import numpy as np import urllib.request # 初始化手势检测模型 det = wf(task='det_hand') # 实例化检测模型 hand = wf(task='pose_hand21') # 实例化关键点检测模型 url = 'http://127.0.0.1:8888/out.jpg' # Yawcam 的默认 JPEG URL(注意需要确保该 URL 有效) while True: # 从 URL 获取图像数据 img_resp = urllib.request.urlopen(url) img_np = np.array(bytearray(img_resp.read()), dtype=np.uint8) frame = cv2.imdecode(img_np, -1) # 手势检测 bboxs = det.inference(data=frame, thr=0.3) img = frame for i in bboxs: keypoints, img = hand.inference(data=frame, img_type='cv2', bbox=i) # 显示结果 cv2.imshow('video', img) if cv2.waitKey(1) & 0xFF == ord('q'): break cv2.destroyAllWindows()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用Yawcam将本地摄像头推流成网络摄像头
The text was updated successfully, but these errors were encountered: