原创 【ROS】gazebo安裝及其中出現的問題

由於無法訪問外邊的源,所以使用這一行命令無法安裝 curl -sSL http://get.gazebosim.org | sh 解決方法: 找可以找到的源進行安裝 添加源 sudo sh -c 'echo "deb http:

原创 【ROS2】Error:bash: ros2: command not found

ROS2: Error: bash: ros2: command not found問題解決方法 問題 安裝好docker,創建docker,創建package時,提示 ros2:command not found ros2的

原创 python遍歷文件夾下所有文件

for f in glob.glob(os.path.join(faces_folder_path, "*.jpg")):

原创 在pandas dataframe中添加行時設置數據類型

原文鏈接:https://stackoverflow.com/questions/50650850/insert-rows-into-pandas-dataframe-while-maintaini

原创 【faiss】TypeError: in method 'IndexFlat_add', argument 3 of type 'float const *'

code 建立好index後,調用index.add方法,添加數據進index 出現 TypeError: in method ‘IndexFlat_add’, argument 3 of type ‘float const *

原创 【faiss】使用gunicorn進行search和build index時出現錯誤 WORKERTIMEOUT

faiss中的search功能在CPU上支持多線程訪問,GPU不支持,search/add和add/add都不支持 需要自己加鎖 official documentation https://github.com/faceboo

原创 ValueError: If using all scalar values, you must pass an index 【pandas.dataframe.from_dict】

code df2 = pd.DataFrame({'A':a,'B':b}) error: ValueError: If using all scalar values, you must pass an index sol

原创 【python】安全創建新路徑 python create new directory if not exists

import os if not os.path.exists(directory): os.makedirs(directory)

原创 faiss教程【facebook官方文檔】

原文鏈接:https://github.com/facebookresearch/faiss/wiki/Getting-started 官方教程 開始 對於以下內容,我們假設已安裝Fai

原创 [RuntimeError]: Unable to open dlib/shape_predictor_68_face_landmarks.dat --dlib.shape_predictor()

代碼: import dlib predictor = dlib.shape_predictor("/home/lyz/openface-master/demos/web/../../models/dlib/shape_predi

原创 NameError: name 'WINDOW_NORMAL' is not defined

cv2.namedWindow('image:',WINDOW_NORMAL) cv2.resizeWindow('image:',960,540) cv2.imshow('image:',image) 報NameError:

原创 【opencv】cv2.findcontours ValueError: not enough values to unpack (expected 3, got 2)

emmmmm今天遇到很奇怪的事情,以前寫的代碼居然就神奇的不能用了,報這個錯 還以爲是怎麼了,之前都好好地,查了一下發現…是opencv的方法改掉了,findCountours方法被修改爲只返回coutours和hierarch

原创 mobaxterm中文亂碼問題

mobaxterm作爲一個很方便的連接linux的工具,最近使用時卻發生了中文亂碼的問題,下面是這個問題的解決辦法。 首先在命令行中輸入locale查看當前編碼方式 當前是英文編碼,會出現中文亂碼也就不足爲奇。 接下來查看所有的可用

原创 AttributeError: 'str' object has no attribute 'items' (pyinstaller)

更新安裝包 pip install --upgrade setuptools --ignore-installed

原创 tensorflow: CUDA_VISIBLE_DEVICES

場景: 有一臺服務器,服務器上有多塊兒GPU可以供使用,但此時只希望使用第2塊和第4塊GPU,但是我們希望代碼能看到的仍然是有兩塊GPU,分別編號爲0,1,這個時候我們可以使用環境變量CUDA_VISIBLE_DEVICES來解決這個