首页 > 其他 > 详细

imageAI实现目标检测(不用opencv)

时间:2021-06-17 16:48:47      阅读:24      评论:0      收藏:0      [点我收藏+]

参见 https://www.jiqizhixin.com/articles/2018-07-02-7,实践过程中碰到运行错误“找不到libcudart.so.11.0 ”
,这样解决,参考 

【tensorflow】缺少libcudart.so.11.0和libcudnn.so.8解决方法

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda

后来又提示“module ‘keras.utils.generic_utils‘ has no attribute ‘populate_dict_with_module_objects‘”。

在generic_utils.py中增加2个函数:

def to_snake_case(name):
  intermediate = re.sub((.)([A-Z][a-z0-9]+), r\1_\2, name)
  insecure = re.sub(([a-z])([A-Z]), r\1_\2, intermediate).lower()
  # If the class is private the name starts with "_" which is not secure
  # for creating scopes. We prefix the name with "private" in this case.
  if insecure[0] != _:
    return insecure
  return private + insecure

def populate_dict_with_module_objects(target_dict, modules, obj_filter):
  for module in modules:
    for name in dir(module):
      obj = getattr(module, name)
      if obj_filter(obj):
        target_dict[name] = obj

但还是报错:“Version:0.9 StartHTML:0000000105 EndHTML:0000000727 StartFragment:0000000141 EndFragment:0000000691

2021-06-17 14:32:39.658178: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (HP-tangjian): /proc/driver/nvidia/version does not exist

估计电脑没有gpu导致这个错误。

imageAI实现目标检测(不用opencv)

原文:https://www.cnblogs.com/tangxiaosheng/p/14893447.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!