SkyBiometry Face Detection and Recognition

KOSTENLOS
Durch skybiometry | Aktualisiert 23 giorni fa | Media
Popularität

8.1 / 10

Latenz

2,060ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

403 - MISSING_ARGUMENTS - urls or files required

Rapid account: Wade Penistone
WadePenistone
8 anni fa

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.

Rapid account: Smdeveloper 17
smdeveloper17 Commented 5 anni fa

recognizeResult.Photos[0].Tags[0].Matches[0].Confidence its always returning 0

Rapid account: Smdeveloper 17
smdeveloper17 Commented 5 anni fa

recognizeResult.Photos[0].Tags[0].Matches[0].Confidence is always returning 0

Rapid account: Skybiometry
skybiometry Commented 7 anni fa

Good luck with your project!

Rapid account: Vinaychaturvedi
vinaychaturvedi Commented 7 anni fa

Thanks!

Rapid account: Skybiometry
skybiometry Commented 7 anni fa

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.

Rapid account: Vinaychaturvedi
vinaychaturvedi Commented 7 anni fa

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));

        var result1 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { firstPicStream }, Detector.Aggressive, Attributes.Default, null, null, null));
        var result3 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { secondPicStream }, Detector.Aggressive, Attributes.Default, null, null, null));
        var urls = new List<string>();
        urls.Add(result1.Photos[0].Url);
        urls.Add(result3.Photos[0].Url);
        var tags1 = result1.Photos[0].Tags;
        var tags3 = result3.Photos[0].Tags;
        var tagsIds = tags1.Select(tag => tag.TagId).ToList();
        tagsIds.AddRange(tags3.Select(tag => tag.TagId));
        client.Faces.EndTrain(client.Faces.BeginTrain(tagsIds, "Gate", null, null, null));
        var tagSaveResponce = client.Tags.EndSave(client.Tags.BeginSave(tagsIds, "vinay3@Gate", "Vinay Chaturvedi2", null, null, null));
       IEnumerable<string> uids2 = new string[] { "vinay3@Gate" };
        FCResult recognizeResult = client.Faces.EndRecognize(client.Faces.BeginRecognize(uids2, urls, null, "Gate", Detector.Aggressive, Attributes.Default, 64, null, null, null));
        if (recognizeResult.Photos[0].Tags[0].Matches[0].Confidence > 50)
            MessageBox.Show("Matching!");

//////////////////////////////////////////////

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??

Rapid account: Vinaychaturvedi
vinaychaturvedi Commented 7 anni fa

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));

        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” };
client.Faces.BeginTrain(uids, “Gate”, null, null, null);

        var result1 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { firstPicStream }, Detector.Aggressive, Attributes.Default, null, null, null));
        var result3 = client.Faces.EndDetect(client.Faces.BeginDetect(null, new Stream[] { secondPicStream }, Detector.Aggressive, Attributes.Default, null, null, null));

var urls = new List<string>();
urls.Add(result1.Photos[0].Url);
urls.Add(result3.Photos[0].Url);

        var tags1 = result1.Photos[0].Tags;
        var tags3 = result3.Photos[0].Tags;
        var tagsIds = tags1.Select(tag => tag.TagId).ToList();
        tagsIds.AddRange(tags3.Select(tag => tag.TagId));
        client.Faces.EndTrain(client.Faces.BeginTrain(tagsIds, "Gate", null, null, null));
        var tagSaveResponce = client.Tags.EndSave(client.Tags.BeginSave(tagsIds, "Gate", "Vinay1", null, null, null));

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

Rapid account: Skybiometry
skybiometry Commented 7 anni fa

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.

Rapid account: Vinaychaturvedi
vinaychaturvedi Commented 7 anni fa

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);

        IEnumerable<string> url1 = new string[] { "https://scontent.fmaa1-2.fna.fbcdn.net/v/t1.0-9/13178812_1267669303260590_8458802578452012432_n.jpg?oh=5acec8a84141772251580ed730d6a5a7&oe=588EEFC2" };
        IEnumerable<string> uids = new string[] { "all" };
        FCResult result2= client.Faces.EndRecognize(client.Faces.BeginRecognize(uids, url1, new System.IO.Stream[] { stream }, "Gate", Detector.Aggressive, Attributes.All,64,null, null, null));

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

Rapid account: Skybiometry
skybiometry Commented 7 anni fa

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

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen