visual

package
v1.0.182 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 5

README

Example

调用代码示例均在example/visual文件夹下,以下为银行卡OCR调用示例

package main

import (
	"encoding/json"
	"fmt"
	"net/url"

	"github.com/volcengine/volc-sdk-golang/service/visual"
)

func main() {
	testAk := "your-ak"
	testSk := "your-sk"

	visual.DefaultInstance.Client.SetAccessKey(testAk)
	visual.DefaultInstance.Client.SetSecretKey(testSk)

	form := url.Values{}
	form.Add("image_base64", "")

	resp, status, err := visual.DefaultInstance.BankCard(form)
	fmt.Println(status, err)
	b, _ := json.Marshal(resp)
	fmt.Println(string(b))
}

运行代码方式,在根目录下执行

go run example/visual/bank_card.go

接口文档

文档链接请点击这里 并在【视觉智能】列表查看

Documentation

Index

Constants

View Source
const (
	DefaultRegion          = "cn-north-1"
	ServiceVersion20200826 = "2020-08-26"
	ServiceName            = "cv"
)

Variables

View Source
var (
	ServiceInfo = &base.ServiceInfo{
		Timeout: 30 * time.Second,
		Host:    "visual.volcengineapi.com",
		Header:  http.Header{},
	}

	ApiInfoList = map[string]*base.ApiInfo{}/* 111 elements not displayed */

)
View Source
var DefaultInstance = NewInstance()

DefaultInstance 默认的实例

Functions

This section is empty.

Types

type Visual

type Visual struct {
	Client *base.Client
}

IAM .

func NewInstance

func NewInstance() *Visual

NewInstance 创建一个实例

func (*Visual) AllAgeGeneration

func (p *Visual) AllAgeGeneration(req *model.AllAgeGenerationRequest) (*model.AllAgeGenerationResult, int, error)

func (*Visual) BankCard

func (p *Visual) BankCard(form url.Values) (*model.BankCardResult, int, error)

func (*Visual) BankCardV2

func (p *Visual) BankCardV2(form url.Values) (*model.BankCardResultV2, int, error)

func (*Visual) BodyDetection

func (p *Visual) BodyDetection(req *model.BodyDetectionRequest) (*model.BodyDetectionResult, int, error)

func (*Visual) CVGetResult added in v1.0.176

func (p *Visual) CVGetResult(bodyMap interface{}) (map[string]interface{}, int, error)

CVGetResult 通用查询任务接口 bodyMap: 按照接口文档填写入参

func (*Visual) CVProcess added in v1.0.176

func (p *Visual) CVProcess(bodyMap interface{}) (map[string]interface{}, int, error)

CVProcess 通用同步接口 bodyMap: 按照接口文档填写入参

func (*Visual) CVSubmitTask added in v1.0.176

func (p *Visual) CVSubmitTask(bodyMap interface{}) (map[string]interface{}, int, error)

CVSubmitTask 通用提交任务接口 bodyMap: 按照接口文档填写入参

func (*Visual) CVSync2AsyncGetResult added in v1.0.176

func (p *Visual) CVSync2AsyncGetResult(bodyMap interface{}) (map[string]interface{}, int, error)

CVSync2AsyncGetResult 同步转异步查询接口通用 bodyMap: 按照接口文档填写入参

func (*Visual) CVSync2AsyncSubmitTask added in v1.0.176

func (p *Visual) CVSync2AsyncSubmitTask(bodyMap interface{}) (map[string]interface{}, int, error)

CVSync2AsyncSubmitTask 同步转异步提交接口通用 bodyMap: 按照接口文档填写入参

func (*Visual) CarDetection

func (p *Visual) CarDetection(form url.Values) (*model.CarDetectionResult, int, error)

func (*Visual) CarPlateDetection

func (p *Visual) CarPlateDetection(form url.Values) (*model.CarPlateDetectionResult, int, error)

func (*Visual) CarSegment

func (p *Visual) CarSegment(form url.Values) (*model.CarSegmentResult, int, error)

func (*Visual) CertConfigInit

func (p *Visual) CertConfigInit(req *model.CertConfigInitRequest) (*model.CertConfigInitResult, int, error)

