原创 TF.keras + tfrecord

TF.keras + tfrecord 在工程中,模型常常需要訓練大數據,而大數據的讀取通常不能一次性讀取進內存中,因此需要不斷從數據集中讀取數據並進行處理。在大數據中,這部分的耗時相當可觀,因此可以利用tfrecord進行預先處

原创 gitlab ssh 遇坑記錄

gitlab用着用着某一天突然push不了了, 查看錯誤碼: remote: Git access over HTTP is not allowed fatal: unable to access 'http://git.dmbcdn.

原创 去除圖像中的紅色部分(or 保留) opencv-python

結果: import cv2 import numpy as np imgs = cv2.imread("timg.jpg") image = imgs.copy() images = imgs.copy() print(image

原创 圖像光照校正處理(白平衡)及其速度優化 -opencv+python

先上效果圖,從上到下分別爲 img : 原圖 img1:均值白平衡法 img2: 完美反射 img3: 灰度世界假設 img4: 基於圖像分析的偏色檢測及顏色校正方法 img5: 動態閾值算法 img6: gamma校正 img7: H

原创 tensorflow 混合精度訓練

混合精度是指在訓練期間在模型中同時使用16位和32位浮點類型,以使其運行更快並使用更少的內存。通過將模型的某些部分保持在32位類型中以保持數值穩定性,模型將具有更短的步長時間,並且在評估指標(如準確性)方面同樣可以訓練。可以在現代GPU和

原创 轉載:gRPC 的 C++ 動態線程池源碼分析

轉載:http://senlinzhan.github.io/2017/09/09/grpc-dynamic-thread-pool/ 作者:Senlin 自學記錄用,侵刪,建議到原博客網址學習。   固定線程池   提到線程池,通常說的

原创 tf.Keras 保存爲pb文件

折騰了我幾天,一直搞不定。最後用以下代碼成功保存。 方法一: tensorflow2.0以上版本可以使用 tf.saved_model.save(model, "save_test") model = tf.saved_model.lo

原创 Pyinstaller No module named pkg_resources.py2_warn

我通過降低setuptools版本到 44.0.0 後成功解決問題。 pip install setuptools==44.0.0  參考文獻:https://blog.51cto.com/cfy10/2468597?source=d

原创 pytesseract 使用

安裝:pytesseract sudo pip3 install -U git+https://github.com/madmaze/pytesseract ubuntu報錯: pytesseract.pytesseract.Tesser

原创 darknet 編譯問題及解決方法

/usr/local/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 6 ar

原创 opencv 4.2.0 安裝

按上面步驟完成 https://www.cnblogs.com/chenzhen0530/p/12109868.html 其中出現過問題: 出現gtk錯誤 使用下面cmake指令 cmake -D CMAKE_BUILD_TYPE=RE

原创 OpenCV Error: Assertion failed (samples.cols == var_count && samples.type() == 5)

python 中 opencv加載SVM模型使用,不要使用 cv2.svm_create() svm = cv2.ml.svm_load("xxx.xml") 點贊 收藏 分享 文章舉報

原创 CK數據集分類處理

import os import shutil #七種表情分類 emotions = ["anger", "contempt", "disgust", "fear", "happy", "sadness", "surprise"] p

原创 算法工程師 面試題與解答

題目來源: 作者:xfcherish 鏈接:https://www.nowcoder.com/discuss/65323?type=0&order=0&pos=50&page=1 如果本文有什麼錯誤,歡迎指出,感激不盡!!! <1> 邏輯

原创 C++算法 鏈表專題

第一題:https://www.nowcoder.com/practice/0cff324157a24a7a8de3da7934458e34?tpId=98&tqId=32912&tPage=5&rp=5&ru=/ta/2019test&