2枚の写真の類似性を比較する必要があります。たとえば、息子と父親の写真で、類似度のパーセンテージを返します。SkyBiometry.Client.FC に使用します。API によって返された結果に問題があります。認識のすべてのケースで、60% ~ 68% の類似性 (しきい値) が得られます。最後に、2 つの同じ写真を比較して、54% の結果を得ようとしました。私は混乱しています。何が間違っていますか?これは私のコードです:
var client = new FCClient("my client id", "my client secret");
var path = Server.MapPath("~/Content/Upload/1");
var ids = new List<string> { "my client id" };
var urls = new List<string>();
Stream firstPicStream = System.IO.File.OpenRead(Path.Combine(path, "me.jpg"));
Stream secondPicStream = System.IO.File.OpenRead(Path.Combine(path, "me.jpg"));
var result1 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { firstPicStream }, Detector.Aggressive, Attributes.Default, null, null));
var result2 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { secondPicStream }, Detector.Aggressive, Attributes.Default, null, null));
urls.Add(result1.Photos[0].Url);
urls.Add(result2.Photos[0].Url);
var tags1 = result1.Photos[0].Tags;
var tags2 = result2.Photos[0].Tags;
var tagsIds = tags1.Select(tag => tag.TagId).ToList();
tagsIds.AddRange(tags2.Select(tag => tag.TagId));
var tagSaveResponce = client.Tags.EndSave(client.Tags.BeginSave(tagsIds, "My Namespace", "label", null, null));
var recognizeResult = client.Faces.EndRecognize(client.Faces.BeginRecognize(ids, urls, null, "My Namespace", Detector.Aggressive, Attributes.Default, null, null));