func (*Visual) CertH5ConfigInit added in v1.0.163

func (p *Visual) CertH5ConfigInit(bodyMap interface{}) (*model.CertPubResult, int, error)

CertH5ConfigInit 身份认证H5增强版相关接口 接口文档:https://www.volcengine.com/docs/6973/1209467 bodyMap: 按照接口文档填写入参

func (*Visual) CertH5Token added in v1.0.163

func (p *Visual) CertH5Token(bodyMap interface{}) (*model.CertPubResult, int, error)

CertH5Token 身份认证H5增强版相关接口 接口文档:https://www.volcengine.com/docs/6973/1209468 bodyMap: 按照接口文档填写入参

func (*Visual) CertToken

func (p *Visual) CertToken(req *model.CertTokenRequest) (*model.CertTokenResult, int, error)

func (*Visual) CertVerifyQuery

func (p *Visual) CertVerifyQuery(req *model.CertVerifyQueryRequest) (*model.CertVerifyQueryResult, int, error)

func (*Visual) ConvertPhoto

func (p *Visual) ConvertPhoto(form url.Values) (*model.ConvertPhotoResult, int, error)

func (*Visual) ConvertPhotoV2 added in v1.0.103

func (p *Visual) ConvertPhotoV2(req *model.ConvertPhotoV2Request) (*model.ConvertPhotoV2Result, int, error)

func (*Visual) DistortionFree

func (p *Visual) DistortionFree(form url.Values) (*model.DistortionFreeResult, int, error)

func (*Visual) DollyZoom

func (p *Visual) DollyZoom(form url.Values) (*model.DollyZoomResult, int, error)

func (*Visual) DrivingLicense

func (p *Visual) DrivingLicense(form url.Values) (*model.DrivingLicenseResult, int, error)

func (*Visual) EmoticonEdit

func (p *Visual) EmoticonEdit(form url.Values) (*model.EmoticonEditResult, int, error)

func (*Visual) EmotionPortrait added in v1.0.165

func (p *Visual) EmotionPortrait(bodyMap interface{}) (*model.VisualPubResult, int, error)

EmotionPortrait 表情编辑V2 接口文档:https://www.volcengine.com/docs/6791/1167998 bodyMap: 按照接口文档填写入参

func (*Visual) EnhancePhoto

func (p *Visual) EnhancePhoto(form url.Values) (*model.EnhancePhotoResult, int, error)

func (*Visual) EnhancePhotoV2

func (p *Visual) EnhancePhotoV2(req *model.EnhancePhotoV2Request) (*model.EnhancePhotoV2Result, int, error)

func (*Visual) EntityDetect

func (p *Visual) EntityDetect(form url.Values) (*model.EntityDetectResult, int, error)

func (*Visual) EntitySegment added in v1.0.169

