Release DetectChefCap.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-09-09 Version: patch
|
||||
- Release DetectChefCap.
|
||||
|
||||
2020-09-09 Version: patch
|
||||
- Release DetectKneeKeypointXRay, DetectHipKeypointXRay, CalcCACS, RunCTRegistration, ClassifyFNF.
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ set(facebody_public_header_model
|
||||
include/alibabacloud/facebody/model/DetectBodyCountResult.h
|
||||
include/alibabacloud/facebody/model/DetectCelebrityRequest.h
|
||||
include/alibabacloud/facebody/model/DetectCelebrityResult.h
|
||||
include/alibabacloud/facebody/model/DetectChefCapRequest.h
|
||||
include/alibabacloud/facebody/model/DetectChefCapResult.h
|
||||
include/alibabacloud/facebody/model/DetectFaceRequest.h
|
||||
include/alibabacloud/facebody/model/DetectFaceResult.h
|
||||
include/alibabacloud/facebody/model/DetectIPCPedestrianRequest.h
|
||||
@@ -57,6 +59,8 @@ set(facebody_public_header_model
|
||||
include/alibabacloud/facebody/model/DetectVideoLivingFaceResult.h
|
||||
include/alibabacloud/facebody/model/EnhanceFaceRequest.h
|
||||
include/alibabacloud/facebody/model/EnhanceFaceResult.h
|
||||
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h
|
||||
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrResult.h
|
||||
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttributeRequest.h
|
||||
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttributeResult.h
|
||||
include/alibabacloud/facebody/model/FaceBeautyRequest.h
|
||||
@@ -116,6 +120,8 @@ set(facebody_src
|
||||
src/model/DetectBodyCountResult.cc
|
||||
src/model/DetectCelebrityRequest.cc
|
||||
src/model/DetectCelebrityResult.cc
|
||||
src/model/DetectChefCapRequest.cc
|
||||
src/model/DetectChefCapResult.cc
|
||||
src/model/DetectFaceRequest.cc
|
||||
src/model/DetectFaceResult.cc
|
||||
src/model/DetectIPCPedestrianRequest.cc
|
||||
@@ -130,6 +136,8 @@ set(facebody_src
|
||||
src/model/DetectVideoLivingFaceResult.cc
|
||||
src/model/EnhanceFaceRequest.cc
|
||||
src/model/EnhanceFaceResult.cc
|
||||
src/model/ExtractPedestrianFeatureAttrRequest.cc
|
||||
src/model/ExtractPedestrianFeatureAttrResult.cc
|
||||
src/model/ExtractPedestrianFeatureAttributeRequest.cc
|
||||
src/model/ExtractPedestrianFeatureAttributeResult.cc
|
||||
src/model/FaceBeautyRequest.cc
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "model/DetectBodyCountResult.h"
|
||||
#include "model/DetectCelebrityRequest.h"
|
||||
#include "model/DetectCelebrityResult.h"
|
||||
#include "model/DetectChefCapRequest.h"
|
||||
#include "model/DetectChefCapResult.h"
|
||||
#include "model/DetectFaceRequest.h"
|
||||
#include "model/DetectFaceResult.h"
|
||||
#include "model/DetectIPCPedestrianRequest.h"
|
||||
@@ -58,6 +60,8 @@
|
||||
#include "model/DetectVideoLivingFaceResult.h"
|
||||
#include "model/EnhanceFaceRequest.h"
|
||||
#include "model/EnhanceFaceResult.h"
|
||||
#include "model/ExtractPedestrianFeatureAttrRequest.h"
|
||||
#include "model/ExtractPedestrianFeatureAttrResult.h"
|
||||
#include "model/ExtractPedestrianFeatureAttributeRequest.h"
|
||||
#include "model/ExtractPedestrianFeatureAttributeResult.h"
|
||||
#include "model/FaceBeautyRequest.h"
|
||||
@@ -134,6 +138,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DetectCelebrityResult> DetectCelebrityOutcome;
|
||||
typedef std::future<DetectCelebrityOutcome> DetectCelebrityOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectCelebrityRequest&, const DetectCelebrityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectCelebrityAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetectChefCapResult> DetectChefCapOutcome;
|
||||
typedef std::future<DetectChefCapOutcome> DetectChefCapOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectChefCapRequest&, const DetectChefCapOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectChefCapAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetectFaceResult> DetectFaceOutcome;
|
||||
typedef std::future<DetectFaceOutcome> DetectFaceOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectFaceRequest&, const DetectFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectFaceAsyncHandler;
|
||||
@@ -155,6 +162,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::EnhanceFaceResult> EnhanceFaceOutcome;
|
||||
typedef std::future<EnhanceFaceOutcome> EnhanceFaceOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::EnhanceFaceRequest&, const EnhanceFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceFaceAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExtractPedestrianFeatureAttrResult> ExtractPedestrianFeatureAttrOutcome;
|
||||
typedef std::future<ExtractPedestrianFeatureAttrOutcome> ExtractPedestrianFeatureAttrOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::ExtractPedestrianFeatureAttrRequest&, const ExtractPedestrianFeatureAttrOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtractPedestrianFeatureAttrAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExtractPedestrianFeatureAttributeResult> ExtractPedestrianFeatureAttributeOutcome;
|
||||
typedef std::future<ExtractPedestrianFeatureAttributeOutcome> ExtractPedestrianFeatureAttributeOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::ExtractPedestrianFeatureAttributeRequest&, const ExtractPedestrianFeatureAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtractPedestrianFeatureAttributeAsyncHandler;
|
||||
@@ -244,6 +254,9 @@ namespace AlibabaCloud
|
||||
DetectCelebrityOutcome detectCelebrity(const Model::DetectCelebrityRequest &request)const;
|
||||
void detectCelebrityAsync(const Model::DetectCelebrityRequest& request, const DetectCelebrityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectCelebrityOutcomeCallable detectCelebrityCallable(const Model::DetectCelebrityRequest& request) const;
|
||||
DetectChefCapOutcome detectChefCap(const Model::DetectChefCapRequest &request)const;
|
||||
void detectChefCapAsync(const Model::DetectChefCapRequest& request, const DetectChefCapAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectChefCapOutcomeCallable detectChefCapCallable(const Model::DetectChefCapRequest& request) const;
|
||||
DetectFaceOutcome detectFace(const Model::DetectFaceRequest &request)const;
|
||||
void detectFaceAsync(const Model::DetectFaceRequest& request, const DetectFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectFaceOutcomeCallable detectFaceCallable(const Model::DetectFaceRequest& request) const;
|
||||
@@ -265,6 +278,9 @@ namespace AlibabaCloud
|
||||
EnhanceFaceOutcome enhanceFace(const Model::EnhanceFaceRequest &request)const;
|
||||
void enhanceFaceAsync(const Model::EnhanceFaceRequest& request, const EnhanceFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
EnhanceFaceOutcomeCallable enhanceFaceCallable(const Model::EnhanceFaceRequest& request) const;
|
||||
ExtractPedestrianFeatureAttrOutcome extractPedestrianFeatureAttr(const Model::ExtractPedestrianFeatureAttrRequest &request)const;
|
||||
void extractPedestrianFeatureAttrAsync(const Model::ExtractPedestrianFeatureAttrRequest& request, const ExtractPedestrianFeatureAttrAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExtractPedestrianFeatureAttrOutcomeCallable extractPedestrianFeatureAttrCallable(const Model::ExtractPedestrianFeatureAttrRequest& request) const;
|
||||
ExtractPedestrianFeatureAttributeOutcome extractPedestrianFeatureAttribute(const Model::ExtractPedestrianFeatureAttributeRequest &request)const;
|
||||
void extractPedestrianFeatureAttributeAsync(const Model::ExtractPedestrianFeatureAttributeRequest& request, const ExtractPedestrianFeatureAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExtractPedestrianFeatureAttributeOutcomeCallable extractPedestrianFeatureAttributeCallable(const Model::ExtractPedestrianFeatureAttributeRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT DetectChefCapRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DetectChefCapRequest();
|
||||
~DetectChefCapRequest();
|
||||
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPRESULT_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT DetectChefCapResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ElementsItem
|
||||
{
|
||||
std::string category;
|
||||
float confidence;
|
||||
std::vector<std::string> box;
|
||||
};
|
||||
std::vector<ElementsItem> elements;
|
||||
};
|
||||
|
||||
|
||||
DetectChefCapResult();
|
||||
explicit DetectChefCapResult(const std::string &payload);
|
||||
~DetectChefCapResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTCHEFCAPRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT ExtractPedestrianFeatureAttrRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ExtractPedestrianFeatureAttrRequest();
|
||||
~ExtractPedestrianFeatureAttrRequest();
|
||||
|
||||
std::string getMode()const;
|
||||
void setMode(const std::string& mode);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::string mode_;
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRRESULT_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT ExtractPedestrianFeatureAttrResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string hair;
|
||||
std::string upperType;
|
||||
float upperTypeScore;
|
||||
float qualityScore;
|
||||
std::string lowerColor;
|
||||
std::string gender;
|
||||
std::string feature;
|
||||
float upperColorScore;
|
||||
float lowerColorScore;
|
||||
float genderScore;
|
||||
std::string objType;
|
||||
float lowerTypeScore;
|
||||
float hairScore;
|
||||
std::string upperColor;
|
||||
std::string lowerType;
|
||||
float ageScore;
|
||||
float objTypeScore;
|
||||
std::string age;
|
||||
};
|
||||
|
||||
|
||||
ExtractPedestrianFeatureAttrResult();
|
||||
explicit ExtractPedestrianFeatureAttrResult(const std::string &payload);
|
||||
~ExtractPedestrianFeatureAttrResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXTRACTPEDESTRIANFEATUREATTRRESULT_H_
|
||||
@@ -447,6 +447,42 @@ FacebodyClient::DetectCelebrityOutcomeCallable FacebodyClient::detectCelebrityCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::DetectChefCapOutcome FacebodyClient::detectChefCap(const DetectChefCapRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DetectChefCapOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DetectChefCapOutcome(DetectChefCapResult(outcome.result()));
|
||||
else
|
||||
return DetectChefCapOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FacebodyClient::detectChefCapAsync(const DetectChefCapRequest& request, const DetectChefCapAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, detectChefCap(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FacebodyClient::DetectChefCapOutcomeCallable FacebodyClient::detectChefCapCallable(const DetectChefCapRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DetectChefCapOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->detectChefCap(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::DetectFaceOutcome FacebodyClient::detectFace(const DetectFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -699,6 +735,42 @@ FacebodyClient::EnhanceFaceOutcomeCallable FacebodyClient::enhanceFaceCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::ExtractPedestrianFeatureAttrOutcome FacebodyClient::extractPedestrianFeatureAttr(const ExtractPedestrianFeatureAttrRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExtractPedestrianFeatureAttrOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExtractPedestrianFeatureAttrOutcome(ExtractPedestrianFeatureAttrResult(outcome.result()));
|
||||
else
|
||||
return ExtractPedestrianFeatureAttrOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FacebodyClient::extractPedestrianFeatureAttrAsync(const ExtractPedestrianFeatureAttrRequest& request, const ExtractPedestrianFeatureAttrAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, extractPedestrianFeatureAttr(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FacebodyClient::ExtractPedestrianFeatureAttrOutcomeCallable FacebodyClient::extractPedestrianFeatureAttrCallable(const ExtractPedestrianFeatureAttrRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExtractPedestrianFeatureAttrOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->extractPedestrianFeatureAttr(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::ExtractPedestrianFeatureAttributeOutcome FacebodyClient::extractPedestrianFeatureAttribute(const ExtractPedestrianFeatureAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
40
facebody/src/model/DetectChefCapRequest.cc
Normal file
40
facebody/src/model/DetectChefCapRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/DetectChefCapRequest.h>
|
||||
|
||||
using AlibabaCloud::Facebody::Model::DetectChefCapRequest;
|
||||
|
||||
DetectChefCapRequest::DetectChefCapRequest() :
|
||||
RpcServiceRequest("facebody", "2019-12-30", "DetectChefCap")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DetectChefCapRequest::~DetectChefCapRequest()
|
||||
{}
|
||||
|
||||
std::string DetectChefCapRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void DetectChefCapRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
63
facebody/src/model/DetectChefCapResult.cc
Normal file
63
facebody/src/model/DetectChefCapResult.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/DetectChefCapResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Facebody;
|
||||
using namespace AlibabaCloud::Facebody::Model;
|
||||
|
||||
DetectChefCapResult::DetectChefCapResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetectChefCapResult::DetectChefCapResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetectChefCapResult::~DetectChefCapResult()
|
||||
{}
|
||||
|
||||
void DetectChefCapResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allElementsNode = dataNode["Elements"]["ElementsItem"];
|
||||
for (auto dataNodeElementsElementsItem : allElementsNode)
|
||||
{
|
||||
Data::ElementsItem elementsItemObject;
|
||||
if(!dataNodeElementsElementsItem["Category"].isNull())
|
||||
elementsItemObject.category = dataNodeElementsElementsItem["Category"].asString();
|
||||
if(!dataNodeElementsElementsItem["Confidence"].isNull())
|
||||
elementsItemObject.confidence = std::stof(dataNodeElementsElementsItem["Confidence"].asString());
|
||||
auto allBox = value["Box"]["Box"];
|
||||
for (auto value : allBox)
|
||||
elementsItemObject.box.push_back(value.asString());
|
||||
data_.elements.push_back(elementsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DetectChefCapResult::Data DetectChefCapResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
51
facebody/src/model/ExtractPedestrianFeatureAttrRequest.cc
Normal file
51
facebody/src/model/ExtractPedestrianFeatureAttrRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h>
|
||||
|
||||
using AlibabaCloud::Facebody::Model::ExtractPedestrianFeatureAttrRequest;
|
||||
|
||||
ExtractPedestrianFeatureAttrRequest::ExtractPedestrianFeatureAttrRequest() :
|
||||
RpcServiceRequest("facebody", "2019-12-30", "ExtractPedestrianFeatureAttr")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ExtractPedestrianFeatureAttrRequest::~ExtractPedestrianFeatureAttrRequest()
|
||||
{}
|
||||
|
||||
std::string ExtractPedestrianFeatureAttrRequest::getMode()const
|
||||
{
|
||||
return mode_;
|
||||
}
|
||||
|
||||
void ExtractPedestrianFeatureAttrRequest::setMode(const std::string& mode)
|
||||
{
|
||||
mode_ = mode;
|
||||
setBodyParameter("Mode", mode);
|
||||
}
|
||||
|
||||
std::string ExtractPedestrianFeatureAttrRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void ExtractPedestrianFeatureAttrRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
86
facebody/src/model/ExtractPedestrianFeatureAttrResult.cc
Normal file
86
facebody/src/model/ExtractPedestrianFeatureAttrResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/ExtractPedestrianFeatureAttrResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Facebody;
|
||||
using namespace AlibabaCloud::Facebody::Model;
|
||||
|
||||
ExtractPedestrianFeatureAttrResult::ExtractPedestrianFeatureAttrResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExtractPedestrianFeatureAttrResult::ExtractPedestrianFeatureAttrResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExtractPedestrianFeatureAttrResult::~ExtractPedestrianFeatureAttrResult()
|
||||
{}
|
||||
|
||||
void ExtractPedestrianFeatureAttrResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ObjType"].isNull())
|
||||
data_.objType = dataNode["ObjType"].asString();
|
||||
if(!dataNode["ObjTypeScore"].isNull())
|
||||
data_.objTypeScore = std::stof(dataNode["ObjTypeScore"].asString());
|
||||
if(!dataNode["Feature"].isNull())
|
||||
data_.feature = dataNode["Feature"].asString();
|
||||
if(!dataNode["QualityScore"].isNull())
|
||||
data_.qualityScore = std::stof(dataNode["QualityScore"].asString());
|
||||
if(!dataNode["UpperColor"].isNull())
|
||||
data_.upperColor = dataNode["UpperColor"].asString();
|
||||
if(!dataNode["UpperColorScore"].isNull())
|
||||
data_.upperColorScore = std::stof(dataNode["UpperColorScore"].asString());
|
||||
if(!dataNode["UpperType"].isNull())
|
||||
data_.upperType = dataNode["UpperType"].asString();
|
||||
if(!dataNode["UpperTypeScore"].isNull())
|
||||
data_.upperTypeScore = std::stof(dataNode["UpperTypeScore"].asString());
|
||||
if(!dataNode["LowerColor"].isNull())
|
||||
data_.lowerColor = dataNode["LowerColor"].asString();
|
||||
if(!dataNode["LowerColorScore"].isNull())
|
||||
data_.lowerColorScore = std::stof(dataNode["LowerColorScore"].asString());
|
||||
if(!dataNode["LowerType"].isNull())
|
||||
data_.lowerType = dataNode["LowerType"].asString();
|
||||
if(!dataNode["LowerTypeScore"].isNull())
|
||||
data_.lowerTypeScore = std::stof(dataNode["LowerTypeScore"].asString());
|
||||
if(!dataNode["Gender"].isNull())
|
||||
data_.gender = dataNode["Gender"].asString();
|
||||
if(!dataNode["GenderScore"].isNull())
|
||||
data_.genderScore = std::stof(dataNode["GenderScore"].asString());
|
||||
if(!dataNode["Hair"].isNull())
|
||||
data_.hair = dataNode["Hair"].asString();
|
||||
if(!dataNode["HairScore"].isNull())
|
||||
data_.hairScore = std::stof(dataNode["HairScore"].asString());
|
||||
if(!dataNode["Age"].isNull())
|
||||
data_.age = dataNode["Age"].asString();
|
||||
if(!dataNode["AgeScore"].isNull())
|
||||
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
|
||||
|
||||
}
|
||||
|
||||
ExtractPedestrianFeatureAttrResult::Data ExtractPedestrianFeatureAttrResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user