v20220927

package
v3.0.1088+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Insufficient balance, failed to open, please recharge and open again.
	FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"

	// The face corresponding to the specified ID does not exist in the video.
	FAILEDOPERATION_FACEIDNOTINVIDEO = "FailedOperation.FaceIdNotInVideo"

	// The face was filtered because it was too small. It is recommended that the face size is not less than 34x34 pixels.
	FAILEDOPERATION_FACESIZETOOSMALL = "FailedOperation.FaceSizeTooSmall"

	// The material has not been reviewed.
	FAILEDOPERATION_FUSEMATERIALNOTAUTH = "FailedOperation.FuseMaterialNotAuth"

	// The material in this state cannot be used.
	FAILEDOPERATION_FUSEMATERIALNOTAVAILABLE = "FailedOperation.FuseMaterialNotAvailable"

	// The material does not exist.
	FAILEDOPERATION_FUSEMATERIALNOTEXIST = "FailedOperation.FuseMaterialNotExist"

	// Image decoding failed.
	FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed"

	// Image download failed.
	FAILEDOPERATION_IMAGEDOWNLOADERROR = "FailedOperation.ImageDownloadError"

	// The image size is too large. It is recommended to resize the image to below 2,000x2,000 pixels.
	FAILEDOPERATION_IMAGERESOLUTIONEXCEED = "FailedOperation.ImageResolutionExceed"

	// The short edge resolution of the image is lower than 64 pixels.
	FAILEDOPERATION_IMAGERESOLUTIONTOOSMALL = "FailedOperation.ImageResolutionTooSmall"

	// The image after Base64 encoding exceeds in size.
	FAILEDOPERATION_IMAGESIZEEXCEED = "FailedOperation.ImageSizeExceed"

	// The image size is too large or too small and does not meet algorithm requirements.
	FAILEDOPERATION_IMAGESIZEINVALID = "FailedOperation.ImageSizeInvalid"

	// Internal service error.
	FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"

	// The task has been canceled. Please submit the task again.
	FAILEDOPERATION_JOBHASBEENCANCELED = "FailedOperation.JobHasBeenCanceled"

	// The task does not exist.
	FAILEDOPERATION_JOBNOTEXIST = "FailedOperation.JobNotExist"

	// The face cannot be detected because the face box is too small.
	FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"

	// Parameter or value is invalid.
	FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"

	// The authorization fee is not paid for the activity, or the activity has been disabled.
	FAILEDOPERATION_PROJECTNOTAUTH = "FailedOperation.ProjectNotAuth"

	// The backend service timed out.
	FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"

	// RPC request failed, typically due to algorithm service malfunction.
	FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"

	// The material face ID does not exist.
	FAILEDOPERATION_TEMPLATEFACEIDNOTEXIST = "FailedOperation.TemplateFaceIDNotExist"

	// Internal error.
	FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"

	// Unknown error.
	FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"

	// Activity ID is not found.
	INVALIDPARAMETERVALUE_ACTIVITYIDNOTFOUND = "InvalidParameterValue.ActivityIdNotFound"

	// Face box parameters are invalid, or the face box is too small.
	INVALIDPARAMETERVALUE_FACERECTPARAMETERVALUEERROR = "InvalidParameterValue.FaceRectParameterValueError"

	// No material ID is found.
	INVALIDPARAMETERVALUE_MATERIALIDNOTFOUND = "InvalidParameterValue.MaterialIdNotFound"

	// The URL format is invalid.
	INVALIDPARAMETERVALUE_URLILLEGAL = "InvalidParameterValue.UrlIllegal"

	// The number of requests exceeded the rate limit.
	REQUESTLIMITEXCEEDED = "RequestLimitExceeded"

	// Resources are insufficient.
	RESOURCEINSUFFICIENT = "ResourceInsufficient"

	// The resource does not exist.
	RESOURCENOTFOUND = "ResourceNotFound"

	// The account has been frozen.
	RESOURCEUNAVAILABLE_FREEZE = "ResourceUnavailable.Freeze"

	// The account is in arrears.
	RESOURCEUNAVAILABLE_INARREARS = "ResourceUnavailable.InArrears"

	// The service is being opened, please wait.
	RESOURCEUNAVAILABLE_ISOPENING = "ResourceUnavailable.IsOpening"

	// The billing status is unknown. Check whether the service has been activated in the console.
	RESOURCEUNAVAILABLE_NOTEXIST = "ResourceUnavailable.NotExist"

	// The resource has been possessed.
	RESOURCEUNAVAILABLE_RECOVER = "ResourceUnavailable.Recover"

	// Services for the account has been stopped.
	RESOURCEUNAVAILABLE_STOPUSING = "ResourceUnavailable.StopUsing"
)
View Source
const APIVersion = "2022-09-27"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) FuseFace

