Hi there,
I have been trying out your API and have run into an issue with the faces/detect method.
I have followed the docs, detected a face using an image, tagged it using the namespace and user ID and then gone to use the face detect method.
When I use this method using a second image to find a user with (using the Mashape web based API, not my own) using the upload option it gives me this error. The upload field is called files so surely this must be an issue on your guys end.
Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:
recognizeResult.Photos[0].Tags[0].Matches[0].Confidence its always returning 0
recognizeResult.Photos[0].Tags[0].Matches[0].Confidence is always returning 0
Good luck with your project!
Thanks!
Hello,
By default recommended similarity percentage value to treat face as matching (of the same person) is 40%. But please note that there is no exact confidence level which would be suitable for all the projects. The higher your confidence level - the higher is probability to get false rejection and the lower is confidence level - the higher is probability to get false acceptance. You should decide what is more critical to your project - false acceptance or false rejection and then choose the right confidence level.
What is more, you can just try to experiment with different confidence levels and after that make a decision.
Hi
On the above post I got the final required result with following code tweaking:
//////////////////////////////////////////////
FCClient client = new FCClient(“api key here”, “api secret here”); FCResult result = client.Account.EndAuthenticate(client.Account.BeginAuthenticate(null, null,null));
Stream stream = System.IO.File.OpenRead(openFileDialog1.FileName);
Stream secondPicStream = System.IO.File.OpenRead(openFileDialog2.FileName);
Stream firstPicStream = System.IO.File.OpenRead(openFileDialog1.FileName);
IEnumerable<string> uids = new string[] { “all” };
var resulttrain=client.Faces.EndTrain(client.Faces.BeginTrain(uids, “Gate”, null, null, null));
//////////////////////////////////////////////
It is working as expected now. But one final question is : What Confidence value in Matches section of the tags can be counted for a successful match? Like above 40 or above 50??
Hi
I have the following operation ID:
b6a41b6855734b56b86f83bb4795e209
in which, I used the following code:
///////////////////////////////////////////////////////////////
FCClient client = new FCClient(“api key here”, “api secret here”);
FCResult result = client.Account.EndAuthenticate(client.Account.BeginAuthenticate(null, null,null));
IEnumerable<string> uids = new string[] { “all” };
client.Faces.BeginTrain(uids, “Gate”, null, null, null);
var urls = new List<string>();
urls.Add(result1.Photos[0].Url);
urls.Add(result3.Photos[0].Url);
FCResult recognizeResult = client.Faces.EndRecognize(client.Faces.BeginRecognize(tagsIds, urls, null, “Gate”, Detector.Aggressive, Attributes.Default, 64, null, null, null));
////////////////////////////////////////////////////////////////////////////////
But, I get the error code 409 - UID_TOO_LONG - uid TEMP_F@0c378cd43a15b4866c9a2d1d01360159_d03210c17f32c_49.52_55.27_0_1 exceeds max length: 50.
How can I fix this?
Thanks
Vinay
Hello Vinay,
Concerning your request here is some explanations.
Pitch and Roll are face posture angles returned by face detection. Roll – when person tilts his head sideways and Pitch – when person nods his head down or raises up. Yaw angle – when person turns head sideways.
For face recognition – first faces should be trained (face templates should be created), FACES/TRAIN uses tags previously saved using tags/save methods.
More can be read here: https://skybiometry.com/documentation/#docs – 4.10 FACES/TRAIN
Once face tags were trained, you can use faces/recognize method. Results “matching or not” will be returned as UIDS, like shown in 4.12 FACES/RECOGNIZE example:
<…>
{
“uid” : “mary@docs”,
“confidence” : 98
}
<…>
The higher the confidence means less chance that false acceptance has happened. In other words – bigger value means algorithms is more sure that face belongs to the same person.
Hi
I have one more query. I used the client link mentioned above, below is my code used in .NET:
FCClient client = new FCClient(“my api key here”, “my api secret key here”);
FCResult result = client.Account.EndAuthenticate(client.Account.BeginAuthenticate(null, null,null));
System.IO.Stream stream = System.IO.File.OpenRead(openFileDialog1.FileName);
The end result is stored in result2 and coming fine but problem is how do I track whether the image I am loading from openFileDialog1 matches the url?
I mean to ask which is that variable in the FCResult varialble? I saw “Matches” which was under Tags in “Photos” of the result2 variable and it was always 0 no matter if I uploaded the same image as in the link. There were 2 variables Pitch and Roll too which I did not understand.(If they were regarding matches). There was “Similarities” in the same section but it is always null.
Finally, do I need to seperately write some code to “train” the photo in the url?
Please help
Thanks
Vinay
It seems you are using mashape proxy which when sending data to our service does not convert to correct format. Our system expects content-type: multipart/mixed format, but receives different request.
If you need to build .NET application, please use this client provided by us: https://skybiometry.com/wp-content/uploads/2015/10/SkyBiometry.Client.FC-1-1.zip