代码拉取完成,页面将自动刷新
同步操作将从 cungudafa/hand-keras-yolo3-recognize 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# -*- coding: utf-8 -*-
import os
from cv2 import cv2
import time
import numpy as np
from sklearn.externals import joblib
from pose_hand import getImgInfo
from yolo import YOLO
from pose.coco import general_coco_model
# coco
modelpath = "model/"
start = time.time()
pose_model = general_coco_model(modelpath) # 1.加载模型
print("[INFO]Pose Model loads time: ", time.time() - start)
# yolo
start = 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)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。