private void OnDetectFaces(FacesTopLevelMultiple multipleImages, string data)
 {
     if (multipleImages != null)
     {
         Log.Debug("ExampleVisualRecognition", "images processed: {0}", multipleImages.images_processed);
         foreach (FacesTopLevelSingle faces in multipleImages.images)
         {
             Log.Debug("ExampleVisualRecognition", "\tsource_url: {0}, resolved_url: {1}", faces.source_url, faces.resolved_url);
             foreach (OneFaceResult face in faces.faces)
             {
                 Log.Debug("ExampleVisulaRecognition", "\t\tFace location: {0}, {1}, {2}, {3}", face.face_location.left, face.face_location.top, face.face_location.width, face.face_location.height);
                 Log.Debug("ExampleVisulaRecognition", "\t\tGender: {0}, Score: {1}", face.gender.gender, face.gender.score);
                 Log.Debug("ExampleVisulaRecognition", "\t\tAge Min: {0}, Age Max: {1}, Score: {2}", face.age.min, face.age.max, face.age.score);
                 Log.Debug("ExampleVisulaRecognition", "\t\tName: {0}, Score: {1}, Type Heiarchy: {2}", face.identity.name, face.identity.score, face.identity.type_hierarchy);
             }
         }
     }
     else
     {
         Log.Debug("ExampleVisualRecognition", "Detect faces failed!");
     }
 }
Example #2
0
        private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, string customData)
        {
            Test(multipleImages != null);
            if (multipleImages != null)
            {
                Log.Debug("TestVisualRecognition", "DetectFaces POST  images processed: {0}", multipleImages.images_processed);
                foreach (FacesTopLevelSingle faces in multipleImages.images)
                {
                    Log.Debug("TestVisualRecognition", "\tDetectFaces POST  source_url: {0}, resolved_url: {1}", faces.source_url, faces.resolved_url);
                    foreach (OneFaceResult face in faces.faces)
                    {
                        if (face.face_location != null)
                        {
                            Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Face location: {0}, {1}, {2}, {3}", face.face_location.left, face.face_location.top, face.face_location.width, face.face_location.height);
                        }
                        if (face.gender != null)
                        {
                            Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Gender: {0}, Score: {1}", face.gender.gender, face.gender.score);
                        }
                        if (face.age != null)
                        {
                            Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Age Min: {0}, Age Max: {1}, Score: {2}", face.age.min, face.age.max, face.age.score);
                        }
                        if (face.identity != null)
                        {
                            Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Name: {0}, Score: {1}, Type Heiarchy: {2}", face.identity.name, face.identity.score, face.identity.type_hierarchy);
                        }
                    }
                }

                m_DetectFacesPOSTTested = true;
            }
            else
            {
                Log.Debug("ExampleVisualRecognition", "DetectFaces POST Detect faces failed!");
            }
        }
 private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, Dictionary <string, object> customData)
 {
     Log.Debug("TestVisualRecognition.OnDetectFacesPost()", "VisualRecognition - DetectFacesPost Response: {0}", customData["json"].ToString());
     Test(multipleImages != null);
     _detectFacesPostTested = true;
 }
Example #4
0
 private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, Dictionary <string, object> customData)
 {
     Log.Debug("ExampleVisualRecognition.OnDetectFacesPost()", "{0}", customData["json"].ToString());
     _detectFacesPostTested = true;
 }
 private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, string data)
 {
     Log.Debug("ExampleVisualRecognition", "VisualRecognition - DetectFacesPost Response: {0}", data);
     Test(multipleImages != null);
     _detectFacesPostTested = true;
 }