func (c *Client) FuseFace(request *FuseFaceRequest) (response *FuseFaceResponse, err error)

FuseFace This API is used to perform the fusion of a single face, multiple faces, and specified faces with the material template by uploading face images. Users can add logos to generated images. See <a href="https://intl.cloud.tencent.com/document/product/670/38247?from_cn_redirect=1" target="_blank">Fusion Access Guide</a>.

- The signature method in the public parameters must be specified as the V3 version. In other words, set the SignatureMethod parameter to TC3-HMAC-SHA256.

error code that may be returned:

FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
FAILEDOPERATION_FACESIZETOOSMALL = "FailedOperation.FaceSizeTooSmall"
FAILEDOPERATION_FUSEMATERIALNOTAUTH = "FailedOperation.FuseMaterialNotAuth"
FAILEDOPERATION_FUSEMATERIALNOTEXIST = "FailedOperation.FuseMaterialNotExist"
FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed"
FAILEDOPERATION_IMAGEDOWNLOADERROR = "FailedOperation.ImageDownloadError"
FAILEDOPERATION_IMAGERESOLUTIONTOOSMALL = "FailedOperation.ImageResolutionTooSmall"
FAILEDOPERATION_IMAGESIZEEXCEED = "FailedOperation.ImageSizeExceed"
FAILEDOPERATION_IMAGESIZEINVALID = "FailedOperation.ImageSizeInvalid"
FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_TEMPLATEFACEIDNOTEXIST = "FailedOperation.TemplateFaceIDNotExist"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"
INVALIDPARAMETERVALUE_ACTIVITYIDNOTFOUND = "InvalidParameterValue.ActivityIdNotFound"
INVALIDPARAMETERVALUE_FACERECTPARAMETERVALUEERROR = "InvalidParameterValue.FaceRectParameterValueError"
INVALIDPARAMETERVALUE_MATERIALIDNOTFOUND = "InvalidParameterValue.MaterialIdNotFound"
INVALIDPARAMETERVALUE_URLILLEGAL = "InvalidParameterValue.UrlIllegal"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEINSUFFICIENT = "ResourceInsufficient"
RESOURCENOTFOUND = "ResourceNotFound"
RESOURCEUNAVAILABLE_FREEZE = "ResourceUnavailable.Freeze"
RESOURCEUNAVAILABLE_INARREARS = "ResourceUnavailable.InArrears"
RESOURCEUNAVAILABLE_ISOPENING = "ResourceUnavailable.IsOpening"
RESOURCEUNAVAILABLE_NOTEXIST = "ResourceUnavailable.NotExist"
RESOURCEUNAVAILABLE_RECOVER = "ResourceUnavailable.Recover"
RESOURCEUNAVAILABLE_STOPUSING = "ResourceUnavailable.StopUsing"

func (*Client) FuseFaceWithContext

func (c *Client) FuseFaceWithContext(ctx context.Context, request *FuseFaceRequest) (response *FuseFaceResponse, err error)

FuseFace This API is used to perform the fusion of a single face, multiple faces, and specified faces with the material template by uploading face images. Users can add logos to generated images. See <a href="https://intl.cloud.tencent.com/document/product/670/38247?from_cn_redirect=1" target="_blank">Fusion Access Guide</a>.

- The signature method in the public parameters must be specified as the V3 version. In other words, set the SignatureMethod parameter to TC3-HMAC-SHA256.

error code that may be returned:

FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
FAILEDOPERATION_FACESIZETOOSMALL = "FailedOperation.FaceSizeTooSmall"
FAILEDOPERATION_FUSEMATERIALNOTAUTH = "FailedOperation.FuseMaterialNotAuth"
FAILEDOPERATION_FUSEMATERIALNOTEXIST = "FailedOperation.FuseMaterialNotExist"
FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed"
FAILEDOPERATION_IMAGEDOWNLOADERROR = "FailedOperation.ImageDownloadError"
FAILEDOPERATION_IMAGERESOLUTIONTOOSMALL = "FailedOperation.ImageResolutionTooSmall"
FAILEDOPERATION_IMAGESIZEEXCEED = "FailedOperation.ImageSizeExceed"
FAILEDOPERATION_IMAGESIZEINVALID = "FailedOperation.ImageSizeInvalid"
FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_TEMPLATEFACEIDNOTEXIST = "FailedOperation.TemplateFaceIDNotExist"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"
INVALIDPARAMETERVALUE_ACTIVITYIDNOTFOUND = "InvalidParameterValue.ActivityIdNotFound"
INVALIDPARAMETERVALUE_FACERECTPARAMETERVALUEERROR = "InvalidParameterValue.FaceRectParameterValueError"
INVALIDPARAMETERVALUE_MATERIALIDNOTFOUND = "InvalidParameterValue.MaterialIdNotFound"
INVALIDPARAMETERVALUE_URLILLEGAL = "InvalidParameterValue.UrlIllegal"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEINSUFFICIENT = "ResourceInsufficient"
RESOURCENOTFOUND = "ResourceNotFound"
RESOURCEUNAVAILABLE_FREEZE = "ResourceUnavailable.Freeze"
RESOURCEUNAVAILABLE_INARREARS = "ResourceUnavailable.InArrears"
RESOURCEUNAVAILABLE_ISOPENING = "ResourceUnavailable.IsOpening"
RESOURCEUNAVAILABLE_NOTEXIST = "ResourceUnavailable.NotExist"
RESOURCEUNAVAILABLE_RECOVER = "ResourceUnavailable.Recover"
RESOURCEUNAVAILABLE_STOPUSING = "ResourceUnavailable.StopUsing"

func (*Client) QueryVideoFaceFusionJob

func (c *Client) QueryVideoFaceFusionJob(request *QueryVideoFaceFusionJobRequest) (response *QueryVideoFaceFusionJobResponse, err error)

QueryVideoFaceFusionJob This API is used to query the progress and status of video face fusion tasks by Job ID.

error code that may be returned:

FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_JOBHASBEENCANCELED = "FailedOperation.JobHasBeenCanceled"
FAILEDOPERATION_JOBNOTEXIST = "FailedOperation.JobNotExist"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"

func (*Client) QueryVideoFaceFusionJobWithContext

func (c *Client) QueryVideoFaceFusionJobWithContext(ctx context.Context, request *QueryVideoFaceFusionJobRequest) (response *QueryVideoFaceFusionJobResponse, err error)

QueryVideoFaceFusionJob This API is used to query the progress and status of video face fusion tasks by Job ID.

error code that may be returned:

FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_JOBHASBEENCANCELED = "FailedOperation.JobHasBeenCanceled"
FAILEDOPERATION_JOBNOTEXIST = "FailedOperation.JobNotExist"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"

func (*Client) SubmitVideoFaceFusionJob

func (c *Client) SubmitVideoFaceFusionJob(request *SubmitVideoFaceFusionJobRequest) (response *SubmitVideoFaceFusionJobResponse, err error)

SubmitVideoFaceFusionJob This API is used to submit asynchronous processing tasks of video face fusion. After a task is submitted, the Job ID, estimated completion time, and current queue length will be returned.

error code that may be returned:

FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
FAILEDOPERATION_FACEIDNOTINVIDEO = "FailedOperation.FaceIdNotInVideo"
FAILEDOPERATION_FACESIZETOOSMALL = "FailedOperation.FaceSizeTooSmall"
FAILEDOPERATION_FUSEMATERIALNOTAUTH = "FailedOperation.FuseMaterialNotAuth"
FAILEDOPERATION_FUSEMATERIALNOTAVAILABLE = "FailedOperation.FuseMaterialNotAvailable"
FAILEDOPERATION_FUSEMATERIALNOTEXIST = "FailedOperation.FuseMaterialNotExist"
FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed"
FAILEDOPERATION_IMAGEDOWNLOADERROR = "FailedOperation.ImageDownloadError"
FAILEDOPERATION_IMAGERESOLUTIONEXCEED = "FailedOperation.ImageResolutionExceed"
FAILEDOPERATION_IMAGERESOLUTIONTOOSMALL = "FailedOperation.ImageResolutionTooSmall"
FAILEDOPERATION_IMAGESIZEEXCEED = "FailedOperation.ImageSizeExceed"
FAILEDOPERATION_IMAGESIZEINVALID = "FailedOperation.ImageSizeInvalid"
FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_PROJECTNOTAUTH = "FailedOperation.ProjectNotAuth"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"
INVALIDPARAMETERVALUE_FACERECTPARAMETERVALUEERROR = "InvalidParameterValue.FaceRectParameterValueError"
INVALIDPARAMETERVALUE_URLILLEGAL = "InvalidParameterValue.UrlIllegal"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEINSUFFICIENT = "ResourceInsufficient"
RESOURCENOTFOUND = "ResourceNotFound"
RESOURCEUNAVAILABLE_FREEZE = "ResourceUnavailable.Freeze"
RESOURCEUNAVAILABLE_INARREARS = "ResourceUnavailable.InArrears"
RESOURCEUNAVAILABLE_ISOPENING = "ResourceUnavailable.IsOpening"
RESOURCEUNAVAILABLE_NOTEXIST = "ResourceUnavailable.NotExist"
RESOURCEUNAVAILABLE_RECOVER = "ResourceUnavailable.Recover"
RESOURCEUNAVAILABLE_STOPUSING = "ResourceUnavailable.StopUsing"

