Ver Fonte

IMM SDK Auto Released By guangchun.luo,Version:1.25.8

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy há 7 anos atrás
pai
commit
1f21f4d066

+ 6 - 0
ChangeLog.txt

@@ -1,3 +1,9 @@
+2018-08-21 Version: 1.25.8
+1, DeleteFaceSearchImageByIdRequest add field: srcUri(String).
+2, CreateFaceSetResponse  add field: faces(Long).
+3, GetFaceSetResponse add field: faces(Long).
+4, Fix class Blurness in IndexFaceResponse.
+
 2018-08-21 Version: 1.25.7
 1, Repair describeLaunchTemplateVersions securityEnhancementStrategy type
 

+ 106 - 0
services/imm/compare_face.go

@@ -0,0 +1,106 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CompareFace invokes the imm.CompareFace API synchronously
+// api document: https://help.aliyun.com/api/imm/compareface.html
+func (client *Client) CompareFace(request *CompareFaceRequest) (response *CompareFaceResponse, err error) {
+	response = CreateCompareFaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CompareFaceWithChan invokes the imm.CompareFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/compareface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CompareFaceWithChan(request *CompareFaceRequest) (<-chan *CompareFaceResponse, <-chan error) {
+	responseChan := make(chan *CompareFaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CompareFace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CompareFaceWithCallback invokes the imm.CompareFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/compareface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CompareFaceWithCallback(request *CompareFaceRequest, callback func(response *CompareFaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CompareFaceResponse
+		var err error
+		defer close(result)
+		response, err = client.CompareFace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CompareFaceRequest is the request struct for api CompareFace
+type CompareFaceRequest struct {
+	*requests.RpcRequest
+	SrcUriB string `position:"Query" name:"SrcUriB"`
+	SrcUriA string `position:"Query" name:"SrcUriA"`
+	Project string `position:"Query" name:"Project"`
+}
+
+// CompareFaceResponse is the response struct for api CompareFace
+type CompareFaceResponse struct {
+	*responses.BaseResponse
+	RequestId     string              `json:"RequestId" xml:"RequestId"`
+	CompareResult []CompareResultItem `json:"CompareResult" xml:"CompareResult"`
+}
+
+// CreateCompareFaceRequest creates a request to invoke CompareFace API
+func CreateCompareFaceRequest() (request *CompareFaceRequest) {
+	request = &CompareFaceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "CompareFace", "imm", "openAPI")
+	return
+}
+
+// CreateCompareFaceResponse creates a response to parse from CompareFace response
+func CreateCompareFaceResponse() (response *CompareFaceResponse) {
+	response = &CompareFaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/imm/create_face_set.go

@@ -88,6 +88,7 @@ type CreateFaceSetResponse struct {
 	Photos     int    `json:"Photos" xml:"Photos"`
 	CreateTime string `json:"CreateTime" xml:"CreateTime"`
 	ModifyTime string `json:"ModifyTime" xml:"ModifyTime"`
+	Faces      int    `json:"Faces" xml:"Faces"`
 }
 
 // CreateCreateFaceSetRequest creates a request to invoke CreateFaceSet API

+ 1 - 0
services/imm/delete_face_search_image_by_id.go

@@ -78,6 +78,7 @@ type DeleteFaceSearchImageByIdRequest struct {
 	*requests.RpcRequest
 	ImageId   string `position:"Query" name:"ImageId"`
 	Project   string `position:"Query" name:"Project"`
+	SrcUri    string `position:"Query" name:"SrcUri"`
 	GroupName string `position:"Query" name:"GroupName"`
 	User      string `position:"Query" name:"User"`
 }

+ 1 - 0
services/imm/detect_tag.go

@@ -77,6 +77,7 @@ func (client *Client) DetectTagWithCallback(request *DetectTagRequest, callback
 type DetectTagRequest struct {
 	*requests.RpcRequest
 	SrcUris string `position:"Query" name:"SrcUris"`
+	ModelId string `position:"Query" name:"ModelId"`
 	Project string `position:"Query" name:"Project"`
 }
 

+ 1 - 0
services/imm/get_face_set.go

@@ -89,6 +89,7 @@ type GetFaceSetResponse struct {
 	Photos     int    `json:"Photos" xml:"Photos"`
 	CreateTime string `json:"CreateTime" xml:"CreateTime"`
 	ModifyTime string `json:"ModifyTime" xml:"ModifyTime"`
+	Faces      int    `json:"Faces" xml:"Faces"`
 }
 
 // CreateGetFaceSetRequest creates a request to invoke GetFaceSet API

+ 1 - 0
services/imm/index_tag.go

@@ -77,6 +77,7 @@ func (client *Client) IndexTagWithCallback(request *IndexTagRequest, callback fu
 type IndexTagRequest struct {
 	*requests.RpcRequest
 	SrcUris string `position:"Query" name:"SrcUris"`
+	ModelId string `position:"Query" name:"ModelId"`
 	Project string `position:"Query" name:"Project"`
 	SetId   string `position:"Query" name:"SetId"`
 	Force   string `position:"Query" name:"Force"`

+ 125 - 0
services/imm/regist_face.go

@@ -0,0 +1,125 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RegistFace invokes the imm.RegistFace API synchronously
+// api document: https://help.aliyun.com/api/imm/registface.html
+func (client *Client) RegistFace(request *RegistFaceRequest) (response *RegistFaceResponse, err error) {
+	response = CreateRegistFaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RegistFaceWithChan invokes the imm.RegistFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/registface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RegistFaceWithChan(request *RegistFaceRequest) (<-chan *RegistFaceResponse, <-chan error) {
+	responseChan := make(chan *RegistFaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RegistFace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RegistFaceWithCallback invokes the imm.RegistFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/registface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RegistFaceWithCallback(request *RegistFaceRequest, callback func(response *RegistFaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RegistFaceResponse
+		var err error
+		defer close(result)
+		response, err = client.RegistFace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RegistFaceRequest is the request struct for api RegistFace
+type RegistFaceRequest struct {
+	*requests.RpcRequest
+	ChooseBiggestFace  requests.Boolean `position:"Query" name:"ChooseBiggestFace"`
+	IsQualityLimit     requests.Boolean `position:"Query" name:"IsQualityLimit"`
+	Project            string           `position:"Query" name:"Project"`
+	SrcUri             string           `position:"Query" name:"SrcUri"`
+	RegisterCheckLevel string           `position:"Query" name:"RegisterCheckLevel"`
+	GroupName          string           `position:"Query" name:"GroupName"`
+	User               string           `position:"Query" name:"User"`
+}
+
+// RegistFaceResponse is the response struct for api RegistFace
+type RegistFaceResponse struct {
+	*responses.BaseResponse
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	GroupId   string   `json:"GroupId" xml:"GroupId"`
+	ImageUrl  string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageMd5  string   `json:"ImageMd5" xml:"ImageMd5"`
+	ImageId   string   `json:"ImageId" xml:"ImageId"`
+	GroupName string   `json:"GroupName" xml:"GroupName"`
+	User      string   `json:"User" xml:"User"`
+	Roll      float64  `json:"Roll" xml:"Roll"`
+	FaceId    string   `json:"FaceId" xml:"FaceId"`
+	Yaw       string   `json:"Yaw" xml:"Yaw"`
+	Quality   float64  `json:"Quality" xml:"Quality"`
+	Glasses   int      `json:"Glasses" xml:"Glasses"`
+	Hat       int      `json:"Hat" xml:"Hat"`
+	Pitch     float64  `json:"Pitch" xml:"Pitch"`
+	Age       int      `json:"Age" xml:"Age"`
+	Gender    string   `json:"Gender" xml:"Gender"`
+	Axis      []string `json:"Axis" xml:"Axis"`
+}
+
+// CreateRegistFaceRequest creates a request to invoke RegistFace API
+func CreateRegistFaceRequest() (request *RegistFaceRequest) {
+	request = &RegistFaceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "RegistFace", "imm", "openAPI")
+	return
+}
+
+// CreateRegistFaceResponse creates a response to parse from RegistFace response
+func CreateRegistFaceResponse() (response *RegistFaceResponse) {
+	response = &RegistFaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/imm/search_face.go

@@ -0,0 +1,115 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SearchFace invokes the imm.SearchFace API synchronously
+// api document: https://help.aliyun.com/api/imm/searchface.html
+func (client *Client) SearchFace(request *SearchFaceRequest) (response *SearchFaceResponse, err error) {
+	response = CreateSearchFaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SearchFaceWithChan invokes the imm.SearchFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/searchface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SearchFaceWithChan(request *SearchFaceRequest) (<-chan *SearchFaceResponse, <-chan error) {
+	responseChan := make(chan *SearchFaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SearchFace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SearchFaceWithCallback invokes the imm.SearchFace API asynchronously
+// api document: https://help.aliyun.com/api/imm/searchface.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SearchFaceWithCallback(request *SearchFaceRequest, callback func(response *SearchFaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SearchFaceResponse
+		var err error
+		defer close(result)
+		response, err = client.SearchFace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SearchFaceRequest is the request struct for api SearchFace
+type SearchFaceRequest struct {
+	*requests.RpcRequest
+	ResultNum            requests.Integer `position:"Query" name:"ResultNum"`
+	Project              string           `position:"Query" name:"Project"`
+	SearchThresholdLevel string           `position:"Query" name:"SearchThresholdLevel"`
+	SrcUri               string           `position:"Query" name:"SrcUri"`
+	IsThreshold          requests.Boolean `position:"Query" name:"IsThreshold"`
+	GroupName            string           `position:"Query" name:"GroupName"`
+}
+
+// SearchFaceResponse is the response struct for api SearchFace
+type SearchFaceResponse struct {
+	*responses.BaseResponse
+	RequestId   string            `json:"RequestId" xml:"RequestId"`
+	ImageUrl    string            `json:"ImageUrl" xml:"ImageUrl"`
+	GroupName   string            `json:"GroupName" xml:"GroupName"`
+	Glasses     int               `json:"Glasses" xml:"Glasses"`
+	Hat         int               `json:"Hat" xml:"Hat"`
+	Score       float64           `json:"Score" xml:"Score"`
+	Axis        []string          `json:"Axis" xml:"Axis"`
+	ResultFaces []ResultFacesItem `json:"ResultFaces" xml:"ResultFaces"`
+}
+
+// CreateSearchFaceRequest creates a request to invoke SearchFace API
+func CreateSearchFaceRequest() (request *SearchFaceRequest) {
+	request = &SearchFaceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "SearchFace", "imm", "openAPI")
+	return
+}
+
+// CreateSearchFaceResponse creates a response to parse from SearchFace response
+func CreateSearchFaceResponse() (response *SearchFaceResponse) {
+	response = &SearchFaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 21 - 0
services/imm/struct_axis_in_compare_face.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AxisInCompareFace is a nested struct in imm response
+type AxisInCompareFace struct {
+	Axis []string `json:"Axis" xml:"Axis"`
+}

+ 21 - 0
services/imm/struct_axis_in_regist_face.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AxisInRegistFace is a nested struct in imm response
+type AxisInRegistFace struct {
+	Axis []string `json:"Axis" xml:"Axis"`
+}

+ 21 - 0
services/imm/struct_axis_in_search_face.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AxisInSearchFace is a nested struct in imm response
+type AxisInSearchFace struct {
+	Axis []string `json:"Axis" xml:"Axis"`
+}

+ 0 - 1
services/imm/struct_blurness.go

@@ -17,7 +17,6 @@ package imm
 
 // Blurness is a nested struct in imm response
 type Blurness struct {
-	Balue     float64 `json:"Balue" xml:"Balue"`
 	Value     float64 `json:"Value" xml:"Value"`
 	Threshold float64 `json:"Threshold" xml:"Threshold"`
 }

+ 1 - 0
services/imm/struct_sets_item.go

@@ -22,4 +22,5 @@ type SetsItem struct {
 	ModifyTime string `json:"ModifyTime" xml:"ModifyTime"`
 	CreateTime string `json:"CreateTime" xml:"CreateTime"`
 	Status     string `json:"Status" xml:"Status"`
+	Faces      int    `json:"Faces" xml:"Faces"`
 }