@@ -194,10 +194,14 @@ private void OnDetectFaces(FacesTopLevelMultiple multipleImages, string data)
194194 Log . Debug ( "ExampleVisualRecognition" , "\t source_url: {0}, resolved_url: {1}" , faces . source_url , faces . resolved_url ) ;
195195 foreach ( OneFaceResult face in faces . faces )
196196 {
197- Log . Debug ( "ExampleVisulaRecognition" , "\t \t Face location: {0}, {1}, {2}, {3}" , face . face_location . left , face . face_location . top , face . face_location . width , face . face_location . height ) ;
198- Log . Debug ( "ExampleVisulaRecognition" , "\t \t Gender: {0}, Score: {1}" , face . gender . gender , face . gender . score ) ;
199- Log . Debug ( "ExampleVisulaRecognition" , "\t \t Age Min: {0}, Age Max: {1}, Score: {2}" , face . age . min , face . age . max , face . age . score ) ;
200- Log . Debug ( "ExampleVisulaRecognition" , "\t \t Name: {0}, Score: {1}, Type Heiarchy: {2}" , face . identity . name , face . identity . score , face . identity . type_hierarchy ) ;
197+ if ( face . face_location != null )
198+ Log . Debug ( "ExampleVisulaRecognition" , "\t \t Face location: {0}, {1}, {2}, {3}" , face . face_location . left , face . face_location . top , face . face_location . width , face . face_location . height ) ;
199+ if ( face . gender != null )
200+ Log . Debug ( "ExampleVisulaRecognition" , "\t \t Gender: {0}, Score: {1}" , face . gender . gender , face . gender . score ) ;
201+ if ( face . age != null )
202+ Log . Debug ( "ExampleVisulaRecognition" , "\t \t Age Min: {0}, Age Max: {1}, Score: {2}" , face . age . min , face . age . max , face . age . score ) ;
203+ if ( face . identity != null )
204+ Log . Debug ( "ExampleVisulaRecognition" , "\t \t Name: {0}, Score: {1}, Type Heiarchy: {2}" , face . identity . name , face . identity . score , face . identity . type_hierarchy ) ;
201205 }
202206 }
203207 }
0 commit comments