原创 IBM雲平臺linux下訓練yolov3,GPU被其他程序佔用,內存不夠導致報錯

超參重新調整後,開始運行程序訓練yolov3,開始以爲是調整程序,修改參數導致的錯誤。但在恢復原參數,還是照樣錯誤,通過對錯誤代碼的解讀,是GPU內存不夠導致。但比較奇怪的是對於IBM雲平臺,只能訓練被指定分配的GPU,被其他人的程序佔用

原创 Python 讀取txt文件(存放圖像路徑的txt文件),末尾存在看不見的回車鍵“\n”,導致cv2.imread()讀取爲NONE

import os import cv2 path = 'C:\Users\kai\Desktop\img1.txt' files = open(path) lines = files.readlines() print(path)

原创 Python YOLOv3 加載預訓練模型對整個圖片文件夾進行預測

加載一次YOLOv3預訓練模型即可用於對圖片預測,而多次加載預訓練模型會導致GPU內存不夠用。   2019-08-18 14:18:37.202250: I tensorflow/core/common_runtime/gpu/gpu_

原创 Python YOLOv3(YOLOv3_TensorFlow-master)predict_add.py (預測圖像文件)移動到其他目錄需要同時複製utils文件夾和model.py文件件

 把預測文件predict_add.py,從YOLOv3_TensorFlow-master文件夾中移動到根目錄下,如果直接執行會出現以下錯誤。 wu@wu-X555LF:~$ python predict_add.py Traceb

原创 Ubuntu Yolov3 訓練新的模型後,加載新模型參數出錯

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shap

原创 Linux YOLOv3 progress.log 執行訓練日誌

 YOLOv3_TensorFlow-master\data\progress.log  訓練日誌 Thu, 01 Aug 2019 19:19:44 INFO Restoring parameters from ./data/dark

原创 TensorFlow 訓練模型保存四個文件

 if mAP > best_mAP:                 best_mAP = mAP                 saver_best.save(sess, args.save_dir + 'best_model_E

原创 Python 把標註文件Annotations.txt按7:2:1數量比例分配給train集,val集,test集,其中單個樣本隨機分配

 先測試把100個數字0-99個,按7:2:1數量比例分配給a集,b集,c集,其中單個樣本隨機分配 import random totalnum = 100 t1 = totalnum*0.1 t2 = totalnum*0.2 t3

原创 python Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

wu@wu-X555LF:~$ python Python 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copy

原创 Python opencv 錯誤代碼:cv2.LINE_AA 'module' object has no attribute 'LINE_AA'

在執行YOLOv3_TensorFlow-master測試,出現如下告警,查出現此處錯誤的腳本的代碼(plot_utils.py),,如下: cv2.LINE_AA 'module' object has no attribute 'LI

原创 Ubuntu卸載cuda10.0

Ubuntu 當初同時按照了 cuda9.0 和 cuda10.0,但因爲是安裝的是雙系統windows10 + Ubuntu16.04,在C盤分割了 40G個給Ubuntu,安裝2個cuda太過佔存儲空間,/dev/sda6 use%已

原创 Linux Cuda - failed call to cuInit: CUDA_ERROR_NO_DEVICE

wu@wu-X555LF:~$ nvidia-smi Sat Jul 27 14:07:04 2019 +----------------------------------------------------------

原创 Ping通外網百度,但是打不開網頁(能登入QQ和微信,但是打不開網頁)

進行如下嘗試: 1、我先是重裝網卡驅動,重啓電腦,故障還是沒有解決。 2、打開CMD(按住WIN+R),輸入netsh winsock reset,然後重啓電腦沒有恢復。 3、Chrome鏈接網頁提示了proxy相關錯誤。 按照要求點開C

原创 Loaded runtime CuDNN library: 7500 (compatibility version 7500) but source was compiled with 7004

wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ python video_test.py ./data/demo_data/video.mp4 2019-07-26 23:20:59.087061: I

原创 CUDA Error: out of memory darknet: ./src/cuda.c:36: check_error: Assertion `0' failed. Aborted

wu@wu-X555LF:~/darknet$ ./darknet detector train cfg/voc.data cfg/yolov3-voc.cfg darknet53.conv.74 yolov3-voc layer