Vertices. 2022-05-18 18:46 采纳率: 0%
浏览 8

手语识别里面pose_hand里的getImageinfo的函数报错,问题可能在model.py里面



```python
Traceback (most recent call last):
  File "E:/github/hand-keras-yolo3-recognize-master/hand-keras-yolo3-recognize-master/pose_hand.py", line 253, in <module>
    getImgInfo(image,pose_model,_yolo,'docs/brave_92_lineimg.jpg')
  File "E:/github/hand-keras-yolo3-recognize-master/hand-keras-yolo3-recognize-master/pose_hand.py", line 153, in getImgInfo
    yololabel = _yolo.getyoloPoints(Image.fromarray(img)) # 2.yolo关键点
  File "E:\github\hand-keras-yolo3-recognize-master\hand-keras-yolo3-recognize-master\yolo.py", line 131, in getyoloPoints
    image_data, [image.size[1], image.size[0]])  # yolo检测结果
  File "E:\github\hand-keras-yolo3-recognize-master\hand-keras-yolo3-recognize-master\yolo.py", line 105, in compute_output
    score_threshold=self.score, iou_threshold=self.iou)
  File "E:\github\hand-keras-yolo3-recognize-master\hand-keras-yolo3-recognize-master\yolo3\model.py", line 213, in yolo_eval
    anchors[anchor_mask[l]], num_classes, input_shape, image_shape)
  File "E:\github\hand-keras-yolo3-recognize-master\hand-keras-yolo3-recognize-master\yolo3\model.py", line 189, in yolo_boxes_and_scores
    anchors, num_classes, input_shape)
  File "E:\github\hand-keras-yolo3-recognize-master\hand-keras-yolo3-recognize-master\yolo3\model.py", line 142, in yolo_head
    grid = K.cast(grid, K.dtype(feats))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\keras\backend\tensorflow_backend.py", line 906, in dtype
    return x.dtype.base_dtype.name
AttributeError: 'numpy.dtype' object has no attribute 'base_dtype'

这是我遇到的问题,难以解决
  • 写回答

1条回答 默认 最新

  • 扫地的小何尚 人工智能领域优质创作者 2022-05-18 18:55
    关注

    我不知道你是直接撸的代码还是使用什么框架, 但是这个问题应该是由于数据转换的问题.
    你需要将numpy.ndarray转换成Tensor, 比如:
    t = np.array(data,np.float32
    t = tf.convert_to_tensor(value=t, np.float32)

    类似这样的, 用tf.convert_to_tensor

    评论

报告相同问题?

问题事件

  • 创建了问题 5月18日

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料