- 博客(9)
- 收藏
- 关注
原创 C++ OpenCV 把一张图藏到另外一张图中(图像加水印)
C++ OpenCV 把一张图藏到另外一张图中(图像加水印)图像的像素值的范围为[0,255],8位2进制表示[00000000,11111111]uchar 无符号8位2进制。采用截取图像A的最后2位(2位只能表示4种可能性),用于藏图像B。涉及到C++的位操作: >> ,<< , & , | 四种操作即可。此时的图像,有2点要求:1、被藏图...
2019-08-24 23:57:50 1491
原创 Python 读取txt文件(存放图像路径的txt文件),末尾存在看不见的回车键“\n”,导致cv2.imread()读取为NONE
import osimport cv2path = 'C:\Users\kai\Desktop\img1.txt'files = open(path)lines = files.readlines()print(path)for line in lines: print(line) print(type(line)) img_ori = cv2.imread...
2019-08-23 21:23:03 692
原创 Python YOLOv3(YOLOv3_TensorFlow-master)predict_add.py (预测图像文件)移动到其他目录需要同时复制utils文件夹和model.py文件件
把预测文件predict_add.py,从YOLOv3_TensorFlow-master文件夹中移动到根目录下,如果直接执行会出现以下错误。wu@wu-X555LF:~$ python predict_add.py Traceback (most recent call last): File "predict_add.py", line 11, in <module>...
2019-08-21 21:00:20 1233
原创 Python YOLOv3 加载预训练模型对整个图片文件夹进行预测
加载一次YOLOv3预训练模型即可用于对图片预测,而多次加载预训练模型会导致GPU内存不够用。2019-08-18 14:18:37.202250: I tensorflow/core/common_runtime/gpu/gpu_device.cc:993] Creating TensorFlow device (/job:localhost/replica:0/task:0/devi...
2019-08-18 14:34:46 3468
原创 Python YOLOv3 查看神经网络结构
下载地址 https://github.com/wizyoung/YOLOv3_TensorFlowPython YOLOv3 查看神经网络架构import tensorflow as tfimport numpy as npreader = tf.train.NewCheckpointReader('./yolov3.ckpt') #tf.train.NewCheckpoint...
2019-08-11 20:24:39 1572
原创 Python tensorflow ValueError: Parent directory of my_test_model doesn't exist, can't save.
import tensorflow as tf w1 = tf.Variable(tf.random_normal(shape=[2]), name='w1') w2 = tf.Variable(tf.random_normal(shape=[5]), name='w2') saver = tf.train.Saver([w1,w2]) sess = tf.Session() ...
2019-08-10 13:20:10 1648
原创 Ubuntu Yolov3 训练新的模型后,加载新模型参数出错InvalidArgumentError: Assign requires shapes of both tensors to match
--class_name_path : 类名文件--restore_path :加载训练完成的模型把这两个文件替换成自己训练的文件夹tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [255] ...
2019-08-06 21:52:05 1128
原创 TensorFlow 训练模型保存四个文件
if mAP > best_mAP: best_mAP = mAP saver_best.save(sess, args.save_dir + 'best_model_Epoch_{}_step_{}_mAP_{:.4f}_loss_{:.4f}_lr_{:.7g}'.format( ...
2019-08-02 19:11:53 3924
原创 Ubuntu YOLOv3 progress.log 执行训练日志
YOLOv3_TensorFlow-master\data\progress.log 训练日志Thu, 01 Aug 2019 19:19:44 INFO Restoring parameters from ./data/darknet_weights/yolov3.ckptThu, 01 Aug 2019 19:20:23 INFO Epoch: 0, global_step: 10...
2019-08-02 08:55:45 316
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人