├── .gitignore
├── FaceppDemo
├── FaceppDemo.sln
└── FaceppDemo
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── FaceppDemo.csproj
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── app.config
├── FaceppSDK.dll
├── FaceppSDK
├── FaceppSDK.sln
└── FaceppSDK
│ ├── Class1.cs
│ ├── Constants.cs
│ ├── Extends.cs
│ ├── FaceEntity.cs
│ ├── FaceService.cs
│ ├── FaceppSDK.csproj
│ ├── HttpMethods.cs
│ ├── IBaseFace.cs
│ └── Properties
│ └── AssemblyInfo.cs
├── README.md
├── bvzcr0uy.azj.txt
└── log4net.dll
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceppDemo", "FaceppDemo\FaceppDemo.csproj", "{1F372A9D-BD78-4C32-A434-4664D67326F5}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {1F372A9D-BD78-4C32-A434-4664D67326F5}.Debug|x86.ActiveCfg = Debug|x86
13 | {1F372A9D-BD78-4C32-A434-4664D67326F5}.Debug|x86.Build.0 = Debug|x86
14 | {1F372A9D-BD78-4C32-A434-4664D67326F5}.Release|x86.ActiveCfg = Release|x86
15 | {1F372A9D-BD78-4C32-A434-4664D67326F5}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Windows;
7 |
8 | namespace FaceppDemo
9 | {
10 | ///
11 | /// App.xaml 的交互逻辑
12 | ///
13 | public partial class App : Application
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/FaceppDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {1F372A9D-BD78-4C32-A434-4664D67326F5}
9 | WinExe
10 | Properties
11 | FaceppDemo
12 | FaceppDemo
13 | v4.0
14 |
15 |
16 | 512
17 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
18 | 4
19 |
20 |
21 | x86
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | x86
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\..\FaceppSDK\FaceppSDK\bin\Debug\FaceppSDK.dll
42 |
43 |
44 | ..\..\FaceppSDK\FaceppSDK\bin\Debug\log4net.dll
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | 4.0
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | MSBuild:Compile
64 | Designer
65 |
66 |
67 | MSBuild:Compile
68 | Designer
69 |
70 |
71 | App.xaml
72 | Code
73 |
74 |
75 | MainWindow.xaml
76 | Code
77 |
78 |
79 |
80 |
81 | Code
82 |
83 |
84 | True
85 | True
86 | Resources.resx
87 |
88 |
89 | True
90 | Settings.settings
91 | True
92 |
93 |
94 | ResXFileCodeGenerator
95 | Resources.Designer.cs
96 |
97 |
98 |
99 | SettingsSingleFileGenerator
100 | Settings.Designer.cs
101 |
102 |
103 |
104 |
105 |
112 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using FaceppSDK;
15 | using System.Windows.Forms;
16 | using System.IO;
17 |
18 | namespace FaceppDemo
19 | {
20 | ///
21 | /// MainWindow.xaml 的交互逻辑
22 | ///
23 | public partial class MainWindow : Window
24 | {
25 | public FaceService fs = new FaceService("2affcadaeddd18f422375adc869f3991", "EsU9hmgweuz8U-nwv6s4JP-9AJt64vhz");
26 | public MainWindow()
27 | {
28 | InitializeComponent();
29 | }
30 | private double max(double x, double y)
31 | {
32 | return (x > y) ? x : y;
33 | }
34 | private void button1_Click(object sender, RoutedEventArgs e)
35 | {
36 | OpenFileDialog openFileDialog = new OpenFileDialog();
37 | openFileDialog.Title = "选择文件";
38 | openFileDialog.Filter = "jpg文件|*.jpg|png文件|*.png|所有文件|*.*";
39 | openFileDialog.FileName = string.Empty;
40 | openFileDialog.FilterIndex = 1;
41 | openFileDialog.RestoreDirectory = true;
42 | openFileDialog.DefaultExt = "jpg";
43 | DialogResult result = openFileDialog.ShowDialog();
44 | if (result == System.Windows.Forms.DialogResult.Cancel)
45 | {
46 | return;
47 | }
48 | String filepath = openFileDialog.FileName;
49 |
50 | BitmapImage bitmap = new BitmapImage();
51 | bitmap.BeginInit();
52 | bitmap.UriSource = new Uri(filepath);
53 | bitmap.DecodePixelHeight = (int)image1.Height;
54 | bitmap.DecodePixelWidth = (int)image1.Width;
55 | bitmap.EndInit();
56 | image1.Source = bitmap;
57 | PngBitmapEncoder pngE = new PngBitmapEncoder();
58 | pngE.Frames.Add(BitmapFrame.Create(bitmap));
59 | using (Stream stream = File.Create(System.Environment.CurrentDirectory + "temp.jpg"))
60 | {
61 | pngE.Save(stream);
62 | }
63 | DetectResult res = fs.Detection_DetectImg(System.Environment.CurrentDirectory + "temp.jpg");
64 | canvas1.Children.Clear();
65 | for (int i = 0; i < res.face.Count; ++i)
66 | {
67 | RectangleGeometry rect = new RectangleGeometry();
68 | rect.Rect = new Rect(max(res.face[i].position.center.x * image1.Width / 100.0 - res.face[i].position.width * image1.Width / 200.0, 0),
69 | max(res.face[i].position.center.y * image1.Height / 100.0 - res.face[i].position.height * image1.Height / 200.0, 0),
70 | res.face[i].position.width * image1.Width / 100.0, res.face[i].position.height * image1.Height / 100.0);
71 | System.Windows.Shapes.Path myPath = new System.Windows.Shapes.Path();
72 | myPath.Stroke = Brushes.Red;
73 | myPath.StrokeThickness = 3;
74 | myPath.Data = rect;
75 | label1.Content = label1.Content + String.Format("({0:F2},{1:F2})", res.face[0].position.center.x, res.face[0].position.center.y);
76 | label2.Content = label2.Content + String.Format("({0:F2},{1:F2})", res.face[0].position.width, res.face[0].position.height);
77 | canvas1.Children.Add(myPath);
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // 有关程序集的常规信息通过以下
8 | // 特性集控制。更改这些特性值可修改
9 | // 与程序集关联的信息。
10 | [assembly: AssemblyTitle("FaceppDemo")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("Microsoft")]
14 | [assembly: AssemblyProduct("FaceppDemo")]
15 | [assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // 将 ComVisible 设置为 false 使此程序集中的类型
20 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
21 | // 则将该类型上的 ComVisible 特性设置为 true。
22 | [assembly: ComVisible(false)]
23 |
24 | //若要开始生成可本地化的应用程序,请在
25 | // 中的 .csproj 文件中
26 | //设置 CultureYouAreCodingWith。例如,如果您在源文件中
27 | //使用的是美国英语,请将 设置为 en-US。然后取消
28 | //对以下 NeutralResourceLanguage 特性的注释。更新
29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36 | //(在页面或应用程序资源词典中
37 | // 未找到某个资源的情况下使用)
38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39 | //(在页面、应用程序或任何主题特定资源词典中
40 | // 未找到某个资源的情况下使用)
41 | )]
42 |
43 |
44 | // 程序集的版本信息由下面四个值组成:
45 | //
46 | // 主版本
47 | // 次版本
48 | // 内部版本号
49 | // 修订号
50 | //
51 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
52 | // 方法是按如下所示使用“*”:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.1
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FaceppDemo.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FaceppDemo.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.1
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FaceppDemo.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/FaceppDemo/FaceppDemo/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FaceppSDK.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buaabarty/facepp-csharp-sdk-beta/892dd8386790e796c2cc20c5f36f2039d904a120/FaceppSDK.dll
--------------------------------------------------------------------------------
/FaceppSDK/FaceppSDK.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceppSDK", "FaceppSDK\FaceppSDK.csproj", "{168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Debug|Mixed Platforms = Debug|Mixed Platforms
10 | Debug|x86 = Debug|x86
11 | Release|Any CPU = Release|Any CPU
12 | Release|Mixed Platforms = Release|Mixed Platforms
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
19 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
20 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Debug|x86.ActiveCfg = Debug|Any CPU
21 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Release|Any CPU.Build.0 = Release|Any CPU
23 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
24 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Release|Mixed Platforms.Build.0 = Release|Any CPU
25 | {168A3A8F-A9EB-48C5-A6A2-2963A8B53F15}.Release|x86.ActiveCfg = Release|Any CPU
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | EndGlobal
31 |
--------------------------------------------------------------------------------
/FaceppSDK/FaceppSDK/Class1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace FaceppSDK
7 | {
8 | public class Class1
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/FaceppSDK/FaceppSDK/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace FaceppSDK
7 | {
8 | class Constants
9 | {
10 | public static String FACE_KEY = "2affcadaeddd18f422375adc869f3991";
11 | public static String FACE_SECRET = "EsU9hmgweuz8U-nwv6s4JP-9AJt64vhz";
12 |
13 | public static String URL_DETECT = "https://apicn.faceplusplus.com/v2/detection/detect";
14 | public static String URL_COMPARE = "https://apicn.faceplusplus.com/v2/recognition/compare";
15 | public static String URL_RECOGNIZE = "https://apicn.faceplusplus.com/v2/recognition/recognize";
16 | public static String URL_SEARCH = "https://apicn.faceplusplus.com/v2/recognition/search";
17 | public static String URL_TRAIN = "https://apicn.faceplusplus.com/v2/recognition/train";
18 | public static String URL_VERIFY = "https://apicn.faceplusplus.com/v2/recognition/verify";
19 |
20 | public static String URL_PERSON_ADDFACE = "https://apicn.faceplusplus.com/v2/person/add_face";
21 | public static String URL_PERSON_CREATE = "https://apicn.faceplusplus.com/v2/person/create";
22 | public static String URL_PERSON_DELETE = "https://apicn.faceplusplus.com/v2/person/delete";
23 | public static String URL_PERSON_GETINFO = "https://apicn.faceplusplus.com/v2/person/get_info";
24 | public static String URL_PERSON_REMOVEFACE = "https://apicn.faceplusplus.com/v2/person/remove_face";
25 | public static String URL_PERSON_SETINFO = "https://apicn.faceplusplus.com/v2/person/set_info";
26 |
27 | public static String URL_GROUP_ADDPERSON = "https://apicn.faceplusplus.com/v2/group/add_person";
28 | public static String URL_GROUP_CREATE = "https://apicn.faceplusplus.com/v2/group/create";
29 | public static String URL_GROUP_DELETE = "https://apicn.faceplusplus.com/v2/group/delete";
30 | public static String URL_GROUP_GETINFO = "https://apicn.faceplusplus.com/v2/group/get_info";
31 | public static String URL_GROUP_REMOVEPERSON = "https://apicn.faceplusplus.com/v2/group/remove_person";
32 | public static String URL_GROUP_SETINFO = "https://apicn.faceplusplus.com/v2/group/set_info";
33 |
34 | public static String URL_INFO_GETAPP = "https://apicn.faceplusplus.com/v2/info/get_app";
35 | public static String URL_INFO_GETFACE = "https://apicn.faceplusplus.com/v2/info/get_face";
36 | public static String URL_INFO_GETGROUPLIST = "https://apicn.faceplusplus.com/v2/info/get_group_list";
37 | public static String URL_INFO_GETIMAGE = "https://apicn.faceplusplus.com/v2/info/get_image";
38 | public static String URL_INFO_GETPERSONLIST = "https://apicn.faceplusplus.com/v2/info/get_person_list";
39 | public static String URL_INFO_GETQUOTA = "https://apicn.faceplusplus.com/v2/info/get_quota";
40 | public static String URL_INFO_GETSESSION = "https://apicn.faceplusplus.com/v2/info/get_session";
41 | public static String URL_INFO_GET_FACESETLIST = "https://apicn.faceplusplus.com/v2/info/get_faceset_list";
42 |
43 | public static String URL_FACESET_CREATE = "https://apicn.faceplusplus.com/v2/faceset/create";
44 | public static String URL_FACESET_DELETE = "https://apicn.faceplusplus.com/v2/faceset/delete";
45 | public static String URL_FACESET_ADDFACE = "https://apicn.faceplusplus.com/v2/faceset/add_face";
46 | public static String URL_FACESET_REMOVEFACE = "https://apicn.faceplusplus.com/v2/faceset/remove_face";
47 | public static String URL_FACESET_SETINFO = "https://apicn.faceplusplus.com/v2/faceset/set_info";
48 | public static String URL_FACESET_GET_INFO = "https://apicn.faceplusplus.com/v2/faceset/get_info";
49 |
50 | public static String URL_TRAIN_VERIFY = "https://apicn.faceplusplus.com/v2/train/verify";
51 | public static String URL_TRAIN_SEARCH = "https://apicn.faceplusplus.com/v2/train/search";
52 | public static String URL_TRAIN_IDENTIFY = "https://apicn.faceplusplus.com/v2/train/identify";
53 |
54 | public static String URL_GROUPING_GROUPING = "https://apicn.faceplusplus.com/v2/grouping/grouping";
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/FaceppSDK/FaceppSDK/Extends.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.IO;
7 | using System.Xml;
8 | using System.Xml.Serialization;
9 | using System.Text.RegularExpressions;
10 | using System.Runtime.Serialization.Json;
11 |
12 | namespace FaceppSDK
13 | {
14 | public static class Extends
15 | {
16 | #region 转换成URL参数
17 | ///
18 | /// 转换成URL参数
19 | ///
20 | ///
21 | ///
22 | public static string ToQueryString(this IDictionary