itSeez3D Avatar SDK  1.0.0
SDK for AI-powered 3D avatars creation
avatar_sdk_structures.hpp
Go to the documentation of this file.
1 /* Copyright (C) Itseez3D, Inc. - All Rights Reserved
2 * You may not use this file except in compliance with an authorized license
3 * Unauthorized copying of this file, via any medium is strictly prohibited
4 * Proprietary and confidential
5 * UNLESS REQUIRED BY APPLICABLE LAW OR AGREED BY ITSEEZ3D, INC. IN WRITING, SOFTWARE DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
6 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED
7 * See the License for the specific language governing permissions and limitations under the License.
8 * Written by Itseez3D, Inc. <support@itseez3D.com>, June 2019
9 */
10 
15 #if _WIN32
16  #if AVATAR_SDK_DLL
17  #define DllExport __declspec(dllexport)
18  #else
19  #define DllExport __declspec(dllimport)
20  #endif
21 #else
22  #define DllExport
23 #endif
24 
29 {
33 };
34 
39 {
42 };
43 
48 {
49  bool gender;
51  bool eyeIrisColor;
53  bool skinColor;
54  bool age;
56  bool lipsColor;
57  bool hairColor;
58 
59  DllExport AvatarSdkModelInfo();
60 };
61 
66 {
67  GENDER_NOT_PREDICTED = 0,
68  MALE,
69  FEMALE
70 };
71 
76 {
77  AGE_NOT_PREDICTED = 0,
78  NOT_CHILD,
79  CHILD
80 };
81 
86 {
87  unsigned char red;
88  unsigned char green;
89  unsigned char blue;
90 };
91 
96 {
112  char *haircutName;
113  DllExport AvatarSdkModelInfoEntry();
114 private:
116 public:
117  DllExport ~AvatarSdkModelInfoEntry();
118 };
119 
124 {
129  {
132  } Head;
133 
138  {
145  public:
146  DllExport ~FacePipelineModifications();
147  } Face;
148  DllExport AvatarModifications();
149 };
150 
151 
156 {
159  bool lipsMask;
160  DllExport AvatarAdditionalTextures();
161 };
162 
167 {
170  wchar_t* wInputImagePath;
176 
180 
181  char **haircuts = nullptr;
182  unsigned int haircutsNumber;
183  char **blendshapes = nullptr;
184  unsigned int blendshapesNumber;
185 private:
186  DllExport char ** addToArray(unsigned int &dstSize, const char* const* const srcArray, int srcSize);
187 
188 public:
189  DllExport void addHaircuts(const char* const* const haircutArray, int size);
190  DllExport void addBlendshapes(const char* const* const blendshapesArray, int size);
191  DllExport AvatarSdkParams();
192  AvatarSdkParams(AvatarSdkParams &other) = delete;
193 
194  DllExport ~AvatarSdkParams();
195 };
196 
201 {
202  char * name{ nullptr };
203  char * path{ nullptr };
204  DllExport AvatarSdkResource();
205  DllExport AvatarSdkResource(const char * inName, const char * inPath);
206  DllExport AvatarSdkResource(AvatarSdkResource &&other);
207  DllExport AvatarSdkResource& operator=(AvatarSdkResource &&other);
208  DllExport ~AvatarSdkResource();
209 };
210 
215 {
216  AvatarSdkResource *resources = nullptr;
217  unsigned int length;
218  DllExport bool empty();
219  DllExport AvatarSdkResourcesList();
220  DllExport AvatarSdkResourcesList(unsigned int len);
223  DllExport ~AvatarSdkResourcesList();
224 };
AvatarSdkMeshFormat
Definition: avatar_sdk_structures.hpp:38
AvatarSdkColorRgb * eyeScleraColor
Average eye iris color computed from a submitted photo.
Definition: avatar_sdk_structures.hpp:111
unsigned int facialLandmarksValuesNumber
Number of elements in facialLandmarks array.
Definition: avatar_sdk_structures.hpp:102
char ** blendshapes
List of blendshapes to calculate for avatar (should be initialized through addBlendshapes method) ...
Definition: avatar_sdk_structures.hpp:183
bool facialLandmarks68
Compute facial landmarks.
Definition: avatar_sdk_structures.hpp:55
unsigned int haircutsNumber
Number of haircuts in list.
Definition: avatar_sdk_structures.hpp:182
AvatarSdkMeshFormat outputMeshFormat
Format in which output meshes will be saved.
Definition: avatar_sdk_structures.hpp:174
bool predictHaircut
Predict which haircut from the base and the facegen sets matches best to the submitted photo...
Definition: avatar_sdk_structures.hpp:52
Definition: avatar_sdk_structures.hpp:95
float * facialLandmarks
Facial landmarks. Landmark coordinates are represented as vector with X, Y, Z float components sequen...
Definition: avatar_sdk_structures.hpp:101
AvatarSdkPipelineType pipelineType
Type of the avatar.
Definition: avatar_sdk_structures.hpp:168
AgePredicted age
Classify a person&#39;s age from a submitted photo. Currently possible values are CHILD and NOT_CHILD...
Definition: avatar_sdk_structures.hpp:103
bool eyeScleraColor
Compute average eye sclera color from a submitted photo.
Definition: avatar_sdk_structures.hpp:50
Definition: avatar_sdk_structures.hpp:85
wchar_t * wInputImagePath
Path to the photo in UTF16 encoding. Works only on Windows platform.
Definition: avatar_sdk_structures.hpp:170
Definition: avatar_sdk_structures.hpp:166
bool skinColor
Compute average skin color from a submitted photo.
Definition: avatar_sdk_structures.hpp:53
Head avatar.
Definition: avatar_sdk_structures.hpp:32
char * resourcesJson
JSON with the list of resources that should be generated.
Definition: avatar_sdk_structures.hpp:172
Definition: avatar_sdk_structures.hpp:128
Unknown pipeline type.
Definition: avatar_sdk_structures.hpp:30
Definition: avatar_sdk_structures.hpp:155
AgePredicted
Definition: avatar_sdk_structures.hpp:75
AvatarSdkPipelineType
Definition: avatar_sdk_structures.hpp:28
Definition: avatar_sdk_structures.hpp:137
Face avatar.
Definition: avatar_sdk_structures.hpp:31
OBJ format.
Definition: avatar_sdk_structures.hpp:41
AvatarSdkColorRgb * hairColor
Average haircut color computed from a submitted photo (face pipeline only).
Definition: avatar_sdk_structures.hpp:107
AvatarModifications * avatarModifications
Requested avatar modifications.
Definition: avatar_sdk_structures.hpp:178
bool curvedBottom
Make the bottom of model bust slightly curved.
Definition: avatar_sdk_structures.hpp:130
float ageConfidence
Represents the confidence of age classification with value in the range [0.5, 1] inclusive.
Definition: avatar_sdk_structures.hpp:104
char * outputDirPath
Directory to which the result will be written.
Definition: avatar_sdk_structures.hpp:171
bool hairColor
Compute average haircut color from a submitted photo.
Definition: avatar_sdk_structures.hpp:57
Definition: avatar_sdk_structures.hpp:200
bool slightlyCartoonishTexture
Make the model texture look slightly cartoonish.
Definition: avatar_sdk_structures.hpp:131
bool gender
Predict person&#39;s gender from a submitted photo.
Definition: avatar_sdk_structures.hpp:49
char ** haircuts
List of haircuts to calculate for avatar (should be initialized through addHaircuts method) ...
Definition: avatar_sdk_structures.hpp:181
AvatarSdkColorRgb * lipsColor
Average lips color computed from a submitted photo.
Definition: avatar_sdk_structures.hpp:108
float genderConfidence
Represents the confidence of gender prediction with value in the range [0.5, 1] inclusive.
Definition: avatar_sdk_structures.hpp:106
GenderPredicted
Definition: avatar_sdk_structures.hpp:65
AvatarSdkColorRgb * lipsColor
Recolor lips directly on a model texture.
Definition: avatar_sdk_structures.hpp:144
char * haircutName
Predicted haircut name (face pipeline only).
Definition: avatar_sdk_structures.hpp:112
Definition: avatar_sdk_structures.hpp:214
bool smoothEyelashesTexture
Original texture with smoothen area of eyelashes.
Definition: avatar_sdk_structures.hpp:158
char * resourcesJsonFilePath
Path to the resources JSON file if the resourcesJson isn&#39;t specified.
Definition: avatar_sdk_structures.hpp:173
bool lipsMask
Mask in PNG format.
Definition: avatar_sdk_structures.hpp:159
bool lipsColor
Compute average lips color from a submitted photo.
Definition: avatar_sdk_structures.hpp:56
bool age
Classify a person&#39;s age from a submitted photo.
Definition: avatar_sdk_structures.hpp:54
GenderPredicted gender
Predict person&#39;s gender from a submitted photo. Possible values are MALE and FEMALE.
Definition: avatar_sdk_structures.hpp:105
char * inputImagePath
Path to the photo in the PNG or JPEG format.
Definition: avatar_sdk_structures.hpp:169
Definition: avatar_sdk_structures.hpp:47
unsigned int blendshapesNumber
Number of blendshapes in list.
Definition: avatar_sdk_structures.hpp:184
AvatarAdditionalTextures * additionalTextures
Additional textures (along with default one) reuqested to compute for avatar.
Definition: avatar_sdk_structures.hpp:179
AvatarSdkColorRgb * eyeIrisColor
Average eye iris color computed from a submitted photo.
Definition: avatar_sdk_structures.hpp:110
Definition: avatar_sdk_structures.hpp:123
AvatarSdkColorRgb * skinColor
Average skin color computed from a submitted photo.
Definition: avatar_sdk_structures.hpp:109
bool saveHaircutAsPointCloud
Save haircuts as point clouds.
Definition: avatar_sdk_structures.hpp:175
bool eyeIrisColor
Compute average eye iris color from a submitted photo.
Definition: avatar_sdk_structures.hpp:51
bool slightlyCartoonishTexture
Slightly smoother than the original texture.
Definition: avatar_sdk_structures.hpp:157
float caricatureAmount
Factor to strengthen differences between average model and a particular avatar. Valid values range is...
Definition: avatar_sdk_structures.hpp:143
AvatarSdkModelInfo * modelInfo
Computation parameters. The generated data is stored in the model.json file in the output directory...
Definition: avatar_sdk_structures.hpp:177
PLY format.
Definition: avatar_sdk_structures.hpp:40