28 Star 128 Fork 25

cungudafa / hand-keras-yolo3-recognize

Clone or download
predict_beyes.py
Copy Edit Web IDE Raw Normal History
cungudafa   sign 2020-08-08
# -*- coding: utf-8 -*-import osfrom cv2 import cv2import timeimport numpy as npfrom sklearn.externals import joblibfrom pose_hand import getImgInfofrom yolo import YOLOfrom pose.coco import general_coco_model# cocomodelpath = "model/"start = time.time()pose_model = general_coco_model(modelpath)  # 1.加载模型print("[INFO]Pose Model loads time: ", time.time() - start)# yolostart = time.time()_yolo = YOLO()  # 1.加载模型print("[INFO]yolo Model loads time: ", time.time() - start)path = "D:/myworkspace/JupyterNotebook/hand-keras-yolo3-recognize/docs/wangyu_hand_img/"X_test = [path+"movehouse_37.jpg",path+"movehouse_65.jpg"]# 测试集XX_test = []for i in X_test:    image = cv2.imread(i)      hist,_ = getImgInfo(image, pose_model, _yolo)    XX_test.append(hist)clf = joblib.load("model/train_model.pkl")predictions_labels = clf.predict(XX_test)# 使用测试集预测结果print(u'预测结果:')print(predictions_labels)
Python
1
https://gitee.com/cungudafa/hand-keras-yolo3-recognize.git
git@gitee.com:cungudafa/hand-keras-yolo3-recognize.git
cungudafa
hand-keras-yolo3-recognize
hand-keras-yolo3-recognize
master

Search

152606 8668e384 1899542 133635 2cd7d36e 1899542