瀏覽代碼

IMM SDK Auto Released By zhengrui.lj,Version:1.53.21

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 年之前
父節點
當前提交
7dd75104dc

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2019-03-11 Version: 1.53.21
+1, Add face grouping feature .
+2, Add head pose and face quality.
+
+
 2019-03-11 Version: 1.53.20
 1, Update aliyun-java-sdk-core version.
 

+ 109 - 0
services/imm/create_group_faces_job.go

@@ -0,0 +1,109 @@
+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"
+)
+
+// CreateGroupFacesJob invokes the imm.CreateGroupFacesJob API synchronously
+// api document: https://help.aliyun.com/api/imm/creategroupfacesjob.html
+func (client *Client) CreateGroupFacesJob(request *CreateGroupFacesJobRequest) (response *CreateGroupFacesJobResponse, err error) {
+	response = CreateCreateGroupFacesJobResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateGroupFacesJobWithChan invokes the imm.CreateGroupFacesJob API asynchronously
+// api document: https://help.aliyun.com/api/imm/creategroupfacesjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateGroupFacesJobWithChan(request *CreateGroupFacesJobRequest) (<-chan *CreateGroupFacesJobResponse, <-chan error) {
+	responseChan := make(chan *CreateGroupFacesJobResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateGroupFacesJob(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateGroupFacesJobWithCallback invokes the imm.CreateGroupFacesJob API asynchronously
+// api document: https://help.aliyun.com/api/imm/creategroupfacesjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateGroupFacesJobWithCallback(request *CreateGroupFacesJobRequest, callback func(response *CreateGroupFacesJobResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateGroupFacesJobResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateGroupFacesJob(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateGroupFacesJobRequest is the request struct for api CreateGroupFacesJob
+type CreateGroupFacesJobRequest struct {
+	*requests.RpcRequest
+	NotifyTopicName string `position:"Query" name:"NotifyTopicName"`
+	NotifyEndpoint  string `position:"Query" name:"NotifyEndpoint"`
+	Project         string `position:"Query" name:"Project"`
+	SetId           string `position:"Query" name:"SetId"`
+}
+
+// CreateGroupFacesJobResponse is the response struct for api CreateGroupFacesJob
+type CreateGroupFacesJobResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	JobId     string `json:"JobId" xml:"JobId"`
+	SetId     string `json:"SetId" xml:"SetId"`
+	JobType   string `json:"JobType" xml:"JobType"`
+}
+
+// CreateCreateGroupFacesJobRequest creates a request to invoke CreateGroupFacesJob API
+func CreateCreateGroupFacesJobRequest() (request *CreateGroupFacesJobRequest) {
+	request = &CreateGroupFacesJobRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "CreateGroupFacesJob", "imm", "openAPI")
+	return
+}
+
+// CreateCreateGroupFacesJobResponse creates a response to parse from CreateGroupFacesJob response
+func CreateCreateGroupFacesJobResponse() (response *CreateGroupFacesJobResponse) {
+	response = &CreateGroupFacesJobResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 24 - 22
services/imm/find_images.go

@@ -76,28 +76,30 @@ func (client *Client) FindImagesWithCallback(request *FindImagesRequest, callbac
 // FindImagesRequest is the request struct for api FindImages
 type FindImagesRequest struct {
 	*requests.RpcRequest
-	Gender           string `position:"Query" name:"Gender"`
-	Project          string `position:"Query" name:"Project"`
-	ExternalId       string `position:"Query" name:"ExternalId"`
-	ImageSizeRange   string `position:"Query" name:"ImageSizeRange"`
-	RemarksBPrefix   string `position:"Query" name:"RemarksBPrefix"`
-	LocationBoundary string `position:"Query" name:"LocationBoundary"`
-	ImageTimeRange   string `position:"Query" name:"ImageTimeRange"`
-	OCRContentsMatch string `position:"Query" name:"OCRContentsMatch"`
-	RemarksDPrefix   string `position:"Query" name:"RemarksDPrefix"`
-	SourceType       string `position:"Query" name:"SourceType"`
-	AgeRange         string `position:"Query" name:"AgeRange"`
-	Order            string `position:"Query" name:"Order"`
-	RemarksAPrefix   string `position:"Query" name:"RemarksAPrefix"`
-	OrderBy          string `position:"Query" name:"OrderBy"`
-	TagNames         string `position:"Query" name:"TagNames"`
-	SourceUriPrefix  string `position:"Query" name:"SourceUriPrefix"`
-	Emotion          string `position:"Query" name:"Emotion"`
-	Marker           string `position:"Query" name:"Marker"`
-	RemarksCPrefix   string `position:"Query" name:"RemarksCPrefix"`
-	CreateTimeRange  string `position:"Query" name:"CreateTimeRange"`
-	SetId            string `position:"Query" name:"SetId"`
-	UpdateTimeRange  string `position:"Query" name:"UpdateTimeRange"`
+	Gender           string           `position:"Query" name:"Gender"`
+	Project          string           `position:"Query" name:"Project"`
+	ExternalId       string           `position:"Query" name:"ExternalId"`
+	ImageSizeRange   string           `position:"Query" name:"ImageSizeRange"`
+	RemarksBPrefix   string           `position:"Query" name:"RemarksBPrefix"`
+	LocationBoundary string           `position:"Query" name:"LocationBoundary"`
+	ImageTimeRange   string           `position:"Query" name:"ImageTimeRange"`
+	OCRContentsMatch string           `position:"Query" name:"OCRContentsMatch"`
+	Limit            requests.Integer `position:"Query" name:"Limit"`
+	RemarksDPrefix   string           `position:"Query" name:"RemarksDPrefix"`
+	SourceType       string           `position:"Query" name:"SourceType"`
+	AgeRange         string           `position:"Query" name:"AgeRange"`
+	Order            string           `position:"Query" name:"Order"`
+	RemarksAPrefix   string           `position:"Query" name:"RemarksAPrefix"`
+	GroupId          string           `position:"Query" name:"GroupId"`
+	OrderBy          string           `position:"Query" name:"OrderBy"`
+	TagNames         string           `position:"Query" name:"TagNames"`
+	SourceUriPrefix  string           `position:"Query" name:"SourceUriPrefix"`
+	Emotion          string           `position:"Query" name:"Emotion"`
+	Marker           string           `position:"Query" name:"Marker"`
+	RemarksCPrefix   string           `position:"Query" name:"RemarksCPrefix"`
+	CreateTimeRange  string           `position:"Query" name:"CreateTimeRange"`
+	SetId            string           `position:"Query" name:"SetId"`
+	ModifyTimeRange  string           `position:"Query" name:"ModifyTimeRange"`
 }
 
 // FindImagesResponse is the response struct for api FindImages

+ 5 - 4
services/imm/find_images_by_tag_names.go

@@ -76,10 +76,11 @@ func (client *Client) FindImagesByTagNamesWithCallback(request *FindImagesByTagN
 // FindImagesByTagNamesRequest is the request struct for api FindImagesByTagNames
 type FindImagesByTagNamesRequest struct {
 	*requests.RpcRequest
-	Marker   string `position:"Query" name:"Marker"`
-	Project  string `position:"Query" name:"Project"`
-	SetId    string `position:"Query" name:"SetId"`
-	TagNames string `position:"Query" name:"TagNames"`
+	Marker   string           `position:"Query" name:"Marker"`
+	Limit    requests.Integer `position:"Query" name:"Limit"`
+	Project  string           `position:"Query" name:"Project"`
+	SetId    string           `position:"Query" name:"SetId"`
+	TagNames string           `position:"Query" name:"TagNames"`
 }
 
 // FindImagesByTagNamesResponse is the response struct for api FindImagesByTagNames

+ 6 - 5
services/imm/find_similar_faces.go

@@ -76,11 +76,12 @@ func (client *Client) FindSimilarFacesWithCallback(request *FindSimilarFacesRequ
 // FindSimilarFacesRequest is the request struct for api FindSimilarFaces
 type FindSimilarFacesRequest struct {
 	*requests.RpcRequest
-	ImageUri string           `position:"Query" name:"ImageUri"`
-	Limit    requests.Integer `position:"Query" name:"Limit"`
-	Project  string           `position:"Query" name:"Project"`
-	SetId    string           `position:"Query" name:"SetId"`
-	FaceId   string           `position:"Query" name:"FaceId"`
+	ImageUri      string           `position:"Query" name:"ImageUri"`
+	MinSimilarity requests.Float   `position:"Query" name:"MinSimilarity"`
+	Limit         requests.Integer `position:"Query" name:"Limit"`
+	Project       string           `position:"Query" name:"Project"`
+	SetId         string           `position:"Query" name:"SetId"`
+	FaceId        string           `position:"Query" name:"FaceId"`
 }
 
 // FindSimilarFacesResponse is the response struct for api FindSimilarFaces

+ 5 - 4
services/imm/list_images.go

@@ -76,10 +76,11 @@ func (client *Client) ListImagesWithCallback(request *ListImagesRequest, callbac
 // ListImagesRequest is the request struct for api ListImages
 type ListImagesRequest struct {
 	*requests.RpcRequest
-	Marker          string `position:"Query" name:"Marker"`
-	Project         string `position:"Query" name:"Project"`
-	SetId           string `position:"Query" name:"SetId"`
-	CreateTimeStart string `position:"Query" name:"CreateTimeStart"`
+	Marker          string           `position:"Query" name:"Marker"`
+	Limit           requests.Integer `position:"Query" name:"Limit"`
+	Project         string           `position:"Query" name:"Project"`
+	SetId           string           `position:"Query" name:"SetId"`
+	CreateTimeStart string           `position:"Query" name:"CreateTimeStart"`
 }
 
 // ListImagesResponse is the response struct for api ListImages

+ 1 - 0
services/imm/struct_face_attributes.go

@@ -26,4 +26,5 @@ type FaceAttributes struct {
 	Race              string       `json:"Race" xml:"Race"`
 	BeardConfidence   float64      `json:"BeardConfidence" xml:"BeardConfidence"`
 	FaceBoundary      FaceBoundary `json:"FaceBoundary" xml:"FaceBoundary"`
+	HeadPose          HeadPose     `json:"HeadPose" xml:"HeadPose"`
 }

+ 2 - 0
services/imm/struct_faces_item.go

@@ -21,6 +21,7 @@ type FacesItem struct {
 	EmotionConfidence    float64        `json:"EmotionConfidence" xml:"EmotionConfidence"`
 	ImageUri             string         `json:"ImageUri" xml:"ImageUri"`
 	Similarity           float64        `json:"Similarity" xml:"Similarity"`
+	FaceQuality          float64        `json:"FaceQuality" xml:"FaceQuality"`
 	Attractive           float64        `json:"Attractive" xml:"Attractive"`
 	AttractiveConfidence float64        `json:"AttractiveConfidence" xml:"AttractiveConfidence"`
 	Age                  int            `json:"Age" xml:"Age"`
@@ -29,6 +30,7 @@ type FacesItem struct {
 	GenderConfidence     float64        `json:"GenderConfidence" xml:"GenderConfidence"`
 	Emotion              string         `json:"Emotion" xml:"Emotion"`
 	FaceId               string         `json:"FaceId" xml:"FaceId"`
+	GroupId              string         `json:"GroupId" xml:"GroupId"`
 	FaceAttributes       FaceAttributes `json:"FaceAttributes" xml:"FaceAttributes"`
 	EmotionDetails       EmotionDetails `json:"EmotionDetails" xml:"EmotionDetails"`
 }

+ 2 - 0
services/imm/struct_faces_item_in_get_image.go

@@ -24,6 +24,8 @@ type FacesItemInGetImage struct {
 	Emotion          string         `json:"Emotion" xml:"Emotion"`
 	Attractive       float64        `json:"Attractive" xml:"Attractive"`
 	GenderConfidence float64        `json:"GenderConfidence" xml:"GenderConfidence"`
+	GroupId          string         `json:"GroupId" xml:"GroupId"`
+	FaceQuality      float64        `json:"FaceQuality" xml:"FaceQuality"`
 	FaceAttributes   FaceAttributes `json:"FaceAttributes" xml:"FaceAttributes"`
 	EmotionDetails   EmotionDetails `json:"EmotionDetails" xml:"EmotionDetails"`
 }

+ 1 - 1
services/imm/struct_frames.go

@@ -48,8 +48,8 @@ type Frames struct {
 	RemarksC            string          `json:"RemarksC" xml:"RemarksC"`
 	SourceUri           string          `json:"SourceUri" xml:"SourceUri"`
 	ImageWidth          int             `json:"ImageWidth" xml:"ImageWidth"`
-	Faces               []FacesItem     `json:"Faces" xml:"Faces"`
 	OCR                 []OCRItem       `json:"OCR" xml:"OCR"`
+	Faces               []FacesItem     `json:"Faces" xml:"Faces"`
 	Celebrity           []CelebrityItem `json:"Celebrity" xml:"Celebrity"`
 	Tags                []TagsItem      `json:"Tags" xml:"Tags"`
 }

+ 23 - 0
services/imm/struct_head_pose.go

@@ -0,0 +1,23 @@
+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.
+
+// HeadPose is a nested struct in imm response
+type HeadPose struct {
+	Pitch float64 `json:"Pitch" xml:"Pitch"`
+	Roll  float64 `json:"Roll" xml:"Roll"`
+	Yaw   float64 `json:"Yaw" xml:"Yaw"`
+}

+ 1 - 1
services/imm/struct_images_item.go

@@ -61,8 +61,8 @@ type ImagesItem struct {
 	SourceUri           string          `json:"SourceUri" xml:"SourceUri"`
 	ImageWidth          int             `json:"ImageWidth" xml:"ImageWidth"`
 	Axis                []string        `json:"Axis" xml:"Axis"`
-	Faces               []FacesItem     `json:"Faces" xml:"Faces"`
 	OCR                 []OCRItem       `json:"OCR" xml:"OCR"`
+	Faces               []FacesItem     `json:"Faces" xml:"Faces"`
 	Celebrity           []CelebrityItem `json:"Celebrity" xml:"Celebrity"`
 	Tags                []TagsItem      `json:"Tags" xml:"Tags"`
 }