def main():
image = cv2.imread(IMAGE_FILE_PATH)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # conversion to rgb
# create pose estimator
image_size = image.shape
pose_estimator = PoseEstimator(image_size, SESSION_PATH, PROB_MODEL_PATH)
# load model
pose_estimator.initialise()
# estimation
pose_2d, visibility, pose_3d = pose_estimator.estimate(image)
# close model
pose_estimator.close()
# Show 2D and 3D poses
display_results(image, pose_2d, visibility, pose_3d)
评论列表
文章目录