func (p *Visual) EntitySegment(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

EntitySegment 智能分割。接口文档:https://www.volcengine.com/docs/6793/1317296 bodyMap: 按照接口文档填写入参

func (*Visual) EyeClose2Open

func (p *Visual) EyeClose2Open(form url.Values) (*model.EyeClose2OpenResult, int, error)

func (*Visual) FaceCompare added in v1.0.116

func (p *Visual) FaceCompare(bodyMap interface{}) (*model.FaceCompareResult, int, error)

func (*Visual) FaceFusionMovie added in v1.0.110

func (p *Visual) FaceFusionMovie(req *model.FaceFusionMovieRequest) (*model.FaceFusionMovieResult, int, error)

func (*Visual) FaceFusionMovieGetResultNew added in v1.0.154

func (p *Visual) FaceFusionMovieGetResultNew(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

FaceFusionMovieGetResultNew 视频人脸融合-查询任务。 QPS-2.x接口文档: https://www.volcengine.com/docs/6792/145429 按量-2.x接口文档: https://www.volcengine.com/docs/6792/271359 QPS-3.x接口文档: https://www.volcengine.com/docs/6792/1124893 bodyMap: 按照接口文档填写入参

func (*Visual) FaceFusionMovieSubmitTaskNew added in v1.0.154

func (p *Visual) FaceFusionMovieSubmitTaskNew(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

FaceFusionMovieSubmitTaskNew 视频人脸融合-提交任务 QPS-2.x接口文档: https://www.volcengine.com/docs/6792/145429 按量-2.x接口文档: https://www.volcengine.com/docs/6792/271359 QPS-3.x接口文档: https://www.volcengine.com/docs/6792/1124893 bodyMap: 按照接口文档填写入参

func (*Visual) FacePretty

func (p *Visual) FacePretty(form url.Values) (*model.FacePrettyResult, int, error)

func (*Visual) FaceSwap

func (p *Visual) FaceSwap(form url.Values) (*model.FaceSwapResult, int, error)

func (*Visual) FaceSwapAI added in v1.0.146

func (p *Visual) FaceSwapAI(bodyMap interface{}) (*model.FaceSwapAIResult, int, error)

FaceSwapAI 入参说明,接口文档:https://www.volcengine.com/docs/6791/1167911 bodyMap: 按照接口文档填写入参,其中 req_key:取固定值faceswap_ai

func (*Visual) FaceSwapV3 added in v1.0.146

func (p *Visual) FaceSwapV3(bodyMap interface{}) (*model.FaceSwapV3Result, int, error)

FaceSwapV3 入参说明,接口文档:https://www.volcengine.com/docs/6791/1130928 bodyMap: 按照接口文档填写入参,其中 req_key:- 3.0版本取固定值faceswap | 3.3版本取固定值face_swap3_3

func (*Visual) GeneralSegment

func (p *Visual) GeneralSegment(form url.Values) (*model.GeneralSegmentResult, int, error)

func (*Visual) GetAPIInfo

func (p *Visual) GetAPIInfo(api string) *base.ApiInfo

GetAPIInfo interface

func (*Visual) GetServiceInfo

func (p *Visual) GetServiceInfo() *base.ServiceInfo

GetServiceInfo interface

func (*Visual) GoodsDetect

func (p *Visual) GoodsDetect(form url.Values) (*model.GoodsDetectResult, int, error)

func (*Visual) GoodsSegment

func (p *Visual) GoodsSegment(form url.Values) (*model.GoodsSegmentResult, int, error)

func (*Visual) HairSegment

func (p *Visual) HairSegment(form url.Values) (*model.HairSegmentResult, int, error)

func (*Visual) HairStyle

func (p *Visual) HairStyle(form url.Values) (*model.HairStyleResult, int, error)

func (*Visual) HairStyleV2 added in v1.0.165

func (p *Visual) HairStyleV2(bodyMap interface{}) (*model.VisualPubResult, int, error)

HairStyleV2 发型编辑V2 接口文档:https://www.volcengine.com/docs/6791/1125766 bodyMap: 按照接口文档填写入参

func (*Visual) HighAesSmartDrawing added in v1.0.154

func (p *Visual) HighAesSmartDrawing(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

HighAesSmartDrawing 人像人体-智能绘图-高美感xx+单图写真,接口文档: https://www.volcengine.com/docs/6791/1213129 https://www.volcengine.com/docs/6791/1214814 https://www.volcengine.com/docs/6791/1213130 https://www.volcengine.com/docs/6791/1213131 https://www.volcengine.com/docs/6791/1213132 https://www.volcengine.com/docs/6791/1213737 bodyMap: 按照接口文档填写入参

func (*Visual) HumanSegment

func (p *Visual) HumanSegment(form url.Values) (*model.HumanSegmentResult, int, error)

func (*Visual) IDCard

func (p *Visual) IDCard(form url.Values) (*model.IDCardResult, int, error)

func (*Visual) IDCardV2

func (p *Visual) IDCardV2(form url.Values) (*model.IDCardResultV2, int, error)

func (*Visual) ImageAnimation

func (p *Visual) ImageAnimation(form url.Values) (*model.ImageAnimationResult, int, error)

func (*Visual) ImageCorrection

func (p *Visual) ImageCorrection(imageBase64 []string) (*model.ImageCorrectionResult, int, error)

func (*Visual) ImageCut

func (p *Visual) ImageCut(form url.Values) (*model.ImageCutResult, int, error)

func (*Visual) ImageFlow

func (p *Visual) ImageFlow(form url.Values) (*model.ImageFlowResult, int, error)

func (*Visual) ImageInpaint

func (p *Visual) ImageInpaint(form url.Values) (*model.ImageInpaintResult, int, error)

func (*Visual) ImageOutpaint

func (p *Visual) ImageOutpaint(form url.Values) (*model.ImageOutpaintResult, int, error)

func (*Visual) ImageScore

func (p *Visual) ImageScore(form url.Values) (*model.ImageScoreResult, int, error)

func (*Visual) ImageScoreV2

func (p *Visual) ImageScoreV2(imageBase64 []string) (*model.ImageScoreV2Result, int, error)

func (*Visual) ImageStyleConversion

func (p *Visual) ImageStyleConversion(form url.Values) (*model.ImageStyleConversionResult, int, error)

func (*Visual) Img2ImgAnime

func (p *Visual) Img2ImgAnime(req *model.Img2ImgAnimeRequest) (*model.Img2ImgAnimeResult, int, error)

func (*Visual) Img2ImgAnimeAcceleratedMaintainID added in v1.0.169

func (p *Visual) Img2ImgAnimeAcceleratedMaintainID(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgAnimeAcceleratedMaintainID 人像保持。接口文档:https://www.volcengine.com/docs/6791/1316308 bodyMap: 按照接口文档填写入参

func (*Visual) Img2ImgAnimeAcceleratedMaintainIDForSmartDrawingAnime added in v1.0.172

func (p *Visual) Img2ImgAnimeAcceleratedMaintainIDForSmartDrawingAnime(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgAnimeAcceleratedMaintainIDForSmartDrawingAnime 人像保持。接口文档:https://www.volcengine.com/docs/6793/1324393 bodyMap: 按照接口文档填写入参

func (*Visual) Img2ImgInpainting added in v1.0.154

func (p *Visual) Img2ImgInpainting(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgInpainting 涂抹消除。接口文档:https://www.volcengine.com/docs/6791/1223709 bodyMap: 按照接口文档填写入参

func (*Visual) Img2ImgInpaintingEdit added in v1.0.154

func (p *Visual) Img2ImgInpaintingEdit(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgInpaintingEdit 涂抹编辑。接口文档:https://www.volcengine.com/docs/6791/1223721 bodyMap: 按照接口文档填写入参

func (*Visual) Img2ImgOutpainting added in v1.0.154

func (p *Visual) Img2ImgOutpainting(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgOutpainting 智能扩图。接口文档:https://www.volcengine.com/docs/6791/1223722 bodyMap: 按照接口文档填写入参

func (*Visual) Img2ImgStyle

func (p *Visual) Img2ImgStyle(req *model.Img2ImgStyleRequest) (*model.Img2ImgStyleResult, int, error)

func (*Visual) Img2ImgXLSft added in v1.0.172

func (p *Visual) Img2ImgXLSft(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Img2ImgXLSft 通用XL pro-图生图。接口文档:https://www.volcengine.com/docs/6791/1330203 bodyMap: 按照接口文档填写入参

func (*Visual) Img2Video3D

func (p *Visual) Img2Video3D(req *model.Img2Video3DRequest) (*model.Img2Video3DResult, int, error)

func (*Visual) JPCartoon

func (p *Visual) JPCartoon(form url.Values) (*model.JPCartoonResult, int, error)

func (*Visual) JPCartoonCut

func (p *Visual) JPCartoonCut(form url.Values) (*model.JPCartoonCutResult, int, error)

func (*Visual) LensVidaVideoGetResultV2 added in v1.0.103

func (*Visual) LensVidaVideoSubmitTaskV2 added in v1.0.103

func (*Visual) OCRApi

func (p *Visual) OCRApi(form url.Values, action string) (*model.OcrApiResult, int, error)

func (*Visual) OCRNormal

func (p *Visual) OCRNormal(form url.Values) (*model.OCRNormalResult, int, error)

func (*Visual) OverResolution

func (p *Visual) OverResolution(form url.Values) (*model.OverResolutionResult, int, error)

func (*Visual) OverResolutionV2

func (p *Visual) OverResolutionV2(imageBase64 []string) (*model.OverResolutionV2Result, int, error)

func (*Visual) PoemMaterial

func (p *Visual) PoemMaterial(form url.Values) (*model.PoemMaterialResult, int, error)

func (*Visual) PotraitEffect

func (p *Visual) PotraitEffect(form url.Values) (*model.PotraitEffectResult, int, error)

func (*Visual) SaliencySeg added in v1.0.172

func (p *Visual) SaliencySeg(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

SaliencySeg bodyMap: 按照接口文档填写入参

func (*Visual) SetHost

func (p *Visual) SetHost(host string)

SetHost .

func (*Visual) SetRegion

func (p *Visual) SetRegion(region string)

SetRegion

func (*Visual) SetSchema

func (p *Visual) SetSchema(schema string)

SetSchema .

func (*Visual) SkySegment

func (p *Visual) SkySegment(form url.Values) (*model.SkySegmentResult, int, error)

func (*Visual) StretchRecovery

func (p *Visual) StretchRecovery(form url.Values) (*model.StretchRecoveryResult, int, error)

func (*Visual) T2ILDM

func (p *Visual) T2ILDM(req *model.T2ILDMRequest) (*model.T2ILDMResult, int, error)

func (*Visual) Taibao

func (p *Visual) Taibao(form url.Values) (*model.TaibaoResult, int, error)

func (*Visual) Text2ImgXLSft added in v1.0.172

func (p *Visual) Text2ImgXLSft(bodyMap map[string]interface{}) (*model.VisualPubResult, int, error)

Text2ImgXLSft 通用XL pro-文生图。接口文档:https://www.volcengine.com/docs/6791/1330195 bodyMap: 按照接口文档填写入参

func (*Visual) ThreeDGameCartoon

func (p *Visual) ThreeDGameCartoon(form url.Values) (*model.ThreeDGameCartoonResult, int, error)

func (*Visual) VehicleLicense

func (p *Visual) VehicleLicense(form url.Values) (*model.VehicleLicenseResult, int, error)

func (*Visual) VideoCoverSelection

func (p *Visual) VideoCoverSelection(form url.Values) (*model.VideoCoverSelectResult, int, error)

func (*Visual) VideoInpaintQueryTask

func (p *Visual) VideoInpaintQueryTask(query url.Values) (*model.VideoEditQueryTaskResult, int, error)

func (*Visual) VideoInpaintSubmitTask

func (p *Visual) VideoInpaintSubmitTask(form url.Values) (*model.VideoEditSubmitTaskResult, int, error)

func (*Visual) VideoOverResolutionQueryTask

func (p *Visual) VideoOverResolutionQueryTask(query url.Values) (*model.VideoEditQueryTaskResult, int, error)

func (*Visual) VideoOverResolutionSubmitTask

func (p *Visual) VideoOverResolutionSubmitTask(form url.Values) (*model.VideoEditSubmitTaskResult, int, error)

func (*Visual) VideoRetargetingQueryTask

func (p *Visual) VideoRetargetingQueryTask(query url.Values) (*model.VideoEditQueryTaskResult, int, error)

func (*Visual) VideoRetargetingSubmitTask

func (p *Visual) VideoRetargetingSubmitTask(form url.Values) (*model.VideoEditSubmitTaskResult, int, error)

func (*Visual) VideoSceneDetect

func (p *Visual) VideoSceneDetect(form url.Values) (*model.VideoSceneDetectResult, int, error)

func (*Visual) VideoSummarizationQueryTask

func (p *Visual) VideoSummarizationQueryTask(query url.Values) (*model.VideoEditQueryTaskResult, int, error)

func (*Visual) VideoSummarizationSubmitTask

func (p *Visual) VideoSummarizationSubmitTask(form url.Values) (*model.VideoEditSubmitTaskResult, int, error)

func (*Visual) VisualCommonFormAPI added in v1.0.172

func (p *Visual) VisualCommonFormAPI(form url.Values) (*model.VisualPubResult, int, error)

VisualCommonFormAPI 通用请求form类型 form: 按照接口文档填写入参

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL