xszyou / Fay

Fay is an open-source digital human framework integrating language models and digital characters. It offers retail, assistant, and agent versions for diverse applications like virtual shopping guides, broadcasters, assistants, waiters, teachers, and voice or text-based mobile assistants.
GNU General Public License v3.0
9k stars 1.77k forks source link

打不开Fay Eyes #61

Open Good0007 opened 1 year ago

Good0007 commented 1 year ago

系统: macos (m1pro) 环境: python 3.10

[14:20:17][系统] YOLO v8正在启动... 127.0.0.1 - - [2023-08-02 14:20:17] "POST /api/control-eyes HTTP/1.1" 200 245 1.363006 Exception in thread Thread-7 (run): Traceback (most recent call last): File "/Users/kangkang/anaconda3/envs/Fay2/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/Users/kangkang/anaconda3/envs/Fay2/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/Users/kangkang/Workspace/MINE/Fay/ai_module/yolov8.py", line 101, in run if res.keypoints is not None and res.keypoints.size(0) > 0: # check if keypoints exist File "/Users/kangkang/anaconda3/envs/Fay2/lib/python3.10/site-packages/ultralytics/utils/init.py", line 136, in getattr raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.doc}") AttributeError: 'Keypoints' object has no attribute 'size'. See valid attributes below.

A class for storing and manipulating detection keypoints.

Args:
    keypoints (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_dets, num_kpts, 2/3).
    orig_shape (tuple): Original image size, in the format (height, width).

Attributes:
    keypoints (torch.Tensor | np.ndarray): A tensor containing the detection keypoints, with shape (num_dets, num_kpts, 2/3).
    orig_shape (tuple): Original image size, in the format (height, width).

Properties:
    xy (list): A list of keypoints (pixels) which includes x, y keypoints of each detection.
    xyn (list): A list of keypoints (normalized) which includes x, y keypoints of each detection.

Methods:
    cpu(): Returns a copy of the keypoints tensor on CPU memory.
    numpy(): Returns a copy of the keypoints tensor as a numpy array.
    cuda(): Returns a copy of the keypoints tensor on GPU memory.
    to(): Returns a copy of the keypoints tensor with the specified device and dtype.
xszyou commented 1 year ago

yolo8使用8.0.104

zh4men9 commented 1 year ago

yolo8使用8.0.104 感谢!

pip install ultralytics==8.0.104

解决了问题