func (*Client) SubmitVideoFaceFusionJobWithContext

func (c *Client) SubmitVideoFaceFusionJobWithContext(ctx context.Context, request *SubmitVideoFaceFusionJobRequest) (response *SubmitVideoFaceFusionJobResponse, err error)

SubmitVideoFaceFusionJob This API is used to submit asynchronous processing tasks of video face fusion. After a task is submitted, the Job ID, estimated completion time, and current queue length will be returned.

error code that may be returned:

FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
FAILEDOPERATION_FACEIDNOTINVIDEO = "FailedOperation.FaceIdNotInVideo"
FAILEDOPERATION_FACESIZETOOSMALL = "FailedOperation.FaceSizeTooSmall"
FAILEDOPERATION_FUSEMATERIALNOTAUTH = "FailedOperation.FuseMaterialNotAuth"
FAILEDOPERATION_FUSEMATERIALNOTAVAILABLE = "FailedOperation.FuseMaterialNotAvailable"
FAILEDOPERATION_FUSEMATERIALNOTEXIST = "FailedOperation.FuseMaterialNotExist"
FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed"
FAILEDOPERATION_IMAGEDOWNLOADERROR = "FailedOperation.ImageDownloadError"
FAILEDOPERATION_IMAGERESOLUTIONEXCEED = "FailedOperation.ImageResolutionExceed"
FAILEDOPERATION_IMAGERESOLUTIONTOOSMALL = "FailedOperation.ImageResolutionTooSmall"
FAILEDOPERATION_IMAGESIZEEXCEED = "FailedOperation.ImageSizeExceed"
FAILEDOPERATION_IMAGESIZEINVALID = "FailedOperation.ImageSizeInvalid"
FAILEDOPERATION_INNERERROR = "FailedOperation.InnerError"
FAILEDOPERATION_NOFACEDETECTED = "FailedOperation.NoFaceDetected"
FAILEDOPERATION_PARAMETERVALUEERROR = "FailedOperation.ParameterValueError"
FAILEDOPERATION_PROJECTNOTAUTH = "FailedOperation.ProjectNotAuth"
FAILEDOPERATION_REQUESTTIMEOUT = "FailedOperation.RequestTimeout"
FAILEDOPERATION_RPCFAIL = "FailedOperation.RpcFail"
FAILEDOPERATION_UNKNOWERROR = "FailedOperation.UnKnowError"
FAILEDOPERATION_UNKNOWN = "FailedOperation.Unknown"
INVALIDPARAMETERVALUE_FACERECTPARAMETERVALUEERROR = "InvalidParameterValue.FaceRectParameterValueError"
INVALIDPARAMETERVALUE_URLILLEGAL = "InvalidParameterValue.UrlIllegal"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEINSUFFICIENT = "ResourceInsufficient"
RESOURCENOTFOUND = "ResourceNotFound"
RESOURCEUNAVAILABLE_FREEZE = "ResourceUnavailable.Freeze"
RESOURCEUNAVAILABLE_INARREARS = "ResourceUnavailable.InArrears"
RESOURCEUNAVAILABLE_ISOPENING = "ResourceUnavailable.IsOpening"
RESOURCEUNAVAILABLE_NOTEXIST = "ResourceUnavailable.NotExist"
RESOURCEUNAVAILABLE_RECOVER = "ResourceUnavailable.Recover"
RESOURCEUNAVAILABLE_STOPUSING = "ResourceUnavailable.StopUsing"

type FaceRect

type FaceRect struct {
	// Top-left X-axis coordinate of the face box
	X *int64 `json:"X,omitnil,omitempty" name:"X"`

	// Top-left Y-axis coordinate of the face box
	Y *int64 `json:"Y,omitnil,omitempty" name:"Y"`

	// Face box width
	Width *int64 `json:"Width,omitnil,omitempty" name:"Width"`

	// Face box height
	Height *int64 `json:"Height,omitnil,omitempty" name:"Height"`
}

type FuseFaceRequest

type FuseFaceRequest struct {
	*tchttp.BaseRequest

	// Activity ID. Check the ID in the <a href="https://console.cloud.tencent.com/facefusion" target="_blank"> Face Fusion console</a>.
	ProjectId *string `json:"ProjectId,omitnil,omitempty" name:"ProjectId"`

	// Material ID. Check the ID in the <a href="https://console.cloud.tencent.com/facefusion" target="_blank"> Face Fusion console</a>.
	ModelId *string `json:"ModelId,omitnil,omitempty" name:"ModelId"`

	// Image return method (url or base64). You cannot use both methods at the same time. The URL is valid for 7 days.
	RspImgType *string `json:"RspImgType,omitnil,omitempty" name:"RspImgType"`

	// Face position information on the user face image and material template image. No more than 6 entries.
	MergeInfos []*MergeInfo `json:"MergeInfos,omitnil,omitempty" name:"MergeInfos"`

	// Switch indicating whether to add a synthesis logo to the fusion result image. Default value: 1.
	// 1: add logo
	// 0: do not add logo
	// Other values: add logo
	// It is recommended to use an obvious logo to indicate that the result image uses face fusion technology and is synthesized by AI.
	LogoAdd *int64 `json:"LogoAdd,omitnil,omitempty" name:"LogoAdd"`

	// Logo content settings
	// By default, the text "Synthesized by AI" is added to the bottom right corner of the fusion result image. You can also use other texts.
	LogoParam *LogoParam `json:"LogoParam,omitnil,omitempty" name:"LogoParam"`

	// Fusion parameter.
	FuseParam *FuseParam `json:"FuseParam,omitnil,omitempty" name:"FuseParam"`
}

func NewFuseFaceRequest

func NewFuseFaceRequest() (request *FuseFaceRequest)

func (*FuseFaceRequest) FromJsonString

func (r *FuseFaceRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*FuseFaceRequest) ToJsonString

func (r *FuseFaceRequest) ToJsonString() string

type FuseFaceRequestParams

type FuseFaceRequestParams struct {
	// Activity ID. Check the ID in the <a href="https://console.cloud.tencent.com/facefusion" target="_blank"> Face Fusion console</a>.
	ProjectId *string `json:"ProjectId,omitnil,omitempty" name:"ProjectId"`

	// Material ID. Check the ID in the <a href="https://console.cloud.tencent.com/facefusion" target="_blank"> Face Fusion console</a>.
	ModelId *string `json:"ModelId,omitnil,omitempty" name:"ModelId"`

	// Image return method (url or base64). You cannot use both methods at the same time. The URL is valid for 7 days.
	RspImgType *string `json:"RspImgType,omitnil,omitempty" name:"RspImgType"`

	// Face position information on the user face image and material template image. No more than 6 entries.
	MergeInfos []*MergeInfo `json:"MergeInfos,omitnil,omitempty" name:"MergeInfos"`

	// Switch indicating whether to add a synthesis logo to the fusion result image. Default value: 1.
	// 1: add logo
	// 0: do not add logo
	// Other values: add logo
	// It is recommended to use an obvious logo to indicate that the result image uses face fusion technology and is synthesized by AI.
	LogoAdd *int64 `json:"LogoAdd,omitnil,omitempty" name:"LogoAdd"`

	// Logo content settings
	// By default, the text "Synthesized by AI" is added to the bottom right corner of the fusion result image. You can also use other texts.
	LogoParam *LogoParam `json:"LogoParam,omitnil,omitempty" name:"LogoParam"`

	// Fusion parameter.
	FuseParam *FuseParam `json:"FuseParam,omitnil,omitempty" name:"FuseParam"`
}

Predefined struct for user

type FuseFaceResponse

type FuseFaceResponse struct {
	*tchttp.BaseResponse
	Response *FuseFaceResponseParams `json:"Response"`
}

func NewFuseFaceResponse

func NewFuseFaceResponse() (response *FuseFaceResponse)

func (*FuseFaceResponse) FromJsonString

func (r *FuseFaceResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*FuseFaceResponse) ToJsonString

func (r *FuseFaceResponse) ToJsonString() string

type FuseFaceResponseParams

type FuseFaceResponseParams struct {
	// When RspImgType is set to url, return the URL (valid for 7 days). When RspImgType is set to base64, return the Base64 code.
	FusedImage *string `json:"FusedImage,omitnil,omitempty" name:"FusedImage"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type FuseFaceReviewDetail

type FuseFaceReviewDetail struct {
	Field *string `json:"Field,omitnil,omitempty" name:"Field"`

	Label *string `json:"Label,omitnil,omitempty" name:"Label"`

	Confidence *float64 `json:"Confidence,omitnil,omitempty" name:"Confidence"`

	Suggestion *string `json:"Suggestion,omitnil,omitempty" name:"Suggestion"`
}

type FuseFaceReviewResult

type FuseFaceReviewResult struct {
	Category *string `json:"Category,omitnil,omitempty" name:"Category"`

	Code *string `json:"Code,omitnil,omitempty" name:"Code"`

	CodeDescription *string `json:"CodeDescription,omitnil,omitempty" name:"CodeDescription"`

	Confidence *float64 `json:"Confidence,omitnil,omitempty" name:"Confidence"`

	Suggestion *string `json:"Suggestion,omitnil,omitempty" name:"Suggestion"`

	DetailSet []*FuseFaceReviewDetail `json:"DetailSet,omitnil,omitempty" name:"DetailSet"`
}

type FuseParam

type FuseParam struct {
	// Image encoding parameter
	ImageCodecParam *ImageCodecParam `json:"ImageCodecParam,omitnil,omitempty" name:"ImageCodecParam"`
}

type ImageCodecParam

type ImageCodecParam struct {
	// Metadata. The number of metadata entries cannot exceed 1.
	MetaData []*MetaData `json:"MetaData,omitnil,omitempty" name:"MetaData"`
}

type LogoParam

type LogoParam struct {
	// Coordinates of the logo image in the fusion result image. The logo image will be stretched according to the coordinates.
	LogoRect *FaceRect `json:"LogoRect,omitnil,omitempty" name:"LogoRect"`

	// Logo image URL
	// ●Either the Base64 code or URL must be provided. If both are provided, URL prevails.
	// ●Supported image format: JPG or PNG
	LogoUrl *string `json:"LogoUrl,omitnil,omitempty" name:"LogoUrl"`

	// Logo image Base64 code
	// ●Either the Base64 code or URL must be provided. If both are provided, URL prevails.
	// ●Supported image format: JPG or PNG
	LogoImage *string `json:"LogoImage,omitnil,omitempty" name:"LogoImage"`
}

type MergeInfo

type MergeInfo struct {
	// Enter the image Base64 code.
	// ●Either the Base64 code or URL must be provided. If both are provided, URL prevails.
	// ●Material image limitation: face size in the image greater than 34×34 pixels; image size greater than 64×64 pixels. (After encoding, the image size may increase by about 30%. It is recommended to control the image size reasonably.)
	// ●Supported image format: JPG or PNG
	Image *string `json:"Image,omitnil,omitempty" name:"Image"`

	// Enter the image URL.
	// ●Either the Base64 code or URL must be provided. If both are provided, URL prevails.
	// ●Material image limitation: face size in the image greater than 34×34 pixels; image size greater than 64×64 pixels. (After encoding, the image size may increase by about 30%. It is recommended to control the image size reasonably.)
	// ●Supported image format: JPG or PNG
	Url *string `json:"Url,omitnil,omitempty" name:"Url"`

	// Face position information (face box) on the uploaded image
	// Width and height are no less than 30.
	InputImageFaceRect *FaceRect `json:"InputImageFaceRect,omitnil,omitempty" name:"InputImageFaceRect"`

	// Material face ID. If this parameter is left blank, the largest face is used by default.
	TemplateFaceID *string `json:"TemplateFaceID,omitnil,omitempty" name:"TemplateFaceID"`

	// Face position information (face box) on the template. If this parameter is left blank, the largest face is used by default. This parameter applies to scenes where custom material templates are used for fusion.
	// Width and height are no less than 30.
	TemplateFaceRect *FaceRect `json:"TemplateFaceRect,omitnil,omitempty" name:"TemplateFaceRect"`
}

type MetaData

type MetaData struct {
	// Metadata key
	MetaKey *string `json:"MetaKey,omitnil,omitempty" name:"MetaKey"`

	// Metadata value
	MetaValue *string `json:"MetaValue,omitnil,omitempty" name:"MetaValue"`
}

type QueryVideoFaceFusionJobRequest

type QueryVideoFaceFusionJobRequest struct {
	*tchttp.BaseRequest

	// Job ID of the video face fusion task
	JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`
}

func NewQueryVideoFaceFusionJobRequest

func NewQueryVideoFaceFusionJobRequest() (request *QueryVideoFaceFusionJobRequest)

func (*QueryVideoFaceFusionJobRequest) FromJsonString

func (r *QueryVideoFaceFusionJobRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryVideoFaceFusionJobRequest) ToJsonString

func (r *QueryVideoFaceFusionJobRequest) ToJsonString() string

type QueryVideoFaceFusionJobRequestParams

type QueryVideoFaceFusionJobRequestParams struct {
	// Job ID of the video face fusion task
	JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`
}

Predefined struct for user

type QueryVideoFaceFusionJobResponse

type QueryVideoFaceFusionJobResponse struct {
	*tchttp.BaseResponse
	Response *QueryVideoFaceFusionJobResponseParams `json:"Response"`
}

func NewQueryVideoFaceFusionJobResponse

func NewQueryVideoFaceFusionJobResponse() (response *QueryVideoFaceFusionJobResponse)

func (*QueryVideoFaceFusionJobResponse) FromJsonString

func (r *QueryVideoFaceFusionJobResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryVideoFaceFusionJobResponse) ToJsonString

func (r *QueryVideoFaceFusionJobResponse) ToJsonString() string

type QueryVideoFaceFusionJobResponseParams

type QueryVideoFaceFusionJobResponseParams struct {
	// Current task status: queuing, processing, processing failed, or processing completed
	JobStatus *string `json:"JobStatus,omitnil,omitempty" name:"JobStatus"`

	// Video face fusion result
	// Note: This field may return null, indicating that no valid values can be obtained.
	VideoFaceFusionOutput *VideoFaceFusionOutput `json:"VideoFaceFusionOutput,omitnil,omitempty" name:"VideoFaceFusionOutput"`

	// Task status code. 1: queuing; 3: processing; 5: processing failed; 7: processing completed.
	// Note: This field may return null, indicating that no valid values can be obtained.
	JobStatusCode *int64 `json:"JobStatusCode,omitnil,omitempty" name:"JobStatusCode"`

	// Task failure error code
	// Note: This field may return null, indicating that no valid values can be obtained.
	JobErrorCode *string `json:"JobErrorCode,omitnil,omitempty" name:"JobErrorCode"`

	// Task failure error message
	// Note: This field may return null, indicating that no valid values can be obtained.
	JobErrorMsg *string `json:"JobErrorMsg,omitnil,omitempty" name:"JobErrorMsg"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type SubmitVideoFaceFusionJobRequest

type SubmitVideoFaceFusionJobRequest struct {
	*tchttp.BaseRequest

	// Activity ID. Check it in the video face fusion console.
	ProjectId *string `json:"ProjectId,omitnil,omitempty" name:"ProjectId"`

	// Material ID. Check it in the video face fusion console.
	ModelId *string `json:"ModelId,omitnil,omitempty" name:"ModelId"`

	// Face position information on the user face image and material template image. Only one entry is allowed.
	MergeInfos []*MergeInfo `json:"MergeInfos,omitnil,omitempty" name:"MergeInfos"`

	// 0: inappropriate content recognition not required; 1: inappropriate content recognition required. Default value: 0.
	// Note: Once the inappropriate content recognition service is enabled, you need to decide whether to adjust your business logic based on the returned results. For example, you need to replace the image if the system informs you that the image does not meet the requirements.
	// **<font color=#1E90FF>Note: This field will be deprecated later due to business adjustments. It is not recommended for use.</font>**
	CelebrityIdentify *int64 `json:"CelebrityIdentify,omitnil,omitempty" name:"CelebrityIdentify"`

	// Video watermark logo parameter
	LogoParam *LogoParam `json:"LogoParam,omitnil,omitempty" name:"LogoParam"`

	// COS pre-signed URL (PUT method). If this parameter is specified, the video after fusion will be uploaded to this URL.
	// **<font color=#1E90FF>Note: If upload to this URL fails, the video will be uploaded to the default address of Tencent Cloud.</font>**
	UserDesignatedUrl *string `json:"UserDesignatedUrl,omitnil,omitempty" name:"UserDesignatedUrl"`

	// User IP address
	UserIp *string `json:"UserIp,omitnil,omitempty" name:"UserIp"`

	// Video metadata field
	MetaData []*MetaData `json:"MetaData,omitnil,omitempty" name:"MetaData"`
}

func NewSubmitVideoFaceFusionJobRequest

func NewSubmitVideoFaceFusionJobRequest() (request *SubmitVideoFaceFusionJobRequest)

func (*SubmitVideoFaceFusionJobRequest) FromJsonString

func (r *SubmitVideoFaceFusionJobRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SubmitVideoFaceFusionJobRequest) ToJsonString

func (r *SubmitVideoFaceFusionJobRequest) ToJsonString() string

type SubmitVideoFaceFusionJobRequestParams

type SubmitVideoFaceFusionJobRequestParams struct {
	// Activity ID. Check it in the video face fusion console.
	ProjectId *string `json:"ProjectId,omitnil,omitempty" name:"ProjectId"`

	// Material ID. Check it in the video face fusion console.
	ModelId *string `json:"ModelId,omitnil,omitempty" name:"ModelId"`

	// Face position information on the user face image and material template image. Only one entry is allowed.
	MergeInfos []*MergeInfo `json:"MergeInfos,omitnil,omitempty" name:"MergeInfos"`

	// 0: inappropriate content recognition not required; 1: inappropriate content recognition required. Default value: 0.
	// Note: Once the inappropriate content recognition service is enabled, you need to decide whether to adjust your business logic based on the returned results. For example, you need to replace the image if the system informs you that the image does not meet the requirements.
	// **<font color=#1E90FF>Note: This field will be deprecated later due to business adjustments. It is not recommended for use.</font>**
	CelebrityIdentify *int64 `json:"CelebrityIdentify,omitnil,omitempty" name:"CelebrityIdentify"`

	// Video watermark logo parameter
	LogoParam *LogoParam `json:"LogoParam,omitnil,omitempty" name:"LogoParam"`

	// COS pre-signed URL (PUT method). If this parameter is specified, the video after fusion will be uploaded to this URL.
	// **<font color=#1E90FF>Note: If upload to this URL fails, the video will be uploaded to the default address of Tencent Cloud.</font>**
	UserDesignatedUrl *string `json:"UserDesignatedUrl,omitnil,omitempty" name:"UserDesignatedUrl"`

	// User IP address
	UserIp *string `json:"UserIp,omitnil,omitempty" name:"UserIp"`

	// Video metadata field
	MetaData []*MetaData `json:"MetaData,omitnil,omitempty" name:"MetaData"`
}

Predefined struct for user

type SubmitVideoFaceFusionJobResponse

type SubmitVideoFaceFusionJobResponse struct {
	*tchttp.BaseResponse
	Response *SubmitVideoFaceFusionJobResponseParams `json:"Response"`
}

func NewSubmitVideoFaceFusionJobResponse

func NewSubmitVideoFaceFusionJobResponse() (response *SubmitVideoFaceFusionJobResponse)

func (*SubmitVideoFaceFusionJobResponse) FromJsonString

func (r *SubmitVideoFaceFusionJobResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SubmitVideoFaceFusionJobResponse) ToJsonString

func (r *SubmitVideoFaceFusionJobResponse) ToJsonString() string

type SubmitVideoFaceFusionJobResponseParams

type SubmitVideoFaceFusionJobResponseParams struct {
	// Job ID of the video face fusion task
	JobId *string `json:"JobId,omitnil,omitempty" name:"JobId"`

	// Estimated processing time of the video face fusion task, in seconds
	EstimatedProcessTime *float64 `json:"EstimatedProcessTime,omitnil,omitempty" name:"EstimatedProcessTime"`

	// Estimated processing time of the video face fusion task, in seconds
	JobQueueLength *int64 `json:"JobQueueLength,omitnil,omitempty" name:"JobQueueLength"`

	// Inappropriate content recognition result. The element order of this array is the same as that of mergeinfo in the request, with a one-to-one relationship.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ReviewResultSet []*FuseFaceReviewResult `json:"ReviewResultSet,omitnil,omitempty" name:"ReviewResultSet"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type VideoFaceFusionOutput

type VideoFaceFusionOutput struct {
	// URL of the video output after video face fusion
	VideoUrl *string `json:"VideoUrl,omitnil,omitempty" name:"VideoUrl"`

	// MD5 value of the video output after video face fusion, which is used for verification
	VideoMD5 *string `json:"VideoMD5,omitnil,omitempty" name:"VideoMD5"`

	// Video width
	Width *int64 `json:"Width,omitnil,omitempty" name:"Width"`

	// Video height
	Height *int64 `json:"Height,omitnil,omitempty" name:"Height"`

	// Frames per second
	FPS *int64 `json:"FPS,omitnil,omitempty" name:"FPS"`

	// Video duration, in seconds
	DurationInSec *float64 `json:"DurationInSec,omitnil,omitempty" name:"DurationInSec"`

	// Number of frames
	Frame *int64 `json:"Frame,omitnil,omitempty" name:"Frame"`
}

Jump to

Keyboard shortcuts

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