first commit
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
BIN
FaceUnlock.icns
Executable file
BIN
FaceUnlock.icns
Executable file
Binary file not shown.
9
__main__.py
Executable file
9
__main__.py
Executable file
@@ -0,0 +1,9 @@
|
||||
import numpy.core.multiarray
|
||||
from app import Application
|
||||
|
||||
def start():
|
||||
Application().run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
start()
|
||||
|
||||
1
app/.pydio
Normal file
1
app/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
d1ce8940-3c26-4908-a8e0-6e67719d4585
|
||||
131
app/__init__.py
Executable file
131
app/__init__.py
Executable file
@@ -0,0 +1,131 @@
|
||||
import multiprocessing
|
||||
import cv2 as cv
|
||||
from multiprocessing import Process, Queue
|
||||
from app.lib.face.facepp import API, File
|
||||
from app.util.system_api import ge_device_info, lock_screen, unlock, sudo
|
||||
from app.config import Config
|
||||
from os import path, remove
|
||||
|
||||
class Application:
|
||||
|
||||
def __init__(self):
|
||||
|
||||
# 保存当前锁屏状态
|
||||
Config.is_locked = ge_device_info().get('CGSSessionScreenIsLocked', False)
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
|
||||
mydict = multiprocessing.Manager().dict()
|
||||
mydict['get_pic'] = 'true'
|
||||
|
||||
frame = Queue()
|
||||
|
||||
# 启动摄像头
|
||||
camera_frame = Process(
|
||||
target=self.OpenCamera,
|
||||
args=("摄像头", frame, mydict)
|
||||
)
|
||||
|
||||
|
||||
# 实时图片处理
|
||||
img_frame = Process(
|
||||
target=self.ProcessingPictures,
|
||||
args=("处理图片", frame, mydict)
|
||||
)
|
||||
|
||||
camera_frame.start()
|
||||
img_frame.start()
|
||||
|
||||
camera_frame.join()
|
||||
img_frame.join()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("任务被终止了")
|
||||
|
||||
|
||||
# 打开摄像头捕捉图片
|
||||
def OpenCamera(self, task_name, queue, mydict):
|
||||
|
||||
# 初始化状态,不进行图像传输
|
||||
mydict["get_pic"] = "true"
|
||||
|
||||
capture = cv.VideoCapture(0)
|
||||
print(task_name + "任务启动..")
|
||||
|
||||
try:
|
||||
while True:
|
||||
# 一帧一帧读取视频
|
||||
ret, frame = capture.read()
|
||||
if mydict["get_pic"] == "true":
|
||||
mydict["get_pic"] = "false"
|
||||
queue.put(frame)
|
||||
|
||||
# cv.imshow('capture', frame)
|
||||
# cv.namedWindow("摄像头", 0)
|
||||
# cv.resizeWindow("capture", 0, 0)
|
||||
# cv.imshow('capture', frame)
|
||||
cv.waitKey(1)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
capture.release()
|
||||
print(task_name + "任务关闭...")
|
||||
|
||||
# 处理图片,face++人脸对比
|
||||
def ProcessingPictures(self, task_name, queue, mydict):
|
||||
print(task_name + "任务启动")
|
||||
try:
|
||||
while True:
|
||||
|
||||
# 从队列中获取图片,显示图像质量
|
||||
mydict["get_pic"] = "true"
|
||||
|
||||
frame = queue.get()
|
||||
|
||||
cv.imwrite(self.PicPath("current_user.jpg"), frame)
|
||||
|
||||
compare_res = Config.faceApi.compare(
|
||||
image_file1=File(self.PicPath("administrators.jpg")),
|
||||
image_file2=File(self.PicPath("current_user.jpg"))
|
||||
)
|
||||
|
||||
if ('confidence' in compare_res):
|
||||
print("捕捉的摄像头人物相似度:", compare_res['confidence'])
|
||||
# 如果是锁屏状态
|
||||
if Config.is_locked:
|
||||
# 如果是管理员
|
||||
if compare_res['confidence'] > 50.0:
|
||||
print("锁屏状态下,是管理员,所以需要进行解锁....")
|
||||
Config.is_locked = False
|
||||
# sudo("say '欢迎,正在自动解锁中!'")
|
||||
unlock()
|
||||
else:
|
||||
sudo("say '不是管理员,无法解锁!'")
|
||||
else:
|
||||
if compare_res['confidence'] > 50.0:
|
||||
print("非锁屏状态下,是管理员,无需操作....")
|
||||
else:
|
||||
sudo("say '不是管理员,即将锁屏!'")
|
||||
Config.is_locked = True
|
||||
lock_screen()
|
||||
|
||||
|
||||
# 摄像头前没有检测到人的时候,进行锁屏
|
||||
else:
|
||||
if Config.is_first_count == 1:
|
||||
print("是第一次运行,什么都不操作")
|
||||
Config.is_first_count+=1
|
||||
else:
|
||||
print("不是第一次运行,屏幕前还没有人,进行锁屏")
|
||||
# remove(self.PicPath("current_user.jpg"))
|
||||
Config.is_locked = True
|
||||
lock_screen()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
# remove(self.PicPath("current_user.jpg"))
|
||||
print(task_name + "任务被终止")
|
||||
|
||||
|
||||
def PicPath(self, fileName):
|
||||
parent = path.abspath(path.dirname(path.realpath(__file__)) + path.sep + 'res/img/'+fileName);
|
||||
return parent
|
||||
1
app/config/.pydio
Normal file
1
app/config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
dfe42562-cb6b-402e-82ac-fb51d7405e86
|
||||
35
app/config/__init__.py
Executable file
35
app/config/__init__.py
Executable file
@@ -0,0 +1,35 @@
|
||||
from app.lib.face.facepp import API, File
|
||||
|
||||
class Config:
|
||||
# 管理员头像地址,需要替换成你自己的头像
|
||||
administrators = "./res/img/administrators.jpg"
|
||||
|
||||
# 摄像头实时捕获的截图存放地址
|
||||
current_user = "./res/img/current_user.jpg"
|
||||
|
||||
# face++ api 初始化
|
||||
faceApi = API()
|
||||
|
||||
# 是否处于锁屏状态,False 解锁状态下,True 锁屏状态下
|
||||
is_locked = False
|
||||
|
||||
# 电脑锁屏密码
|
||||
password = "<??>"
|
||||
|
||||
# 是否是第一次运行,False 是 不锁屏,true 不是 进行锁屏
|
||||
is_first_count = 1
|
||||
|
||||
# pyobjc-framework-Quartz 获取到的状态
|
||||
cg_session_info = None
|
||||
|
||||
author = 'bmy'
|
||||
app_name = 'FaceUnlock'
|
||||
app_env = '%s_ENV' % app_name.upper()
|
||||
version = '1.3.3'
|
||||
github_page = 'https://github.com/%s/%s' % (author, app_name)
|
||||
releases_url = '%s/releases' % github_page
|
||||
protector = '[protector]'
|
||||
idle_time = 30
|
||||
idle_time_short = 2
|
||||
unlock_count_limit = 3
|
||||
restart_deadline = 0.2
|
||||
1
app/config/__pycache__/.pydio
Normal file
1
app/config/__pycache__/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
b58309fb-3b74-40b9-85b4-556969e2a95e
|
||||
BIN
app/config/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
app/config/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/config/__pycache__/__init__.cpython-38.pyc
Executable file
BIN
app/config/__pycache__/__init__.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/config/__pycache__/__init__.cpython-39.pyc
Executable file
BIN
app/config/__pycache__/__init__.cpython-39.pyc
Executable file
Binary file not shown.
1
app/lib/.pydio
Normal file
1
app/lib/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
477a6769-a4e6-472a-8363-e0c226835938
|
||||
0
app/lib/__init__.py
Executable file
0
app/lib/__init__.py
Executable file
1
app/lib/__pycache__/.pydio
Normal file
1
app/lib/__pycache__/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
73b7d0b2-a0f6-4894-8971-b4650a01063f
|
||||
BIN
app/lib/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
app/lib/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/lib/__pycache__/__init__.cpython-38.pyc
Executable file
BIN
app/lib/__pycache__/__init__.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/lib/__pycache__/__init__.cpython-39.pyc
Executable file
BIN
app/lib/__pycache__/__init__.cpython-39.pyc
Executable file
Binary file not shown.
1
app/lib/face/.pydio
Normal file
1
app/lib/face/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
af6921d2-187d-4cc8-b5eb-2db957efd2f6
|
||||
125
app/lib/face/ImagePro.py
Executable file
125
app/lib/face/ImagePro.py
Executable file
@@ -0,0 +1,125 @@
|
||||
import base64
|
||||
import io
|
||||
import os
|
||||
from PIL import Image, ImageColor
|
||||
|
||||
|
||||
class ImageProCls:
|
||||
base64FilePath=None
|
||||
|
||||
@staticmethod
|
||||
def humanbody_blending_with_image(input_image, gray_image, bg_image):
|
||||
"""
|
||||
|
||||
:param input_image: the PIL.Image instance, the source humanbody image
|
||||
:param gray_image: the PIL.Image instance, it is created from api base64 result, a gray image
|
||||
:param bg_image: the PIL.Image instance, the background image you want to replace
|
||||
:return: the PIL.Image instance is blending with humanbody
|
||||
|
||||
notes: you should close the return object after you leave
|
||||
"""
|
||||
input_width, input_height = input_image.size
|
||||
bg_width, bg_height = bg_image.size
|
||||
|
||||
input_aspect_ratio = input_width / float(input_height)
|
||||
bg_aspect_ratio = bg_width / float(bg_height)
|
||||
|
||||
if bg_aspect_ratio > input_aspect_ratio:
|
||||
target_width, target_height = int(bg_height * input_aspect_ratio), bg_height
|
||||
else:
|
||||
target_width, target_height = bg_width, int(bg_width / input_aspect_ratio)
|
||||
|
||||
crop_image = bg_image.crop((0, 0, 0+target_width, 0+target_height))
|
||||
new_image = crop_image.resize((input_width, input_height))
|
||||
crop_image.close()
|
||||
|
||||
for x in range(0, input_width):
|
||||
for y in range(0, input_height):
|
||||
coord = (x, y)
|
||||
gray_pixel_value = gray_image.getpixel(coord)
|
||||
input_rgb_color = input_image.getpixel(coord)
|
||||
bg_rgb_color = new_image.getpixel(coord)
|
||||
|
||||
confidence = gray_pixel_value / 255.0
|
||||
alpha = confidence
|
||||
|
||||
R = input_rgb_color[0] * alpha + bg_rgb_color[0] * (1 - alpha)
|
||||
G = input_rgb_color[1] * alpha + bg_rgb_color[1] * (1 - alpha)
|
||||
B = input_rgb_color[2] * alpha + bg_rgb_color[2] * (1 - alpha)
|
||||
|
||||
R = max(0, min(int(R), 255))
|
||||
G = max(0, min(int(G), 255))
|
||||
B = max(0, min(int(B), 255))
|
||||
|
||||
new_image.putpixel(coord, (R, G, B))
|
||||
|
||||
return new_image
|
||||
|
||||
@staticmethod
|
||||
def humanbody_blending_with_color(input_image, gray_image, bg_color):
|
||||
"""
|
||||
:param input_image: the PIL.Image instance
|
||||
:param gray_image: the PIL.Image instance, it is created from api base64 result, it is a gray image
|
||||
:param bg_color: a color string value, such as '#FFFFFF'
|
||||
:return: PIL.Image instance
|
||||
|
||||
notes: you should close the return object after you leave
|
||||
"""
|
||||
input_width, input_height = input_image.size
|
||||
bg_rgb_color = ImageColor.getrgb(bg_color)
|
||||
|
||||
new_image = Image.new("RGB", input_image.size, bg_color)
|
||||
|
||||
for x in range(0, input_width):
|
||||
for y in range(0, input_height):
|
||||
coord = (x, y)
|
||||
gray_pixel_value = gray_image.getpixel(coord)
|
||||
input_rgb_color = input_image.getpixel(coord)
|
||||
|
||||
confidence = gray_pixel_value / 255.0
|
||||
alpha = confidence
|
||||
|
||||
R = input_rgb_color[0] * alpha + bg_rgb_color[0] * (1 - alpha)
|
||||
G = input_rgb_color[1] * alpha + bg_rgb_color[1] * (1 - alpha)
|
||||
B = input_rgb_color[2] * alpha + bg_rgb_color[2] * (1 - alpha)
|
||||
|
||||
R = max(0, min(int(R), 255))
|
||||
G = max(0, min(int(G), 255))
|
||||
B = max(0, min(int(B), 255))
|
||||
|
||||
new_image.putpixel(coord, (R, G, B))
|
||||
|
||||
return new_image
|
||||
|
||||
@staticmethod
|
||||
def getSegmentImg(filePath):
|
||||
input_file = ''
|
||||
with open(filePath, 'r') as f:
|
||||
input_file = f.read()
|
||||
input_file = base64.b64decode(input_file)
|
||||
|
||||
gray_image = Image.open(io.BytesIO(input_file))
|
||||
input_image = Image.open('./imgResource/segment.jpg', 'r')
|
||||
|
||||
new_image = ImageProCls.humanbody_blending_with_color(input_image, gray_image, '#FFFFFF')
|
||||
new_image.save('./imgResource/resultImg.jpg')
|
||||
print('-' * 60)
|
||||
print('结果已经生成,生成文件名:resultImg.jpg,请在imgResource/目录下查看')
|
||||
if os.path.exists(filePath):
|
||||
os.remove(filePath)
|
||||
f.close()
|
||||
new_image.close()
|
||||
input_image.close()
|
||||
gray_image.close()
|
||||
|
||||
@staticmethod
|
||||
def getMergeImg(base64Str):
|
||||
imgdata = base64.b64decode(base64Str)
|
||||
file = open('./imgResource/MergeResultImg.jpg', 'wb')
|
||||
file.write(imgdata)
|
||||
file.close()
|
||||
print('结果已经生成,生成文件名:MergeResultImg.jpg,请在imgResource/目录下查看')
|
||||
|
||||
|
||||
|
||||
|
||||
0
app/lib/face/__init__.py
Executable file
0
app/lib/face/__init__.py
Executable file
1
app/lib/face/__pycache__/.pydio
Normal file
1
app/lib/face/__pycache__/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
2cd2cff3-ad8d-41e2-a0a8-ef9e540f2339
|
||||
BIN
app/lib/face/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
app/lib/face/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/lib/face/__pycache__/__init__.cpython-38.pyc
Executable file
BIN
app/lib/face/__pycache__/__init__.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/__init__.cpython-39.pyc
Executable file
BIN
app/lib/face/__pycache__/__init__.cpython-39.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/compat.cpython-311.pyc
Normal file
BIN
app/lib/face/__pycache__/compat.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/lib/face/__pycache__/compat.cpython-38.pyc
Executable file
BIN
app/lib/face/__pycache__/compat.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/compat.cpython-39.pyc
Executable file
BIN
app/lib/face/__pycache__/compat.cpython-39.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/facepp.cpython-311.pyc
Normal file
BIN
app/lib/face/__pycache__/facepp.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/lib/face/__pycache__/facepp.cpython-38.pyc
Executable file
BIN
app/lib/face/__pycache__/facepp.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/facepp.cpython-39.pyc
Executable file
BIN
app/lib/face/__pycache__/facepp.cpython-39.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/structures.cpython-311.pyc
Normal file
BIN
app/lib/face/__pycache__/structures.cpython-311.pyc
Normal file
Binary file not shown.
BIN
app/lib/face/__pycache__/structures.cpython-38.pyc
Executable file
BIN
app/lib/face/__pycache__/structures.cpython-38.pyc
Executable file
Binary file not shown.
BIN
app/lib/face/__pycache__/structures.cpython-39.pyc
Executable file
BIN
app/lib/face/__pycache__/structures.cpython-39.pyc
Executable file
Binary file not shown.
64
app/lib/face/compat.py
Executable file
64
app/lib/face/compat.py
Executable file
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
This module handles import compatibility issues between Python 2 and
|
||||
Python 3.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import random
|
||||
import string
|
||||
|
||||
# -------
|
||||
# Pythons
|
||||
# -------
|
||||
|
||||
# Syntax sugar.
|
||||
_ver = sys.version_info
|
||||
|
||||
#: Python 2.x?
|
||||
is_py2 = (_ver[0] == 2)
|
||||
|
||||
#: Python 3.x?
|
||||
is_py3 = (_ver[0] == 3)
|
||||
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
# ---------
|
||||
# Specifics
|
||||
# ---------
|
||||
|
||||
if is_py2:
|
||||
from urllib2 import Request, urlopen, HTTPError, URLError
|
||||
builtin_str = str
|
||||
bytes = str
|
||||
str = unicode
|
||||
basestring = basestring
|
||||
numeric_types = (int, long, float)
|
||||
integer_types = (int, long)
|
||||
|
||||
elif is_py3:
|
||||
from urllib.request import Request, urlopen
|
||||
from urllib.error import HTTPError, URLError
|
||||
builtin_str = str
|
||||
str = str
|
||||
bytes = bytes
|
||||
basestring = (str, bytes)
|
||||
numeric_types = (int, float)
|
||||
integer_types = (int,)
|
||||
|
||||
|
||||
def enc(x):
|
||||
if isinstance(x, str):
|
||||
return x.encode('utf-8')
|
||||
elif isinstance(x, numeric_types):
|
||||
return str(x).encode('utf-8')
|
||||
return x
|
||||
|
||||
|
||||
def choose_boundary():
|
||||
rand_letters = ''.join(random.sample(string.ascii_letters+string.digits, 15))
|
||||
return '{ch}{flag}{rand}'.format(ch='-'*6, flag='PylibFormBoundary', rand=rand_letters)
|
||||
320
app/lib/face/facepp.py
Executable file
320
app/lib/face/facepp.py
Executable file
@@ -0,0 +1,320 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""a simple facepp sdk
|
||||
usage:
|
||||
api = API(key, secret)
|
||||
api.detect(img = File('/tmp/test.jpg'))
|
||||
"""
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import json
|
||||
import os.path
|
||||
import itertools
|
||||
import mimetypes
|
||||
import time
|
||||
from collections.abc import Iterable
|
||||
from app.lib.face.structures import ObjectDict
|
||||
from app.lib.face.compat import (basestring, str, numeric_types, enc, choose_boundary,
|
||||
Request, urlopen, HTTPError, URLError)
|
||||
|
||||
import ssl
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
|
||||
__all__ = ['File', 'APIError', 'API']
|
||||
|
||||
DEBUG_LEVEL = 1
|
||||
|
||||
# 添加API Key API Secret
|
||||
API_KEY = "xfXREfL_pXgnqK2GedOunNPN2MFYSsPR"
|
||||
API_SECRET = "x0PGyvHoVSjX19KlkjH1Ct7Md5wxz8aV"
|
||||
|
||||
|
||||
class File(object):
|
||||
|
||||
"""an object representing a local file"""
|
||||
path = None
|
||||
content = None
|
||||
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
self._get_content()
|
||||
|
||||
def _get_content(self):
|
||||
"""read image content"""
|
||||
|
||||
if os.path.getsize(self.path) > 2 * 1024 * 1024:
|
||||
raise APIError(-1, None, 'image file size too large')
|
||||
else:
|
||||
with open(self.path, 'rb') as f:
|
||||
self.content = f.read()
|
||||
|
||||
def get_filename(self):
|
||||
return os.path.basename(self.path)
|
||||
|
||||
|
||||
class APIError(Exception):
|
||||
code = None
|
||||
"""HTTP status code"""
|
||||
|
||||
url = None
|
||||
"""request URL"""
|
||||
|
||||
body = None
|
||||
"""server response body; or detailed error information"""
|
||||
|
||||
def __init__(self, code, url, body):
|
||||
self.code = code
|
||||
self.url = url
|
||||
self.body = body
|
||||
|
||||
def __str__(self):
|
||||
return 'code={s.code}\nurl={s.url}\n{s.body}'.format(s=self)
|
||||
|
||||
__repr__ = __str__
|
||||
|
||||
|
||||
class API(object):
|
||||
key = None
|
||||
secret = None
|
||||
server = 'https://api-cn.faceplusplus.com'
|
||||
|
||||
decode_result = True
|
||||
timeout = None
|
||||
max_retries = None
|
||||
retry_delay = None
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
:param srv: The API server address
|
||||
:param decode_result: whether to json_decode the result
|
||||
:param timeout: HTTP request timeout in seconds
|
||||
:param max_retries: maximal number of retries after catching URL error
|
||||
or socket error
|
||||
:param retry_delay: time to sleep before retrying
|
||||
"""
|
||||
if len(API_KEY)==0 or len(API_SECRET)==0:
|
||||
print('\n'+'请在'+os.path.realpath(__file__)+'文件中填写正确的API_KEY和API_SECRET'+'\n')
|
||||
exit(1)
|
||||
|
||||
self.key = API_KEY
|
||||
self.secret = API_SECRET
|
||||
|
||||
srv = None
|
||||
decode_result = True
|
||||
timeout = 30
|
||||
max_retries = 10
|
||||
retry_delay = 5
|
||||
if srv:
|
||||
self.server = srv
|
||||
self.decode_result = decode_result
|
||||
assert timeout >= 0 or timeout is None
|
||||
assert max_retries >= 0
|
||||
self.timeout = timeout
|
||||
self.max_retries = max_retries
|
||||
self.retry_delay = retry_delay
|
||||
|
||||
_setup_apiobj(self, self, '', [])
|
||||
|
||||
def update_request(self, request):
|
||||
"""overwrite this function to update the request before sending it to
|
||||
server"""
|
||||
pass
|
||||
|
||||
|
||||
def _setup_apiobj(self, api, prefix, path):
|
||||
if self is not api:
|
||||
self._api = api
|
||||
self._urlbase = '{server}/{prefix}/{path}'.format(server=api.server, prefix=prefix, path='/'.join(path))
|
||||
|
||||
lvl = len(path)
|
||||
done = set()
|
||||
for prefix, paths in _APIS:
|
||||
for i in paths:
|
||||
if len(i) <= lvl:
|
||||
continue
|
||||
cur = i[lvl]
|
||||
if i[:lvl] == path and cur not in done:
|
||||
done.add(cur)
|
||||
setattr(self, cur, _APIProxy(api, prefix, i[:lvl + 1]))
|
||||
|
||||
|
||||
class _APIProxy(object):
|
||||
_api = None
|
||||
"""underlying :class:`API` object"""
|
||||
|
||||
_urlbase = None
|
||||
|
||||
def __init__(self, api, prefix, path):
|
||||
_setup_apiobj(self, api, prefix, path)
|
||||
|
||||
def __call__(self, *args, **kargs):
|
||||
if len(args):
|
||||
raise TypeError('Only keyword arguments are allowed')
|
||||
form = _MultiPartForm()
|
||||
|
||||
for (k, v) in kargs.items():
|
||||
if isinstance(v, File):
|
||||
form.add_file(k, v.get_filename(), v.content)
|
||||
|
||||
url = self._urlbase
|
||||
for k, v in self._mkarg(kargs).items():
|
||||
form.add_field(k, v)
|
||||
|
||||
body = form.bytes
|
||||
request = Request(url, data=body)
|
||||
request.add_header('Content-type', form.get_content_type())
|
||||
request.add_header('Content-length', str(len(body)))
|
||||
|
||||
self._api.update_request(request)
|
||||
|
||||
retry = self._api.max_retries
|
||||
while True:
|
||||
retry -= 1
|
||||
try:
|
||||
ret = urlopen(request, timeout=self._api.timeout).read()
|
||||
break
|
||||
except HTTPError as e:
|
||||
raise APIError(e.code, url, e.read())
|
||||
except (socket.error, URLError) as e:
|
||||
if retry < 0:
|
||||
raise e
|
||||
_print_debug('caught error: {}; retrying'.format(e))
|
||||
time.sleep(self._api.retry_delay)
|
||||
|
||||
if self._api.decode_result:
|
||||
try:
|
||||
ret = json.loads(ret, object_hook=ObjectDict)
|
||||
except:
|
||||
raise APIError(-1, url, 'json decode error, value={0!r}'.format(ret))
|
||||
return ret
|
||||
|
||||
def _mkarg(self, kargs):
|
||||
"""change the argument list (encode value, add api key/secret)
|
||||
:return: the new argument list"""
|
||||
|
||||
kargs = kargs.copy()
|
||||
kargs['api_key'] = self._api.key
|
||||
kargs['api_secret'] = self._api.secret
|
||||
for k, v in list(kargs.items()):
|
||||
if isinstance(v, Iterable) and not isinstance(v, basestring):
|
||||
kargs[k] = ','.join(v)
|
||||
elif isinstance(v, File) or v is None:
|
||||
del kargs[k]
|
||||
elif isinstance(v, numeric_types):
|
||||
kargs[k] = str(v)
|
||||
else:
|
||||
kargs[k] = v
|
||||
|
||||
return kargs
|
||||
|
||||
|
||||
class _MultiPartForm(object):
|
||||
|
||||
"""Accumulate the data to be used when posting a form."""
|
||||
|
||||
def __init__(self):
|
||||
self.form_fields = []
|
||||
self.files = []
|
||||
self.boundary = choose_boundary()
|
||||
|
||||
def get_content_type(self):
|
||||
return 'multipart/form-data; boundary={}'.format(self.boundary)
|
||||
|
||||
def add_field(self, name, value):
|
||||
"""Add a simple field to the form data."""
|
||||
self.form_fields.append((name, value))
|
||||
|
||||
def add_file(self, fieldname, filename, content, mimetype=None):
|
||||
"""Add a file to be uploaded."""
|
||||
if mimetype is None:
|
||||
mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
|
||||
self.files.append((fieldname, filename, mimetype, content))
|
||||
|
||||
@property
|
||||
def bytes(self):
|
||||
"""Return a string(2.x) or bytes(3.x) representing the form data, including attached files."""
|
||||
# Build a list of lists, each containing "lines" of the
|
||||
# request. Each part is separated by a boundary string.
|
||||
# Once the list is built, return a string where each
|
||||
# line is separated by '\r\n'.
|
||||
parts = []
|
||||
part_boundary = "--" + self.boundary
|
||||
|
||||
# Add the form fields
|
||||
parts.extend(
|
||||
[part_boundary,
|
||||
'Content-Disposition: form-data; name="{}"'.format(name), '', value]
|
||||
for name, value in self.form_fields
|
||||
)
|
||||
|
||||
# Add the files to upload
|
||||
parts.extend(
|
||||
[part_boundary,
|
||||
'Content-Disposition: form-data; name="{}"; filename="{}"'.format(field_name, filename),
|
||||
'Content-Type: {}'.format(content_type),
|
||||
'',
|
||||
body,
|
||||
]
|
||||
for field_name, filename, content_type, body in self.files
|
||||
)
|
||||
|
||||
# Flatten the list and add closing boundary marker,
|
||||
# then return CR+LF separated data
|
||||
flattened = list(itertools.chain(*parts))
|
||||
flattened.append(part_boundary + '--')
|
||||
flattened.append('')
|
||||
return b'\r\n'.join(enc(x) for x in flattened)
|
||||
|
||||
|
||||
def _print_debug(msg):
|
||||
if DEBUG_LEVEL:
|
||||
sys.stderr.write(str(msg) + '\n')
|
||||
|
||||
|
||||
_APIS = [
|
||||
{
|
||||
'prefix': 'facepp/v3',
|
||||
'paths': [
|
||||
'/detect',
|
||||
'/compare',
|
||||
'/search',
|
||||
'/faceset/create',
|
||||
'/faceset/addface',
|
||||
'/faceset/removeface',
|
||||
'/faceset/update',
|
||||
'/faceset/getdetail',
|
||||
'/faceset/delete',
|
||||
'/faceset/getfacesets',
|
||||
'/face/analyze',
|
||||
'/face/getdetail',
|
||||
'/face/setuserid',
|
||||
],
|
||||
},
|
||||
{
|
||||
'prefix': 'humanbodypp/v1',
|
||||
'paths': [
|
||||
'/detect',
|
||||
'/segment',
|
||||
]
|
||||
},
|
||||
{
|
||||
'prefix': 'cardpp/v1',
|
||||
'paths': [
|
||||
'/ocridcard',
|
||||
'/ocrdriverlicense',
|
||||
'/ocrvehiclelicense',
|
||||
'/ocrbankcard',
|
||||
]
|
||||
},
|
||||
{
|
||||
'prefix': 'imagepp/v1',
|
||||
'paths': [
|
||||
'/licenseplate',
|
||||
'/recognizetext',
|
||||
'/mergeface'
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
_APIS = [(i['prefix'], [p.split('/')[1:] for p in i['paths']]) for i in _APIS]
|
||||
19
app/lib/face/structures.py
Executable file
19
app/lib/face/structures.py
Executable file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
class ObjectDict(dict):
|
||||
"""Dictionary object for json decode"""
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in self:
|
||||
return self[name]
|
||||
else:
|
||||
raise AttributeError("No such attribute: " + name)
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
self[name] = value
|
||||
|
||||
def __delattr__(self, name):
|
||||
if name in self:
|
||||
del self[name]
|
||||
else:
|
||||
raise AttributeError("No such attribute: " + name)
|
||||
1
app/lib/facebody/.pydio
Normal file
1
app/lib/facebody/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
dce8dc79-07b1-4fae-ba88-3457205e15bd
|
||||
140
app/lib/facebody/ChangeLog.txt
Executable file
140
app/lib/facebody/ChangeLog.txt
Executable file
@@ -0,0 +1,140 @@
|
||||
2021-05-14 Version: 1.2.21
|
||||
- Release ExtractFingerPrint.
|
||||
|
||||
2021-04-29 Version: 1.2.20
|
||||
- Update RecognizeFace.
|
||||
|
||||
2021-04-06 Version: 1.2.19
|
||||
- Release MonitorExamination.
|
||||
|
||||
2021-03-11 Version: 1.2.18
|
||||
- Update DetectIPCPedestrian.
|
||||
|
||||
2021-03-04 Version: 1.2.17
|
||||
- Release RecognizeHandGesture.
|
||||
|
||||
2021-03-04 Version: 2.0.7
|
||||
- Release RecognizeHandGesture.
|
||||
|
||||
2021-03-03 Version: 1.2.16
|
||||
- Update Compareface.
|
||||
|
||||
2021-02-19 Version: 1.2.2
|
||||
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||
|
||||
2021-02-19 Version: 1.2.2
|
||||
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||
|
||||
2021-02-19 Version: 1.2.2
|
||||
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||
|
||||
2021-02-19 Version: 1.2.13
|
||||
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
|
||||
|
||||
2021-02-08 Version: 1.2.15
|
||||
- Update PedestrianDetectAttribute.
|
||||
|
||||
2021-02-01 Version: 1.2.14
|
||||
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
|
||||
|
||||
2021-02-01 Version: 1.2.13
|
||||
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
|
||||
|
||||
2021-01-12 Version: 1.2.12
|
||||
- Update ExtractPedestrianFeatureAttr.
|
||||
|
||||
2020-12-28 Version: 1.2.11
|
||||
- Release GenRealPersonVerificationToken GetRealPersonVerificationResult.
|
||||
|
||||
2020-12-24 Version: 1.2.10
|
||||
- Release CreateBodyDb ListBodyDbs DeleteBodyDb CreateBodyPerson GetBodyPerson ListBodyPerson DeleteBodyPerson AddBodyTrace SearchBodyTrace.
|
||||
|
||||
2020-12-23 Version: 1.2.9
|
||||
- Release DetectPedestrianIntrusion.
|
||||
|
||||
2020-12-22 Version: 1.2.8
|
||||
- Release InterpolateVideoFrame.
|
||||
|
||||
2020-11-24 Version: 1.2.7
|
||||
- Update SearchFace.
|
||||
|
||||
2020-11-20 Version: 1.2.6
|
||||
- Update DetectFace.
|
||||
- Update RecognizeFace.
|
||||
|
||||
2020-11-20 Version: 1.2.6
|
||||
- Update DetectFace.
|
||||
- Update RecognizeFace.
|
||||
|
||||
2020-11-19 Version: 1.2.3
|
||||
- Update GenerateHumanAnimeStyle.
|
||||
|
||||
2020-11-13 Version: 1.2.2
|
||||
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||
|
||||
2020-10-13 Version: 1.2.1
|
||||
- Release PedestrianDetectAttribute.
|
||||
|
||||
2020-09-17 Version: 1.1.9.ROA
|
||||
- Add Api DetectIPCPedestrianOptimized.
|
||||
|
||||
2020-09-09 Version: 1.2.0
|
||||
- Release DetectChefCap.
|
||||
|
||||
2020-09-09 Version: 1.1.10
|
||||
- Release DetectChefCap.
|
||||
|
||||
2020-09-09 Version: 1.1.7
|
||||
- Release DetectChefCap.
|
||||
|
||||
2020-08-25 Version: 1.1.6
|
||||
- Release ExtractPedestrianFeatureAttribute and BlurFace.
|
||||
|
||||
2020-08-14 Version: 1.1.5
|
||||
- Supported Api DetectIPCPedestrian.
|
||||
|
||||
2020-08-03 Version: 1.1.4
|
||||
- Add ExtractPedestrianFeatureAttribute.
|
||||
|
||||
2020-07-30 Version: 1.1.3
|
||||
- Update DetectCelebrity.
|
||||
|
||||
2020-07-30 Version: 1.1.2
|
||||
- Add DetectCelebrity.
|
||||
|
||||
2020-07-01 Version: 1.1.1
|
||||
- Sdk version 111.
|
||||
|
||||
2020-05-29 Version: 1.1.0
|
||||
- Sdk version 111.
|
||||
|
||||
2020-05-12 Version: 1.0.9
|
||||
- Sdk version 109.
|
||||
|
||||
2020-04-07 Version: 1.0.8
|
||||
- Generated 2019-12-30 for `facebody`.
|
||||
|
||||
2020-03-23 Version: 1.0.7
|
||||
- Sdk version 107.
|
||||
|
||||
2020-02-27 Version: 1.0.6
|
||||
- Sdk version 106.
|
||||
|
||||
2020-02-09 Version: 1.0.4
|
||||
- Sdk version 104.
|
||||
|
||||
2020-02-08 Version: 1.0.3
|
||||
- Add DetectMask Api.
|
||||
|
||||
2020-01-20 Version: 1.0.1
|
||||
- Onezeroone sdk version.
|
||||
|
||||
2019-12-30 Version: 1.0.2
|
||||
- Disable Base64 Image string data support.
|
||||
|
||||
2019-12-29 Version: 1.0.1
|
||||
- Add new api.
|
||||
|
||||
2019-12-18 Version: 1.0.0
|
||||
- First sdk version.
|
||||
|
||||
13
app/lib/facebody/LICENSE
Executable file
13
app/lib/facebody/LICENSE
Executable file
@@ -0,0 +1,13 @@
|
||||
Copyright 1999-present Alibaba Group Holding Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
1
app/lib/facebody/MANIFEST.in
Executable file
1
app/lib/facebody/MANIFEST.in
Executable file
@@ -0,0 +1 @@
|
||||
include LICENSE README.rst ChangeLog.txt
|
||||
15
app/lib/facebody/README.rst
Executable file
15
app/lib/facebody/README.rst
Executable file
@@ -0,0 +1,15 @@
|
||||
=============================================================
|
||||
aliyun-python-sdk-facebody
|
||||
=============================================================
|
||||
|
||||
.. This is the facebody module of Aliyun Python SDK.
|
||||
|
||||
Aliyun Python SDK is the official software development kit. It makes things easy to integrate your Python application, library, or script with Aliyun services.
|
||||
|
||||
This module works on Python versions:
|
||||
|
||||
2.6.5 and greater
|
||||
|
||||
**Documentation:**
|
||||
|
||||
Please visit `http://develop.aliyun.com/sdk/python <http://develop.aliyun.com/sdk/python>`_
|
||||
1
app/lib/facebody/aliyunsdkfacebody/.pydio
Normal file
1
app/lib/facebody/aliyunsdkfacebody/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f69e9afe-bafb-48b1-97ae-88401e175fde
|
||||
1
app/lib/facebody/aliyunsdkfacebody/__init__.py
Executable file
1
app/lib/facebody/aliyunsdkfacebody/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
__version__ = '1.2.21'
|
||||
33
app/lib/facebody/aliyunsdkfacebody/endpoint.py
Executable file
33
app/lib/facebody/aliyunsdkfacebody/endpoint.py
Executable file
@@ -0,0 +1,33 @@
|
||||
# # Licensed to the Apache Software Foundation (ASF) under one
|
||||
# # or more contributor license agreements. See the NOTICE file
|
||||
# # distributed with this work for additional information
|
||||
# # regarding copyright ownership. The ASF licenses this file
|
||||
# # to you under the Apache License, Version 2.0 (the
|
||||
# # "License"); you may not use this file except in compliance
|
||||
# # with the License. You may obtain a copy of the License at
|
||||
# #
|
||||
# #
|
||||
# # http://www.apache.org/licenses/LICENSE-2.0
|
||||
# #
|
||||
# #
|
||||
# # Unless required by applicable law or agreed to in writing,
|
||||
# # software distributed under the License is distributed on an
|
||||
# # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# # KIND, either express or implied. See the License for the
|
||||
# # specific language governing permissions and limitations
|
||||
# # under the License.
|
||||
|
||||
|
||||
class EndpointData():
|
||||
def __init__(self):
|
||||
self.endpoint_map = {}
|
||||
self.endpoint_regional = "regional"
|
||||
|
||||
def getEndpointMap(self):
|
||||
return self.endpoint_map
|
||||
|
||||
def getEndpointRegional(self):
|
||||
return self.endpoint_regional
|
||||
|
||||
|
||||
endpoint_data = EndpointData()
|
||||
1
app/lib/facebody/aliyunsdkfacebody/request/.pydio
Normal file
1
app/lib/facebody/aliyunsdkfacebody/request/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f91707f5-283a-4e80-87ed-9ff465c5a243
|
||||
0
app/lib/facebody/aliyunsdkfacebody/request/__init__.py
Executable file
0
app/lib/facebody/aliyunsdkfacebody/request/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
2a1f3697-b267-4f0a-8915-b589ae654d79
|
||||
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddBodyTraceRequest.py
Executable file
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddBodyTraceRequest.py
Executable file
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class AddBodyTraceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'AddBodyTrace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ExtraData(self):
|
||||
return self.get_body_params().get('ExtraData')
|
||||
|
||||
def set_ExtraData(self,ExtraData):
|
||||
self.add_body_params('ExtraData', ExtraData)
|
||||
|
||||
def get_PersonId(self):
|
||||
return self.get_body_params().get('PersonId')
|
||||
|
||||
def set_PersonId(self,PersonId):
|
||||
self.add_body_params('PersonId', PersonId)
|
||||
|
||||
def get_Images(self):
|
||||
return self.get_body_params().get('Images')
|
||||
|
||||
def set_Images(self,Images):
|
||||
self.add_body_params('Images', Images)
|
||||
|
||||
def get_DbId(self):
|
||||
return self.get_body_params().get('DbId')
|
||||
|
||||
def set_DbId(self,DbId):
|
||||
self.add_body_params('DbId', DbId)
|
||||
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddFaceEntityRequest.py
Executable file
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddFaceEntityRequest.py
Executable file
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class AddFaceEntityRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'AddFaceEntity','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_EntityId(self):
|
||||
return self.get_body_params().get('EntityId')
|
||||
|
||||
def set_EntityId(self,EntityId):
|
||||
self.add_body_params('EntityId', EntityId)
|
||||
|
||||
def get_Labels(self):
|
||||
return self.get_body_params().get('Labels')
|
||||
|
||||
def set_Labels(self,Labels):
|
||||
self.add_body_params('Labels', Labels)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class AddFaceImageTemplateRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'AddFaceImageTemplate','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_UserId(self):
|
||||
return self.get_body_params().get('UserId')
|
||||
|
||||
def set_UserId(self,UserId):
|
||||
self.add_body_params('UserId', UserId)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddFaceRequest.py
Executable file
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/AddFaceRequest.py
Executable file
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class AddFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'AddFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_EntityId(self):
|
||||
return self.get_body_params().get('EntityId')
|
||||
|
||||
def set_EntityId(self,EntityId):
|
||||
self.add_body_params('EntityId', EntityId)
|
||||
|
||||
def get_ExtraData(self):
|
||||
return self.get_body_params().get('ExtraData')
|
||||
|
||||
def set_ExtraData(self,ExtraData):
|
||||
self.add_body_params('ExtraData', ExtraData)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
|
||||
def get_ImageUrl(self):
|
||||
return self.get_body_params().get('ImageUrl')
|
||||
|
||||
def set_ImageUrl(self,ImageUrl):
|
||||
self.add_body_params('ImageUrl', ImageUrl)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/BlurFaceRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/BlurFaceRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class BlurFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'BlurFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/BodyPostureRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/BodyPostureRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class BodyPostureRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'BodyPosture','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
62
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CompareFaceRequest.py
Executable file
62
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CompareFaceRequest.py
Executable file
@@ -0,0 +1,62 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class CompareFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'CompareFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageDataA(self):
|
||||
return self.get_body_params().get('ImageDataA')
|
||||
|
||||
def set_ImageDataA(self,ImageDataA):
|
||||
self.add_body_params('ImageDataA', ImageDataA)
|
||||
|
||||
def get_ImageDataB(self):
|
||||
return self.get_body_params().get('ImageDataB')
|
||||
|
||||
def set_ImageDataB(self,ImageDataB):
|
||||
self.add_body_params('ImageDataB', ImageDataB)
|
||||
|
||||
def get_QualityScoreThreshold(self):
|
||||
return self.get_body_params().get('QualityScoreThreshold')
|
||||
|
||||
def set_QualityScoreThreshold(self,QualityScoreThreshold):
|
||||
self.add_body_params('QualityScoreThreshold', QualityScoreThreshold)
|
||||
|
||||
def get_ImageURLB(self):
|
||||
return self.get_body_params().get('ImageURLB')
|
||||
|
||||
def set_ImageURLB(self,ImageURLB):
|
||||
self.add_body_params('ImageURLB', ImageURLB)
|
||||
|
||||
def get_ImageURLA(self):
|
||||
return self.get_body_params().get('ImageURLA')
|
||||
|
||||
def set_ImageURLA(self,ImageURLA):
|
||||
self.add_body_params('ImageURLA', ImageURLA)
|
||||
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CountCrowdRequest.py
Executable file
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CountCrowdRequest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class CountCrowdRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'CountCrowd','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_IsShow(self):
|
||||
return self.get_body_params().get('IsShow')
|
||||
|
||||
def set_IsShow(self,IsShow):
|
||||
self.add_body_params('IsShow', IsShow)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CreateBodyDbRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CreateBodyDbRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class CreateBodyDbRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'CreateBodyDb','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Name(self):
|
||||
return self.get_body_params().get('Name')
|
||||
|
||||
def set_Name(self,Name):
|
||||
self.add_body_params('Name', Name)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class CreateBodyPersonRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'CreateBodyPerson','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_DbId(self):
|
||||
return self.get_body_params().get('DbId')
|
||||
|
||||
def set_DbId(self,DbId):
|
||||
self.add_body_params('DbId', DbId)
|
||||
|
||||
def get_Name(self):
|
||||
return self.get_body_params().get('Name')
|
||||
|
||||
def set_Name(self,Name):
|
||||
self.add_body_params('Name', Name)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CreateFaceDbRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/CreateFaceDbRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class CreateFaceDbRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'CreateFaceDb','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Name(self):
|
||||
return self.get_body_params().get('Name')
|
||||
|
||||
def set_Name(self,Name):
|
||||
self.add_body_params('Name', Name)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteBodyDbRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteBodyDbRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteBodyDbRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteBodyDb','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Id(self):
|
||||
return self.get_body_params().get('Id')
|
||||
|
||||
def set_Id(self,Id):
|
||||
self.add_body_params('Id', Id)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteBodyPersonRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteBodyPerson','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_PersonId(self):
|
||||
return self.get_body_params().get('PersonId')
|
||||
|
||||
def set_PersonId(self,PersonId):
|
||||
self.add_body_params('PersonId', PersonId)
|
||||
|
||||
def get_DbId(self):
|
||||
return self.get_body_params().get('DbId')
|
||||
|
||||
def set_DbId(self,DbId):
|
||||
self.add_body_params('DbId', DbId)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteFaceDbRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteFaceDbRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteFaceDbRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteFaceDb','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Name(self):
|
||||
return self.get_body_params().get('Name')
|
||||
|
||||
def set_Name(self,Name):
|
||||
self.add_body_params('Name', Name)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteFaceEntityRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteFaceEntity','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_EntityId(self):
|
||||
return self.get_body_params().get('EntityId')
|
||||
|
||||
def set_EntityId(self,EntityId):
|
||||
self.add_body_params('EntityId', EntityId)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteFaceImageTemplateRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteFaceImageTemplate','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_UserId(self):
|
||||
return self.get_body_params().get('UserId')
|
||||
|
||||
def set_UserId(self,UserId):
|
||||
self.add_body_params('UserId', UserId)
|
||||
|
||||
def get_TemplateId(self):
|
||||
return self.get_body_params().get('TemplateId')
|
||||
|
||||
def set_TemplateId(self,TemplateId):
|
||||
self.add_body_params('TemplateId', TemplateId)
|
||||
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteFaceRequest.py
Executable file
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DeleteFaceRequest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DeleteFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DeleteFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_FaceId(self):
|
||||
return self.get_body_params().get('FaceId')
|
||||
|
||||
def set_FaceId(self,FaceId):
|
||||
self.add_body_params('FaceId', FaceId)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectBodyCountRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectBodyCount','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectCelebrityRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectCelebrity','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectChefCapRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectChefCapRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectChefCapRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectChefCap','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectFaceRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectFaceRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectIPCPedestrianRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectIPCPedestrian','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Height(self):
|
||||
return self.get_body_params().get('Height')
|
||||
|
||||
def set_Height(self,Height):
|
||||
self.add_body_params('Height', Height)
|
||||
|
||||
def get_ImageData(self):
|
||||
return self.get_body_params().get('ImageData')
|
||||
|
||||
def set_ImageData(self,ImageData):
|
||||
self.add_body_params('ImageData', ImageData)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
|
||||
def get_Width(self):
|
||||
return self.get_body_params().get('Width')
|
||||
|
||||
def set_Width(self,Width):
|
||||
self.add_body_params('Width', Width)
|
||||
@@ -0,0 +1,42 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectLivingFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectLivingFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Taskss(self):
|
||||
return self.get_body_params().get('Tasks')
|
||||
|
||||
def set_Taskss(self, Taskss):
|
||||
for depth1 in range(len(Taskss)):
|
||||
if Taskss[depth1].get('ImageURL') is not None:
|
||||
self.add_body_params('Tasks.' + str(depth1 + 1) + '.ImageURL', Taskss[depth1].get('ImageURL'))
|
||||
if Taskss[depth1].get('ImageData') is not None:
|
||||
self.add_body_params('Tasks.' + str(depth1 + 1) + '.ImageData', Taskss[depth1].get('ImageData'))
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectMaskRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/DetectMaskRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectMaskRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectMask','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectPedestrianIntrusionRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectPedestrianIntrusion','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_DetectRegion(self):
|
||||
return self.get_body_params().get('DetectRegion')
|
||||
|
||||
def set_DetectRegion(self,DetectRegion):
|
||||
self.add_body_params('DetectRegion', DetectRegion)
|
||||
|
||||
def get_RegionType(self):
|
||||
return self.get_body_params().get('RegionType')
|
||||
|
||||
def set_RegionType(self,RegionType):
|
||||
self.add_body_params('RegionType', RegionType)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectPedestrianRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectPedestrian','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class DetectVideoLivingFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'DetectVideoLivingFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_VideoUrl(self):
|
||||
return self.get_body_params().get('VideoUrl')
|
||||
|
||||
def set_VideoUrl(self,VideoUrl):
|
||||
self.add_body_params('VideoUrl', VideoUrl)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/EnhanceFaceRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/EnhanceFaceRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class EnhanceFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'EnhanceFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ExtractFingerPrintRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ExtractFingerPrint','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageData(self):
|
||||
return self.get_body_params().get('ImageData')
|
||||
|
||||
def set_ImageData(self,ImageData):
|
||||
self.add_body_params('ImageData', ImageData)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ExtractPedestrianFeatureAttrRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ExtractPedestrianFeatureAttr','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Mode(self):
|
||||
return self.get_body_params().get('Mode')
|
||||
|
||||
def set_Mode(self,Mode):
|
||||
self.add_body_params('Mode', Mode)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
|
||||
def get_ServiceVersion(self):
|
||||
return self.get_body_params().get('ServiceVersion')
|
||||
|
||||
def set_ServiceVersion(self,ServiceVersion):
|
||||
self.add_body_params('ServiceVersion', ServiceVersion)
|
||||
@@ -0,0 +1,52 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ExtractPedestrianFeatureAttributeRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ExtractPedestrianFeatureAttribute','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_UrlLists(self):
|
||||
return self.get_body_params().get('UrlList')
|
||||
|
||||
def set_UrlLists(self, UrlLists):
|
||||
for depth1 in range(len(UrlLists)):
|
||||
if UrlLists[depth1].get('Url') is not None:
|
||||
self.add_body_params('UrlList.' + str(depth1 + 1) + '.Url', UrlLists[depth1].get('Url'))
|
||||
|
||||
def get_Mode(self):
|
||||
return self.get_body_params().get('Mode')
|
||||
|
||||
def set_Mode(self,Mode):
|
||||
self.add_body_params('Mode', Mode)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceBeautyRequest.py
Executable file
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceBeautyRequest.py
Executable file
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class FaceBeautyRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'FaceBeauty','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_White(self):
|
||||
return self.get_body_params().get('White')
|
||||
|
||||
def set_White(self,White):
|
||||
self.add_body_params('White', White)
|
||||
|
||||
def get_Smooth(self):
|
||||
return self.get_body_params().get('Smooth')
|
||||
|
||||
def set_Smooth(self,Smooth):
|
||||
self.add_body_params('Smooth', Smooth)
|
||||
|
||||
def get_Sharp(self):
|
||||
return self.get_body_params().get('Sharp')
|
||||
|
||||
def set_Sharp(self,Sharp):
|
||||
self.add_body_params('Sharp', Sharp)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceFilterRequest.py
Executable file
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceFilterRequest.py
Executable file
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class FaceFilterRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'FaceFilter','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Strength(self):
|
||||
return self.get_body_params().get('Strength')
|
||||
|
||||
def set_Strength(self,Strength):
|
||||
self.add_body_params('Strength', Strength)
|
||||
|
||||
def get_ResourceType(self):
|
||||
return self.get_body_params().get('ResourceType')
|
||||
|
||||
def set_ResourceType(self,ResourceType):
|
||||
self.add_body_params('ResourceType', ResourceType)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceMakeupRequest.py
Executable file
56
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceMakeupRequest.py
Executable file
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class FaceMakeupRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'FaceMakeup','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Strength(self):
|
||||
return self.get_body_params().get('Strength')
|
||||
|
||||
def set_Strength(self,Strength):
|
||||
self.add_body_params('Strength', Strength)
|
||||
|
||||
def get_MakeupType(self):
|
||||
return self.get_body_params().get('MakeupType')
|
||||
|
||||
def set_MakeupType(self,MakeupType):
|
||||
self.add_body_params('MakeupType', MakeupType)
|
||||
|
||||
def get_ResourceType(self):
|
||||
return self.get_body_params().get('ResourceType')
|
||||
|
||||
def set_ResourceType(self,ResourceType):
|
||||
self.add_body_params('ResourceType', ResourceType)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceTidyupRequest.py
Executable file
50
app/lib/facebody/aliyunsdkfacebody/request/v20191230/FaceTidyupRequest.py
Executable file
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class FaceTidyupRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'FaceTidyup','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ShapeType(self):
|
||||
return self.get_body_params().get('ShapeType')
|
||||
|
||||
def set_ShapeType(self,ShapeType):
|
||||
self.add_body_params('ShapeType', ShapeType)
|
||||
|
||||
def get_Strength(self):
|
||||
return self.get_body_params().get('Strength')
|
||||
|
||||
def set_Strength(self,Strength):
|
||||
self.add_body_params('Strength', Strength)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GenRealPersonVerificationTokenRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GenRealPersonVerificationToken','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_CertificateNumber(self):
|
||||
return self.get_body_params().get('CertificateNumber')
|
||||
|
||||
def set_CertificateNumber(self,CertificateNumber):
|
||||
self.add_body_params('CertificateNumber', CertificateNumber)
|
||||
|
||||
def get_CertificateName(self):
|
||||
return self.get_body_params().get('CertificateName')
|
||||
|
||||
def set_CertificateName(self,CertificateName):
|
||||
self.add_body_params('CertificateName', CertificateName)
|
||||
|
||||
def get_MetaInfo(self):
|
||||
return self.get_body_params().get('MetaInfo')
|
||||
|
||||
def set_MetaInfo(self,MetaInfo):
|
||||
self.add_body_params('MetaInfo', MetaInfo)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GenerateHumanAnimeStyleRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GenerateHumanAnimeStyle','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_AlgoType(self):
|
||||
return self.get_query_params().get('AlgoType')
|
||||
|
||||
def set_AlgoType(self,AlgoType):
|
||||
self.add_query_param('AlgoType',AlgoType)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_query_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_query_param('ImageURL',ImageURL)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GenerateHumanSketchStyleRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GenerateHumanSketchStyle','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ReturnType(self):
|
||||
return self.get_body_params().get('ReturnType')
|
||||
|
||||
def set_ReturnType(self,ReturnType):
|
||||
self.add_body_params('ReturnType', ReturnType)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/GetBodyPersonRequest.py
Executable file
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/GetBodyPersonRequest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GetBodyPersonRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GetBodyPerson','facebody')
|
||||
self.set_method('GET')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_PersonId(self):
|
||||
return self.get_query_params().get('PersonId')
|
||||
|
||||
def set_PersonId(self,PersonId):
|
||||
self.add_query_param('PersonId',PersonId)
|
||||
|
||||
def get_DbId(self):
|
||||
return self.get_query_params().get('DbId')
|
||||
|
||||
def set_DbId(self,DbId):
|
||||
self.add_query_param('DbId',DbId)
|
||||
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/GetFaceEntityRequest.py
Executable file
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/GetFaceEntityRequest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GetFaceEntityRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GetFaceEntity','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_EntityId(self):
|
||||
return self.get_body_params().get('EntityId')
|
||||
|
||||
def set_EntityId(self,EntityId):
|
||||
self.add_body_params('EntityId', EntityId)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class GetRealPersonVerificationResultRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'GetRealPersonVerificationResult','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_MaterialHash(self):
|
||||
return self.get_body_params().get('MaterialHash')
|
||||
|
||||
def set_MaterialHash(self,MaterialHash):
|
||||
self.add_body_params('MaterialHash', MaterialHash)
|
||||
|
||||
def get_VerificationToken(self):
|
||||
return self.get_body_params().get('VerificationToken')
|
||||
|
||||
def set_VerificationToken(self,VerificationToken):
|
||||
self.add_body_params('VerificationToken', VerificationToken)
|
||||
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/HandPostureRequest.py
Executable file
38
app/lib/facebody/aliyunsdkfacebody/request/v20191230/HandPostureRequest.py
Executable file
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class HandPostureRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'HandPosture','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/ListBodyDbsRequest.py
Executable file
44
app/lib/facebody/aliyunsdkfacebody/request/v20191230/ListBodyDbsRequest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ListBodyDbsRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ListBodyDbs','facebody')
|
||||
self.set_method('GET')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Limit(self):
|
||||
return self.get_query_params().get('Limit')
|
||||
|
||||
def set_Limit(self,Limit):
|
||||
self.add_query_param('Limit',Limit)
|
||||
|
||||
def get_Offset(self):
|
||||
return self.get_query_params().get('Offset')
|
||||
|
||||
def set_Offset(self,Offset):
|
||||
self.add_query_param('Offset',Offset)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ListBodyPersonRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ListBodyPerson','facebody')
|
||||
self.set_method('GET')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Limit(self):
|
||||
return self.get_query_params().get('Limit')
|
||||
|
||||
def set_Limit(self,Limit):
|
||||
self.add_query_param('Limit',Limit)
|
||||
|
||||
def get_Offset(self):
|
||||
return self.get_query_params().get('Offset')
|
||||
|
||||
def set_Offset(self,Offset):
|
||||
self.add_query_param('Offset',Offset)
|
||||
|
||||
def get_DbId(self):
|
||||
return self.get_query_params().get('DbId')
|
||||
|
||||
def set_DbId(self,DbId):
|
||||
self.add_query_param('DbId',DbId)
|
||||
31
app/lib/facebody/aliyunsdkfacebody/request/v20191230/ListFaceDbsRequest.py
Executable file
31
app/lib/facebody/aliyunsdkfacebody/request/v20191230/ListFaceDbsRequest.py
Executable file
@@ -0,0 +1,31 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ListFaceDbsRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ListFaceDbs','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
@@ -0,0 +1,74 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class ListFaceEntitiesRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'ListFaceEntities','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_EntityIdPrefix(self):
|
||||
return self.get_body_params().get('EntityIdPrefix')
|
||||
|
||||
def set_EntityIdPrefix(self,EntityIdPrefix):
|
||||
self.add_body_params('EntityIdPrefix', EntityIdPrefix)
|
||||
|
||||
def get_Limit(self):
|
||||
return self.get_body_params().get('Limit')
|
||||
|
||||
def set_Limit(self,Limit):
|
||||
self.add_body_params('Limit', Limit)
|
||||
|
||||
def get_Order(self):
|
||||
return self.get_body_params().get('Order')
|
||||
|
||||
def set_Order(self,Order):
|
||||
self.add_body_params('Order', Order)
|
||||
|
||||
def get_Offset(self):
|
||||
return self.get_body_params().get('Offset')
|
||||
|
||||
def set_Offset(self,Offset):
|
||||
self.add_body_params('Offset', Offset)
|
||||
|
||||
def get_Token(self):
|
||||
return self.get_body_params().get('Token')
|
||||
|
||||
def set_Token(self,Token):
|
||||
self.add_body_params('Token', Token)
|
||||
|
||||
def get_Labels(self):
|
||||
return self.get_body_params().get('Labels')
|
||||
|
||||
def set_Labels(self,Labels):
|
||||
self.add_body_params('Labels', Labels)
|
||||
|
||||
def get_DbName(self):
|
||||
return self.get_body_params().get('DbName')
|
||||
|
||||
def set_DbName(self,DbName):
|
||||
self.add_body_params('DbName', DbName)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class MergeImageFaceRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'MergeImageFace','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_UserId(self):
|
||||
return self.get_body_params().get('UserId')
|
||||
|
||||
def set_UserId(self,UserId):
|
||||
self.add_body_params('UserId', UserId)
|
||||
|
||||
def get_TemplateId(self):
|
||||
return self.get_body_params().get('TemplateId')
|
||||
|
||||
def set_TemplateId(self,TemplateId):
|
||||
self.add_body_params('TemplateId', TemplateId)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class MonitorExaminationRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'MonitorExamination','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Type(self):
|
||||
return self.get_body_params().get('Type')
|
||||
|
||||
def set_Type(self,Type):
|
||||
self.add_body_params('Type', Type)
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class PedestrianDetectAttributeRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'PedestrianDetectAttribute','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class QueryFaceImageTemplateRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'QueryFaceImageTemplate','facebody')
|
||||
self.set_method('GET')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_UserId(self):
|
||||
return self.get_query_params().get('UserId')
|
||||
|
||||
def set_UserId(self,UserId):
|
||||
self.add_query_param('UserId',UserId)
|
||||
|
||||
def get_TemplateId(self):
|
||||
return self.get_query_params().get('TemplateId')
|
||||
|
||||
def set_TemplateId(self,TemplateId):
|
||||
self.add_query_param('TemplateId',TemplateId)
|
||||
@@ -0,0 +1,60 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class RecognizeActionRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'RecognizeAction','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_Type(self):
|
||||
return self.get_body_params().get('Type')
|
||||
|
||||
def set_Type(self,Type):
|
||||
self.add_body_params('Type', Type)
|
||||
|
||||
def get_VideoData(self):
|
||||
return self.get_body_params().get('VideoData')
|
||||
|
||||
def set_VideoData(self,VideoData):
|
||||
self.add_body_params('VideoData', VideoData)
|
||||
|
||||
def get_URLLists(self):
|
||||
return self.get_body_params().get('URLList')
|
||||
|
||||
def set_URLLists(self, URLLists):
|
||||
for depth1 in range(len(URLLists)):
|
||||
if URLLists[depth1].get('imageData') is not None:
|
||||
self.add_body_params('URLList.' + str(depth1 + 1) + '.imageData', URLLists[depth1].get('imageData'))
|
||||
if URLLists[depth1].get('URL') is not None:
|
||||
self.add_body_params('URLList.' + str(depth1 + 1) + '.URL', URLLists[depth1].get('URL'))
|
||||
|
||||
def get_VideoUrl(self):
|
||||
return self.get_body_params().get('VideoUrl')
|
||||
|
||||
def set_VideoUrl(self,VideoUrl):
|
||||
self.add_body_params('VideoUrl', VideoUrl)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from aliyunsdkcore.request import RpcRequest
|
||||
from aliyunsdkfacebody.endpoint import endpoint_data
|
||||
|
||||
class RecognizeExpressionRequest(RpcRequest):
|
||||
|
||||
def __init__(self):
|
||||
RpcRequest.__init__(self, 'facebody', '2019-12-30', 'RecognizeExpression','facebody')
|
||||
self.set_method('POST')
|
||||
if hasattr(self, "endpoint_map"):
|
||||
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
|
||||
if hasattr(self, "endpoint_regional"):
|
||||
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
|
||||
|
||||
|
||||
def get_ImageURL(self):
|
||||
return self.get_body_params().get('ImageURL')
|
||||
|
||||
def set_ImageURL(self,ImageURL):
|
||||
self.add_body_params('ImageURL', ImageURL)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user