sparse emotion at facedetection.html
add accessories attributes
Showing
3 changed files
with
12 additions
and
7 deletions
... | @@ -36,7 +36,7 @@ var uriBase = 'https://eastasia.api.cognitive.microsoft.com/face/v1.0/detect'; | ... | @@ -36,7 +36,7 @@ var uriBase = 'https://eastasia.api.cognitive.microsoft.com/face/v1.0/detect'; |
36 | var params = { | 36 | var params = { |
37 | 'returnFaceId': 'true', | 37 | 'returnFaceId': 'true', |
38 | 'returnFaceLandmarks': 'false', | 38 | 'returnFaceLandmarks': 'false', |
39 | - 'returnFaceAttributes': 'age,gender,emotion,hair' | 39 | + 'returnFaceAttributes': 'age,gender,emotion,hair,accessories' |
40 | //'headPose,smile,facialHair,glasses, emotion,hair,makeup,occlusion,accessories,blur,exposure,noise' | 40 | //'headPose,smile,facialHair,glasses, emotion,hair,makeup,occlusion,accessories,blur,exposure,noise' |
41 | }; | 41 | }; |
42 | 42 | ... | ... |
... | @@ -10,10 +10,6 @@ mainApp.controller('mainAdminController', ['$scope', '$http', | ... | @@ -10,10 +10,6 @@ mainApp.controller('mainAdminController', ['$scope', '$http', |
10 | }) | 10 | }) |
11 | .then(function (response) { | 11 | .then(function (response) { |
12 | $scope.data = response.data; | 12 | $scope.data = response.data; |
13 | - $scope.age = response.data[0].faceAttributes.age; | ||
14 | - $scope.emotion = response.data[0].faceAttributes.emotion; | ||
15 | - $scope.gender = response.data[0].faceAttributes.gender; | ||
16 | - $scope.hair = response.data[0].faceAttributes.hair.bald; | ||
17 | console.log(response.data[0]) | 13 | console.log(response.data[0]) |
18 | }); | 14 | }); |
19 | } | 15 | } | ... | ... |
... | @@ -25,10 +25,19 @@ | ... | @@ -25,10 +25,19 @@ |
25 | 25 | ||
26 | <div class="right-box"> | 26 | <div class="right-box"> |
27 | <div ng-repeat="row in data"> | 27 | <div ng-repeat="row in data"> |
28 | - <p>age : {{ row.faceAttributes.age }}</p> | ||
29 | - <p>emotion : {{ row.faceAttributes.emotion }}</p> | ||
30 | <p>gender : {{ row.faceAttributes.gender }}</p> | 28 | <p>gender : {{ row.faceAttributes.gender }}</p> |
29 | + <p>age : {{ row.faceAttributes.age }}</p> | ||
30 | + <p>emotion : </p> | ||
31 | + <p><br>anger : {{ row.faceAttributes.emotion.anger }}</p> | ||
32 | + <p><br>contempt : {{ row.faceAttributes.emotion.contempt }}</p> | ||
33 | + <p><br>disgust : {{ row.faceAttributes.emotion.disgust }}</p> | ||
34 | + <p><br>fear : {{ row.faceAttributes.emotion.fear }}</p> | ||
35 | + <p><br>happiness : {{ row.faceAttributes.emotion.happiness }}</p> | ||
36 | + <p><br>neutral : {{ row.faceAttributes.emotion.neutral }}</p> | ||
37 | + <p><br>sadness : {{ row.faceAttributes.emotion.sadness }}</p> | ||
38 | + <p><br>surprise : {{ row.faceAttributes.emotion.surprise }}</p> | ||
31 | <p>bald : {{ row.faceAttributes.hair.bald }}</p> | 39 | <p>bald : {{ row.faceAttributes.hair.bald }}</p> |
40 | + <p>accessories : {{ row.accessories}}</p> | ||
32 | </div> | 41 | </div> |
33 | 42 | ||
34 | </div> | 43 | </div> | ... | ... |
-
Please register or login to post a comment