# coding:utf-8
from __future__ import print_function

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')
    # visual_service.set_host('host')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.ocr_normal(form)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    form = {"output_resolution": "output_resolution", "video_url": ""}

    resp = visual_service.video_over_resolution_submit_task(form)
    print(resp)
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    form = {
        "pid": "pid_1",
    }

    resp = visual_service.image_search_image_delete(form)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.goods_segment(form)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    form = {
        "image_base64": "image_base64_str"
    }

    resp = visual_service.over_resolution(form)
    print(resp)
Exemplo n.º 6
0
# coding:utf-8
from __future__ import print_function

import time
import base64

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    form = {
        "method": "search",
        "video_url": ""
    }

    resp = visual_service.video_inpaint_submit_task(form)
    print(resp)
Exemplo n.º 7
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    params = {"task_id": "get from submit_task resp"}

    resp = visual_service.video_summarization_query_task(params)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    params = {
        "task_id": "get from submit_task resp"
    }

    resp = visual_service.video_over_resolution_query_task(params)
    print(resp)
Exemplo n.º 9
0
# coding:utf-8
from __future__ import print_function

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')
    # visual_service.set_host('host')

    params = dict()

    form = {
        "image_base64": "image_base64_str",
        "template_base64": "template_base64_str",
        "action_id": "faceswap"
    }

    resp = visual_service.face_swap(form)
    print(resp)
Exemplo n.º 10
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.entity_detect(form)
    print(resp)
Exemplo n.º 11
0
# coding:utf-8
from __future__ import print_function

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')
    # visual_service.set_host('host')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.jpcartoon(form)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.image_outpaint(form)
    print(resp)
Exemplo n.º 13
0
# coding:utf-8
from __future__ import print_function

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')
    # visual_service.set_host('host')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.id_card(form)
    print(resp)
Exemplo n.º 14
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    params = {"task_id": "get from submit_task resp"}

    resp = visual_service.video_inpaint_query_task(params)
    print(resp)
Exemplo n.º 15
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    form = {"result_duration": 5, "result_width": 1280, "video_url": ""}

    resp = visual_service.video_summarization_submit_task(form)
    print(resp)
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    form = {
        "strategy": "STATIC_CROPPING",
        "aspect_ratio": 1,
        "crop_size": 1,
        "video_url": ""
    }

    resp = visual_service.video_retargeting_submit_task(form)
    print(resp)
Exemplo n.º 17
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    params = {"task_id": "get from submit_task resp"}

    resp = visual_service.video_retargeting_query_task(params)
    print(resp)
Exemplo n.º 18
0
# coding:utf-8
from __future__ import print_function

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')
    # visual_service.set_host('host')

    # below shows the sdk usage for all common apis,
    # if you cannot find the needed one, please check other example files in the same dir
    # or contact us for further help
    form = dict()
    form["image_base64"] = "image_base64_str"

    # 车牌检测
    # resp = visual_service.car_plate_detection(form)

    # 人像畸变矫正
    # resp = visual_service.distortion_free(form)

    # 图片拉伸修复
    # resp = visual_service.stretch_recovery(form)

    # 图片流动
    # form["motion_ratio"] = 2
    # resp = visual_service.image_flow(form)
Exemplo n.º 19
0
# coding:utf-8
from __future__ import print_function

import time

from volcengine.visual.VisualService import VisualService

if __name__ == '__main__':
    visual_service = VisualService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    visual_service.set_ak('ak')
    visual_service.set_sk('sk')

    params = dict()

    form = {"image_base64": "image_base64_str"}

    resp = visual_service.video_scene_detect(form)
    print(resp)