
Tensorflow
AI智能
读书小孩
‘路漫漫其修远兮,任重而道远’
展开
-
测试tensorflow gpu环境是否配置成功
import tensorflow as tf with tf.device('/cpu:0'): a = tf.constant([1.0,2.0,3.0],shape=[3],name='a') b = tf.constant([1.0,2.0,3.0],shape=[3],name='b')with tf.device('/gpu:0'): c = a+b ...原创 2020-03-26 16:15:50 · 1121 阅读 · 0 评论 -
SSD Tensorflow API 训练完整笔记
主要针对几个方面: 一、标注数据集(自己用的labelimg,注意事项,有些朋友用的其他的标注软件,但是需要注意标注出来的XML格式和labelimg的XMl可能有区别) 二、数据转换tfrecord...原创 2020-03-22 16:17:56 · 411 阅读 · 0 评论 -
安装zebal飘红ERROR: error loading package '': Encountered error while reading extension file 'android.bz
完整报错:ERROR: /home/hanqing/tensorflow-master/WORKSPACE:92:1: Traceback (most recent call last): File "/home/hanqing/tensorflow-master/WORKSPACE", line 92 check_bazel_version_at_least("1.0.0") Fi...原创 2020-03-20 16:36:20 · 896 阅读 · 0 评论 -
java.lang.IllegalArgumentException: Cannot convert between a TensorFlowLite buffer with 1080000 byte
当运行tflite在android上了报:java.lang.IllegalArgumentException: Cannot convert between a TensorFlowLite buffer with 1080000 bytes and a Java Buffer with 270000 bytes解决修改:TF_OD_API_IS_QUANTIZED...原创 2020-03-16 09:16:43 · 1114 阅读 · 4 评论 -
SSD训练数据tfrecords数据产生bug
训练数据tfrecords产生的问题:INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, All bounding box coordinates must be in [0.0, 1.0]: 1...原创 2020-03-12 14:39:27 · 543 阅读 · 0 评论 -
yolo3 pb或者各种pb模型转换tflite,并量化
#建议使用ubuntu系统,tf好像在windows缺失tflite功能#依赖:tansoeflow-gpu>=1.14.0(我的是1.14.0)import tensorflow as tf#获取需要转换模型路径path="/home/hanqing/models-master/research/object_detection/mode1/saved_model.pb" ...原创 2019-12-19 11:15:16 · 2670 阅读 · 12 评论 -
深度学习中Map的概念
mAP定义及相关概念Pprecision,即 准确率 。解释:10张图片,每张都有狗、猫,识别到里面有狗也有猫,两者皆有,准确率就高Rrecall,即 召回率 。解释:10张图片,每张都有狗、猫,识别到有狗,召回率就高mAP: mean Average Precision, 即各类别AP的平均值 AP: PR曲线下面积,后文会详细讲解 PR曲线: Precision...原创 2019-11-21 19:03:42 · 4014 阅读 · 3 评论 -
ValueError: not enough values to unpack (expected 2, got 0)
在跑Map文件main的时候报ValueError: not enough values to unpack (expected 2, got 0)经排查原因是predicted文件夹下的txt文件为空,主要原因是iou的问题,在运行evaluate.py时,没有写入成功,由于iou过大,导致识别低iou被排除了解决: 在config.py中修改(调小点):...原创 2019-11-21 18:21:59 · 2310 阅读 · 0 评论 -
yolo3报:could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM
找到Session在config=修改解决:gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.1)with tf.Session(config=tf.ConfigProto(gpu_options=gpu_options)) as sess:原创 2019-11-20 17:28:59 · 396 阅读 · 1 评论 -
InternalError: Blas GEMM launch failed : a.shape=(100, 784), b.shape=(784, 10), m=100, n=10...解决方法
环境windows10、tensorflow-gpu1.9.0、keras2.2.0、cuda9.0、cudnn7、显卡2080Ti报错:InternalError: Blas GEMM launch failed : a.shape=(100, 784), b.shape=(784, 10), m=100, n=10...我的先说段废话,我看了两天博客试遍了博客几乎所有方法,我的头很痛,...原创 2019-10-20 15:23:12 · 6683 阅读 · 15 评论 -
Windows下查看GPU(NVIDIA)使用情况
找到C:\Program Files\NVIDIA Corporation\NVSMI中的nvidia-smi.exe打开cmd,拉进去确定(启动)原创 2019-10-18 16:58:50 · 789 阅读 · 0 评论 -
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version
报错:FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_quint8 = np.dtype([("quint8", np...原创 2019-10-18 16:28:27 · 188 阅读 · 0 评论 -
ModuleNotFoundError: No module named 'pycocotools'
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI原创 2019-10-11 17:31:07 · 720 阅读 · 0 评论 -
OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ens
下载GraphViz下载地址:https://graphviz.gitlab.io/_pages/Download/Download_windows.htmlwindows 下,下载后缀名:.msi的版本点击安装找到安装路径:C:\Program Files (x86)\Graphviz2.38\bin复制粘贴配置环境变量win+e点击右键我的电脑,高级系统设置等等配置环境变量...原创 2019-07-25 19:20:04 · 181 阅读 · 0 评论 -
opencv怎样将视频人脸修改后放回视频中
首先我们进行:返回结果的类型查看gray = cv2.cvtColor(frame, cv2.IMREAD_COLOR) print(type(gray))一、视频开始返回结果<class 'numpy.ndarray'>#numpy对象二、判断修改后返回的结果print(type(pil_image)) #<class 'PIL...原创 2019-08-02 16:24:54 · 406 阅读 · 0 评论 -
error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale‘
关于报错:error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale’#请勿别检查cascade文件路径是否在相应的目录下face_cascade = cv2.CascadeClassifier(r'E:\ceshi_xiangmu\ceshi_ai\cnn\haarc...原创 2019-07-24 17:21:53 · 22066 阅读 · 14 评论 -
TensorFlow在pycharm安装过程和报错解决
第一个问题CUDA+cudnn的安装安装完后,然后配置环境变量,如何安装百度我的python是3.5版本,TensorFlow对应是CUDA+cudnn,其他版本自行百度,知道问题所在就好报错:AttributeError: module ‘tensorboard’ has no attribute 'lazy’解决:pip uninstall tensorboard#卸载重装pip ...原创 2019-07-18 19:21:14 · 1433 阅读 · 0 评论 -
用python创建图灵聊天机器人
import requestsimport itchat#图灵机器人def tuling(text):url=‘http://www.tuling123.com/openapi/api’data={‘key’:‘复制粘贴处’,‘info’:text,‘userid’:‘随便写个名字:冬冬’}html=requests.post(url=url,data=data).json()...原创 2018-11-29 18:40:05 · 944 阅读 · 0 评论