赞
踩
import os
import cv2
import re
import base64
import requests
AK = 0 #输入你的AK
SK = 0 #输入你的SK
inPath = 0 #输入你分裂视频的图片路劲
aimPath = 0 #输入你想换脸的图像的路劲
outPath = 0 #输入你换完脸图像的保存路径
videoPath = 0 #输入原视频路径
savePath = 0 #输入你想保存结果的路劲和文件名
sum = 1
def resquest(AK,SK):
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id='+AK+'&client_secret='+SK
response = requests.get(host)
if response:
return response.json()['result']
def splitmv(videoPath, svPath):
cap = cv2.VideoCapture(videoPath)
numFrame = 0
while True:
if cap.grab():
flag, frame = cap.retrieve()
if not flag:
continue
els
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。