initial port to .net core
This commit is contained in:
Родитель
6eff8b8893
Коммит
c84531a044
|
@ -0,0 +1,59 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents face stored in FaceList or Person
|
||||
/// </summary>
|
||||
public class AddPersistedFaceResult
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the persisted face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The persisted face identifier.
|
||||
/// </value>
|
||||
public Guid PersistedFaceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The identified candidate entity.
|
||||
/// </summary>
|
||||
public class Candidate
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the person identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The person identifier.
|
||||
/// </value>
|
||||
public Guid PersonId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confidence.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The confidence.
|
||||
/// </value>
|
||||
public double Confidence
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents client error with detailed error message and error code
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class ClientError
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClientError" /> class
|
||||
/// </summary>
|
||||
public ClientError()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the detailed error message and error code
|
||||
/// </summary>
|
||||
[DataMember(Name = "error")]
|
||||
public ClientExceptionMessage Error
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents detailed error message and error code
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class ClientExceptionMessage
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the detailed error code
|
||||
/// </summary>
|
||||
[DataMember(Name = "code")]
|
||||
public string ErrorCode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the detailed error message
|
||||
/// </summary>
|
||||
[DataMember(Name = "message")]
|
||||
public string Message
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents client error with detailed error message and error code
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class ServiceError
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ServiceError" /> class
|
||||
/// </summary>
|
||||
public ServiceError()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the detailed error message and error code
|
||||
/// </summary>
|
||||
[DataMember(Name = "statusCode")]
|
||||
public string ErrorCode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the detailed error message and error code
|
||||
/// </summary>
|
||||
[DataMember(Name = "message")]
|
||||
public string Message
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The class for person creation result.
|
||||
/// </summary>
|
||||
public class CreatePersonResult
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the person identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The person identifier.
|
||||
/// </value>
|
||||
public Guid PersonId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The detected face entity.
|
||||
/// </summary>
|
||||
public class Face
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face identifier.
|
||||
/// </value>
|
||||
public Guid FaceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face rectangle.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face rectangle.
|
||||
/// </value>
|
||||
public FaceRectangle FaceRectangle
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face landmarks.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face landmarks.
|
||||
/// </value>
|
||||
public FaceLandmarks FaceLandmarks
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face attributes.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face attributes.
|
||||
/// </value>
|
||||
public FaceAttributes FaceAttributes
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The face attributes class that holds Age/Gender/Head Pose/Smile/Facial Hair information.
|
||||
/// </summary>
|
||||
public class FaceAttributes
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the age value.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The age value.
|
||||
/// </value>
|
||||
public double Age
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the gender.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The gender.
|
||||
/// </value>
|
||||
public string Gender
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the head pose.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The head pose.
|
||||
/// </value>
|
||||
public HeadPose HeadPose
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the smile value. Represents the confidence of face is smiling.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The smile value.
|
||||
/// </value>
|
||||
public double Smile
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the facial hair.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The facial hair.
|
||||
/// </value>
|
||||
public FacialHair FacialHair
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the glasses type.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The glasses type.
|
||||
/// </value>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Glasses Glasses
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,342 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The face landmarks class.
|
||||
/// </summary>
|
||||
public class FaceLandmarks
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the pupil left.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The pupil left.
|
||||
/// </value>
|
||||
public FeatureCoordinate PupilLeft
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the pupil right.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The pupil right.
|
||||
/// </value>
|
||||
public FeatureCoordinate PupilRight
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose tip.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose tip.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseTip
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mouth left.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The mouth left.
|
||||
/// </value>
|
||||
public FeatureCoordinate MouthLeft
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mouth right.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The mouth right.
|
||||
/// </value>
|
||||
public FeatureCoordinate MouthRight
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eyebrow left outer.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eyebrow left outer.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyebrowLeftOuter
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eyebrow left inner.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eyebrow left inner.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyebrowLeftInner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye left outer.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye left outer.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeLeftOuter
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye left top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye left top.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeLeftTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye left bottom.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye left bottom.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeLeftBottom
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye left inner.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye left inner.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeLeftInner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eyebrow right inner.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eyebrow right inner.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyebrowRightInner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eyebrow right outer.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eyebrow right outer.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyebrowRightOuter
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye right inner.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye right inner.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeRightInner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye right top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye right top.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeRightTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye right bottom.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye right bottom.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeRightBottom
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the eye right outer.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The eye right outer.
|
||||
/// </value>
|
||||
public FeatureCoordinate EyeRightOuter
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose root left.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose root left.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseRootLeft
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose root right.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose root right.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseRootRight
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose left alar top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose left alar top.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseLeftAlarTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose right alar top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose right alar top.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseRightAlarTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose left alar out tip.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose left alar out tip.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseLeftAlarOutTip
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the nose right alar out tip.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The nose right alar out tip.
|
||||
/// </value>
|
||||
public FeatureCoordinate NoseRightAlarOutTip
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the upper lip top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The upper lip top.
|
||||
/// </value>
|
||||
public FeatureCoordinate UpperLipTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the upper lip bottom.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The upper lip bottom.
|
||||
/// </value>
|
||||
public FeatureCoordinate UpperLipBottom
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the under lip top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The under lip top.
|
||||
/// </value>
|
||||
public FeatureCoordinate UnderLipTop
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the under lip bottom.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The under lip bottom.
|
||||
/// </value>
|
||||
public FeatureCoordinate UnderLipBottom
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The face list class
|
||||
/// </summary>
|
||||
public class FaceList : FaceListMetadata
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the persisted faces.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The persisted faces.
|
||||
/// </value>
|
||||
public PersonFace[] PersistedFaces
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The face list metadata class.
|
||||
/// </summary>
|
||||
public class FaceListMetadata
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face list identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face list identifier.
|
||||
/// </value>
|
||||
public string FaceListId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The name.
|
||||
/// </value>
|
||||
public string Name
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The user data.
|
||||
/// </value>
|
||||
public string UserData
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// Face metadata class.
|
||||
/// </summary>
|
||||
public class FaceMetadata
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face identifier.
|
||||
/// </value>
|
||||
public Guid FaceId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The user data.
|
||||
/// </value>
|
||||
public string UserData
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The face rectangle entity.
|
||||
/// </summary>
|
||||
public class FaceRectangle
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The width.
|
||||
/// </value>
|
||||
public int Width
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The height.
|
||||
/// </value>
|
||||
public int Height
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the left.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The left of the face rectangle.
|
||||
/// </value>
|
||||
public int Left
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the top.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The top of the face rectangle.
|
||||
/// </value>
|
||||
public int Top
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents length of moustache, beard and sideburn
|
||||
/// </summary>
|
||||
public class FacialHair
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the moustache value. Represents the length of moustache.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The moustache value.
|
||||
/// </value>
|
||||
public double Moustache
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the beard value. Represents the length of beard.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The beard value.
|
||||
/// </value>
|
||||
public double Beard
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the sideburns value. Represents the length of sideburns.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The sideburns value.
|
||||
/// </value>
|
||||
public double Sideburns
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The class for feature coordinate.
|
||||
/// </summary>
|
||||
public class FeatureCoordinate
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the x in pixel.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The x of the feature coordinate.
|
||||
/// </value>
|
||||
public double X
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the y in pixel.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The y of the feature coordinate.
|
||||
/// </value>
|
||||
public double Y
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows/
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration which represents the type of wearing glasses
|
||||
/// </summary>
|
||||
public enum Glasses
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates not wearing any glasses
|
||||
/// </summary>
|
||||
NoGlasses,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates wearing sunglasses
|
||||
/// </summary>
|
||||
Sunglasses,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates wearing reading glasses
|
||||
/// </summary>
|
||||
ReadingGlasses,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates wearing swimming goggles
|
||||
/// </summary>
|
||||
SwimmingGoggles
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The class for group result.
|
||||
/// </summary>
|
||||
public class GroupResult
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the groups. The groups are ranked by number of faces.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The groups.
|
||||
/// </value>
|
||||
public List<Guid[]> Groups
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the messy group. Messy group contains all the faces which cannot find any similar faces from original faces.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The messy group.
|
||||
/// </value>
|
||||
public Guid[] MessyGroup
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The head pose entity.
|
||||
/// </summary>
|
||||
public class HeadPose
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the roll.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The roll of the face pose.
|
||||
/// </value>
|
||||
public double Roll
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the yaw.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The yaw of the face pose.
|
||||
/// </value>
|
||||
public double Yaw
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the pitch.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The pitch of the face pose.
|
||||
/// </value>
|
||||
public double Pitch
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The identification result.
|
||||
/// </summary>
|
||||
public class IdentifyResult
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face identifier.
|
||||
/// </value>
|
||||
public Guid FaceId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the candidates.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The candidates.
|
||||
/// </value>
|
||||
public Candidate[] Candidates
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The person entity.
|
||||
/// </summary>
|
||||
public class Person
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the person identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The person identifier.
|
||||
/// </value>
|
||||
public Guid PersonId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the persisted face ids.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The persisted face ids.
|
||||
/// </value>
|
||||
public Guid[] PersistedFaceIds
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The name of the person.
|
||||
/// </value>
|
||||
public string Name
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the profile.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The profile.
|
||||
/// </value>
|
||||
public string UserData
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The person face entity.
|
||||
/// </summary>
|
||||
public class PersonFace
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the persisted face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The persisted face identifier.
|
||||
/// </value>
|
||||
public Guid PersistedFaceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The user data.
|
||||
/// </value>
|
||||
public string UserData
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The person group entity.
|
||||
/// </summary>
|
||||
public class PersonGroup
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the person group identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The person group identifier.
|
||||
/// </value>
|
||||
public string PersonGroupId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The name of the person group.
|
||||
/// </value>
|
||||
public string Name
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The user data.
|
||||
/// </value>
|
||||
public string UserData
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The class for similar face.
|
||||
/// </summary>
|
||||
public class SimilarFace
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The face identifier.
|
||||
/// </value>
|
||||
public Guid FaceId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confidence.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The confidence.
|
||||
/// </value>
|
||||
public double Confidence
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The class for similar persisted face.
|
||||
/// </summary>
|
||||
public class SimilarPersistedFace
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the persisted face identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The persisted face identifier.
|
||||
/// </value>
|
||||
public Guid PersistedFaceId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confidence value.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The confidence value.
|
||||
/// </value>
|
||||
public double Confidence
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
#region Enumerations
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration represents status of training
|
||||
/// </summary>
|
||||
public enum Status
|
||||
{
|
||||
/// <summary>
|
||||
/// Training succeeded
|
||||
/// </summary>
|
||||
Succeeded,
|
||||
|
||||
/// <summary>
|
||||
/// Training failed
|
||||
/// </summary>
|
||||
Failed,
|
||||
|
||||
/// <summary>
|
||||
/// Training still in progress
|
||||
/// </summary>
|
||||
Running
|
||||
}
|
||||
|
||||
#endregion Enumerations
|
||||
|
||||
/// <summary>
|
||||
/// The training status entity.
|
||||
/// </summary>
|
||||
public class TrainingStatus
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The status.
|
||||
/// </value>
|
||||
public Status Status
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the create time.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The create time.
|
||||
/// </value>
|
||||
public DateTime CreatedDateTime
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the last action time.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The last action time.
|
||||
/// </value>
|
||||
public DateTime LastActionDateTime
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the message.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The message.
|
||||
/// </value>
|
||||
public string Message
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// The verify result entity.
|
||||
/// </summary>
|
||||
public class VerifyResult
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is same.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if this instance is same; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool IsIdentical
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confidence.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The confidence.
|
||||
/// </value>
|
||||
public double Confidence
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents client error with detailed error message and error code
|
||||
/// </summary>
|
||||
public class FaceAPIException : Exception
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FaceAPIException" /> class
|
||||
/// </summary>
|
||||
public FaceAPIException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FaceAPIException" /> class
|
||||
/// </summary>
|
||||
/// <param name="errorCode">Code represents the error category</param>
|
||||
/// <param name="errorMessage">Message represents the detailed error description</param>
|
||||
/// <param name="statusCode">Http status code</param>
|
||||
public FaceAPIException(string errorCode, string errorMessage, HttpStatusCode statusCode)
|
||||
{
|
||||
ErrorCode = errorCode;
|
||||
ErrorMessage = errorMessage;
|
||||
HttpStatus = statusCode;
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the error code
|
||||
/// </summary>
|
||||
public string ErrorCode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the error message
|
||||
/// </summary>
|
||||
public string ErrorMessage
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets http status of http response.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The HTTP status.
|
||||
/// </value>
|
||||
public HttpStatusCode HttpStatus
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,459 @@
|
|||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
|
||||
//
|
||||
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
|
||||
// https://github.com/Microsoft/Cognitive-Face-Windows
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// MIT License:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.ProjectOxford.Face.Contract;
|
||||
|
||||
namespace Microsoft.ProjectOxford.Face
|
||||
{
|
||||
#region Enumerations
|
||||
|
||||
/// <summary>
|
||||
/// Supported face attribute types
|
||||
/// </summary>
|
||||
public enum FaceAttributeType
|
||||
{
|
||||
/// <summary>
|
||||
/// Analyses age
|
||||
/// </summary>
|
||||
Age,
|
||||
|
||||
/// <summary>
|
||||
/// Analyses gender
|
||||
/// </summary>
|
||||
Gender,
|
||||
|
||||
/// <summary>
|
||||
/// Analyses facial hair
|
||||
/// </summary>
|
||||
FacialHair,
|
||||
|
||||
/// <summary>
|
||||
/// Analyses whether is smiling
|
||||
/// </summary>
|
||||
Smile,
|
||||
|
||||
/// <summary>
|
||||
/// Analyses head pose
|
||||
/// </summary>
|
||||
HeadPose,
|
||||
|
||||
/// <summary>
|
||||
/// Analyses glasses type
|
||||
/// </summary>
|
||||
Glasses,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// two working modes of Face - Find Similar
|
||||
/// </summary>
|
||||
public enum FindSimilarMatchMode
|
||||
{
|
||||
/// <summary>
|
||||
/// matchPerson mode of Face - Find Similar, return the similar faces of the same person with the query face.
|
||||
/// </summary>
|
||||
matchPerson,
|
||||
|
||||
/// <summary>
|
||||
/// matchFace mode of Face - Find Similar, return the similar faces of the query face, ignoring if they belong to the same person.
|
||||
/// </summary>
|
||||
matchFace
|
||||
}
|
||||
|
||||
#endregion Enumerations
|
||||
|
||||
/// <summary>
|
||||
/// The face service client proxy interface.
|
||||
/// </summary>
|
||||
public interface IFaceServiceClient
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets default request headers for all following http request
|
||||
/// </summary>
|
||||
HttpRequestHeaders DefaultRequestHeaders
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Adds the face to face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="imageUrl">The face image URL.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="targetFace">The target face.</param>
|
||||
/// <returns>
|
||||
/// Add face result.
|
||||
/// </returns>
|
||||
Task<AddPersistedFaceResult> AddFaceToFaceListAsync(string faceListId, string imageUrl, string userData = null, FaceRectangle targetFace = null);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the face to face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="imageStream">The face image stream.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="targetFace">The target face.</param>
|
||||
/// <returns>
|
||||
/// Add face result.
|
||||
/// </returns>
|
||||
Task<AddPersistedFaceResult> AddFaceToFaceListAsync(string faceListId, Stream imageStream, string userData = null, FaceRectangle targetFace = null);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a face to a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="imageUrl">The face image URL.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="targetFace">The target face.</param>
|
||||
/// <returns>
|
||||
/// Add person face result.
|
||||
/// </returns>
|
||||
Task<AddPersistedFaceResult> AddPersonFaceAsync(string personGroupId, Guid personId, string imageUrl, string userData = null, FaceRectangle targetFace = null);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a face to a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="imageStream">The face image stream.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="targetFace">The Target Face.</param>
|
||||
/// <returns>
|
||||
/// Add person face result.
|
||||
/// </returns>
|
||||
Task<AddPersistedFaceResult> AddPersonFaceAsync(string personGroupId, Guid personId, Stream imageStream, string userData = null, FaceRectangle targetFace = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task CreateFaceListAsync(string faceListId, string name, string userData);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>The CreatePersonResult entity.</returns>
|
||||
Task<CreatePersonResult> CreatePersonAsync(string personGroupId, string name, string userData = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group identifier.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task CreatePersonGroupAsync(string personGroupId, string name, string userData = null);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the face from face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="persistedFaceId">The persisted face identifier.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task DeleteFaceFromFaceListAsync(string faceListId, Guid persistedFaceId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task DeleteFaceListAsync(string faceListId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task DeletePersonAsync(string personGroupId, Guid personId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a face of a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="persistedFaceId">The persisted face id.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task DeletePersonFaceAsync(string personGroupId, Guid personId, Guid persistedFaceId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task DeletePersonGroupAsync(string personGroupId);
|
||||
|
||||
/// <summary>
|
||||
/// Detects an URL asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="imageUrl">The image URL.</param>
|
||||
/// <param name="returnFaceId">If set to <c>true</c> [return face ID].</param>
|
||||
/// <param name="returnFaceLandmarks">If set to <c>true</c> [return face landmarks].</param>
|
||||
/// <param name="returnFaceAttributes">Return face attributes.</param>
|
||||
/// <returns>The detected faces.</returns>
|
||||
Task<Microsoft.ProjectOxford.Face.Contract.Face[]> DetectAsync(string imageUrl, bool returnFaceId = true, bool returnFaceLandmarks = false, IEnumerable<FaceAttributeType> returnFaceAttributes = null);
|
||||
|
||||
/// <summary>
|
||||
/// Detects an image asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="imageStream">The image stream.</param>
|
||||
/// <param name="returnFaceId">If set to <c>true</c> [return face ID].</param>
|
||||
/// <param name="returnFaceLandmarks">If set to <c>true</c> [return face landmarks].</param>
|
||||
/// <param name="returnFaceAttributes">Return face attributes.</param>
|
||||
/// <returns>The detected faces.</returns>
|
||||
Task<Microsoft.ProjectOxford.Face.Contract.Face[]> DetectAsync(Stream imageStream, bool returnFaceId = true, bool returnFaceLandmarks = false, IEnumerable<FaceAttributeType> returnFaceAttributes = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the similar faces asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceId">The face identifier.</param>
|
||||
/// <param name="faceIds">The face identifiers.</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The max number of candidates returned.</param>
|
||||
/// <returns>
|
||||
/// The similar faces.
|
||||
/// </returns>
|
||||
Task<SimilarFace[]> FindSimilarAsync(Guid faceId, Guid[] faceIds, int maxNumOfCandidatesReturned = 20);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the similar faces asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceId">The face identifier.</param>
|
||||
/// <param name="faceIds">The face identifiers.</param>
|
||||
/// <param name="mode">Algorithm mode option, default as "matchPerson".</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The max number of candidates returned.</param>
|
||||
/// <returns>
|
||||
/// The similar faces.
|
||||
/// </returns>
|
||||
Task<SimilarFace[]> FindSimilarAsync(Guid faceId, Guid[] faceIds, FindSimilarMatchMode mode, int maxNumOfCandidatesReturned = 20);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the similar faces asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceId">The face identifier.</param>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The max number of candidates returned.</param>
|
||||
/// <returns>
|
||||
/// The similar persisted faces.
|
||||
/// </returns>
|
||||
Task<SimilarPersistedFace[]> FindSimilarAsync(Guid faceId, string faceListId, int maxNumOfCandidatesReturned = 20);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the similar faces asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceId">The face identifier.</param>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="mode">Algorithm mode option, default as "matchPerson".</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The max number of candidates returned.</param>
|
||||
/// <returns>
|
||||
/// The similar persisted faces.
|
||||
/// </returns>
|
||||
Task<SimilarPersistedFace[]> FindSimilarAsync(Guid faceId, string faceListId, FindSimilarMatchMode mode, int maxNumOfCandidatesReturned = 20);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <returns>Face list object.</returns>
|
||||
Task<FaceList> GetFaceListAsync(string faceListId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <returns>The person entity.</returns>
|
||||
Task<Person> GetPersonAsync(string personGroupId, Guid personId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a face of a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="persistedFaceId">The persisted face id.</param>
|
||||
/// <returns>The person face entity.</returns>
|
||||
Task<PersonFace> GetPersonFaceAsync(string personGroupId, Guid personId, Guid persistedFaceId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <returns>The person group entity.</returns>
|
||||
Task<PersonGroup> GetPersonGroupAsync(string personGroupId);
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously list the first 1000 person groups.
|
||||
/// </summary>
|
||||
/// <returns>Person group entity array.</returns>
|
||||
[Obsolete("use ListPersonGroupsAsync instead")]
|
||||
Task<PersonGroup[]> GetPersonGroupsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously list the top person groups whose Id is larger than "start".
|
||||
/// </summary>
|
||||
/// <param name="start">the start point string in listing person groups</param>
|
||||
/// <param name="top">the number of person groups to list</param>
|
||||
/// <returns>Person group entity array.</returns>
|
||||
Task<PersonGroup[]> ListPersonGroupsAsync(string start = "", int top = 1000);
|
||||
|
||||
/// <summary>
|
||||
/// Gets person group training status asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <returns>The person group training status.</returns>
|
||||
Task<TrainingStatus> GetPersonGroupTrainingStatusAsync(string personGroupId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all persons inside a person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <returns>
|
||||
/// The person entity array.
|
||||
/// </returns>
|
||||
Task<Person[]> GetPersonsAsync(string personGroupId);
|
||||
|
||||
/// <summary>
|
||||
/// Groups the face asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceIds">The face ids.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task<GroupResult> GroupAsync(Guid[] faceIds);
|
||||
|
||||
/// <summary>
|
||||
/// Identities the faces in a given person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="faceIds">The face ids.</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The maximum number of candidates returned for each face.</param>
|
||||
/// <returns>The identification results</returns>
|
||||
Task<IdentifyResult[]> IdentifyAsync(string personGroupId, Guid[] faceIds, int maxNumOfCandidatesReturned = 1);
|
||||
|
||||
/// <summary>
|
||||
/// Identities the faces in a given person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="faceIds">The face ids.</param>
|
||||
/// <param name="maxNumOfCandidatesReturned">The maximum number of candidates returned for each face.</param>
|
||||
/// <param name="confidenceThreshold">user-specified confidence threshold.</param>
|
||||
/// <returns>The identification results</returns>
|
||||
Task<IdentifyResult[]> IdentifyAsync(string personGroupId, Guid[] faceIds, float confidenceThreshold, int maxNumOfCandidatesReturned = 1);
|
||||
|
||||
/// <summary>
|
||||
/// Lists the face lists asynchronously.
|
||||
/// </summary>
|
||||
/// <returns>FaceListMetadata array.</returns>
|
||||
Task<FaceListMetadata[]> ListFaceListsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Trains the person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task TrainPersonGroupAsync(string personGroupId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the face list asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceListId">The face list identifier.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task UpdateFaceListAsync(string faceListId, string name, string userData);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task UpdatePersonAsync(string personGroupId, Guid personId, string name, string userData = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a face of a person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="personId">The person id.</param>
|
||||
/// <param name="persistedFaceId">The persisted face id.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task UpdatePersonFaceAsync(string personGroupId, Guid personId, Guid persistedFaceId, string userData = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a person group asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="personGroupId">The person group id.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <returns>Task object.</returns>
|
||||
Task UpdatePersonGroupAsync(string personGroupId, string name, string userData = null);
|
||||
|
||||
/// <summary>
|
||||
/// Verifies whether the specified two faces belong to the same person asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="faceId1">The face id 1.</param>
|
||||
/// <param name="faceId2">The face id 2.</param>
|
||||
/// <returns>The verification result.</returns>
|
||||
Task<VerifyResult> VerifyAsync(Guid faceId1, Guid faceId2);
|
||||
|
||||
/// <summary>
|
||||
/// Verify whether one face belong to a person.
|
||||
/// </summary>
|
||||
/// <param name="faceId"></param>
|
||||
/// <param name="personGroupId"></param>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
Task<VerifyResult> VerifyAsync(Guid faceId, string personGroupId, Guid personId);
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.4
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ProjectOxford.Face", "Microsoft.ProjectOxford.Face.csproj", "{BA6E9E2C-21EB-435B-9F29-F98F1652D2E1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BA6E9E2C-21EB-435B-9F29-F98F1652D2E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BA6E9E2C-21EB-435B-9F29-F98F1652D2E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BA6E9E2C-21EB-435B-9F29-F98F1652D2E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BA6E9E2C-21EB-435B-9F29-F98F1652D2E1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Загрузка…
Ссылка в новой задаче