emotions.json
1[{"face_token": "fca7b4c5c1910e9be6567d57e17ab457", "face_rectangle": {"top": 64, "left": 31, "width": 214, "height": 214}, "landmark": {"contour_chin": {"x": 117, "y": 273}, "contour_left1": {"x": 33, "y": 101}, "contour_left2": {"x": 33, "y": 124}, "contour_left3": {"x": 35, "y": 147}, "contour_left4": {"x": 37, "y": 169}, "contour_left5": {"x": 42, "y": 192}, "contour_left6": {"x": 49, "y": 213}, "contour_left7": {"x": 61, "y": 233}, "contour_left8": {"x": 76, "y": 250}, "contour_left9": {"x": 93, "y": 265}, "contour_right1": {"x": 247, "y": 107}, "contour_right2": {"x": 246, "y": 133}, "contour_right3": {"x": 242, "y": 159}, "contour_right4": {"x": 238, "y": 184}, "contour_right5": {"x": 230, "y": 209}, "contour_right6": {"x": 215, "y": 230}, "contour_right7": {"x": 195, "y": 247}, "contour_right8": {"x": 171, "y": 260}, "contour_right9": {"x": 146, "y": 271}, "left_eye_bottom": {"x": 77, "y": 107}, "left_eye_center": {"x": 79, "y": 101}, "left_eye_left_corner": {"x": 57, "y": 101}, "left_eye_lower_left_quarter": {"x": 66, "y": 104}, "left_eye_lower_right_quarter": {"x": 89, "y": 107}, "left_eye_pupil": {"x": 79, "y": 99}, "left_eye_right_corner": {"x": 100, "y": 107}, "left_eye_top": {"x": 79, "y": 92}, "left_eye_upper_left_quarter": {"x": 67, "y": 94}, "left_eye_upper_right_quarter": {"x": 91, "y": 97}, "left_eyebrow_left_corner": {"x": 42, "y": 80}, "left_eyebrow_lower_left_quarter": {"x": 55, "y": 76}, "left_eyebrow_lower_middle": {"x": 69, "y": 77}, "left_eyebrow_lower_right_quarter": {"x": 83, "y": 84}, "left_eyebrow_right_corner": {"x": 99, "y": 89}, "left_eyebrow_upper_left_quarter": {"x": 54, "y": 65}, "left_eyebrow_upper_middle": {"x": 71, "y": 65}, "left_eyebrow_upper_right_quarter": {"x": 87, "y": 74}, "mouth_left_corner": {"x": 78, "y": 189}, "mouth_lower_lip_bottom": {"x": 124, "y": 230}, "mouth_lower_lip_left_contour1": {"x": 98, "y": 208}, "mouth_lower_lip_left_contour2": {"x": 87, "y": 208}, "mouth_lower_lip_left_contour3": {"x": 101, "y": 223}, "mouth_lower_lip_right_contour1": {"x": 149, "y": 210}, "mouth_lower_lip_right_contour2": {"x": 159, "y": 211}, "mouth_lower_lip_right_contour3": {"x": 145, "y": 224}, "mouth_lower_lip_top": {"x": 124, "y": 217}, "mouth_right_corner": {"x": 168, "y": 193}, "mouth_upper_lip_bottom": {"x": 125, "y": 198}, "mouth_upper_lip_left_contour1": {"x": 117, "y": 191}, "mouth_upper_lip_left_contour2": {"x": 97, "y": 189}, "mouth_upper_lip_left_contour3": {"x": 102, "y": 194}, "mouth_upper_lip_right_contour1": {"x": 133, "y": 191}, "mouth_upper_lip_right_contour2": {"x": 151, "y": 191}, "mouth_upper_lip_right_contour3": {"x": 147, "y": 195}, "mouth_upper_lip_top": {"x": 125, "y": 193}, "nose_contour_left1": {"x": 109, "y": 104}, "nose_contour_left2": {"x": 100, "y": 141}, "nose_contour_left3": {"x": 105, "y": 170}, "nose_contour_lower_middle": {"x": 123, "y": 178}, "nose_contour_right1": {"x": 140, "y": 105}, "nose_contour_right2": {"x": 148, "y": 144}, "nose_contour_right3": {"x": 141, "y": 172}, "nose_left": {"x": 91, "y": 158}, "nose_right": {"x": 155, "y": 162}, "nose_tip": {"x": 124, "y": 164}, "right_eye_bottom": {"x": 173, "y": 109}, "right_eye_center": {"x": 172, "y": 104}, "right_eye_left_corner": {"x": 152, "y": 106}, "right_eye_lower_left_quarter": {"x": 162, "y": 108}, "right_eye_lower_right_quarter": {"x": 184, "y": 108}, "right_eye_pupil": {"x": 172, "y": 102}, "right_eye_right_corner": {"x": 193, "y": 105}, "right_eye_top": {"x": 172, "y": 95}, "right_eye_upper_left_quarter": {"x": 161, "y": 98}, "right_eye_upper_right_quarter": {"x": 183, "y": 98}, "right_eyebrow_left_corner": {"x": 150, "y": 92}, "right_eyebrow_lower_left_quarter": {"x": 169, "y": 90}, "right_eyebrow_lower_middle": {"x": 186, "y": 86}, "right_eyebrow_lower_right_quarter": {"x": 202, "y": 84}, "right_eyebrow_right_corner": {"x": 216, "y": 87}, "right_eyebrow_upper_left_quarter": {"x": 166, "y": 79}, "right_eyebrow_upper_middle": {"x": 184, "y": 72}, "right_eyebrow_upper_right_quarter": {"x": 204, "y": 72}}, "attributes": {"gender": {"value": "Male"}, "age": {"value": 26}, "emotion": {"anger": 98.934, "disgust": 1.06, "fear": 0.002, "happiness": 0.001, "neutral": 0.001, "sadness": 0.001, "surprise": 0.002}}}, 2 3{"face_token": "b0df2c32adc1e411460823af811648c9", "face_rectangle": {"top": 68, "left": 19, "width": 213, "height": 213}, "landmark": {"contour_chin": {"x": 125, "y": 281}, "contour_left1": {"x": 30, "y": 104}, "contour_left2": {"x": 30, "y": 127}, "contour_left3": {"x": 32, "y": 151}, "contour_left4": {"x": 36, "y": 174}, "contour_left5": {"x": 43, "y": 197}, "contour_left6": {"x": 54, "y": 218}, "contour_left7": {"x": 67, "y": 238}, "contour_left8": {"x": 82, "y": 256}, "contour_left9": {"x": 100, "y": 273}, "contour_right1": {"x": 223, "y": 105}, "contour_right2": {"x": 223, "y": 129}, "contour_right3": {"x": 220, "y": 152}, "contour_right4": {"x": 216, "y": 176}, "contour_right5": {"x": 210, "y": 199}, "contour_right6": {"x": 199, "y": 220}, "contour_right7": {"x": 186, "y": 240}, "contour_right8": {"x": 170, "y": 258}, "contour_right9": {"x": 151, "y": 274}, "left_eye_bottom": {"x": 81, "y": 109}, "left_eye_center": {"x": 82, "y": 104}, "left_eye_left_corner": {"x": 63, "y": 102}, "left_eye_lower_left_quarter": {"x": 71, "y": 106}, "left_eye_lower_right_quarter": {"x": 91, "y": 109}, "left_eye_pupil": {"x": 81, "y": 104}, "left_eye_right_corner": {"x": 100, "y": 109}, "left_eye_top": {"x": 82, "y": 98}, "left_eye_upper_left_quarter": {"x": 72, "y": 98}, "left_eye_upper_right_quarter": {"x": 92, "y": 102}, "left_eyebrow_left_corner": {"x": 47, "y": 81}, "left_eyebrow_lower_left_quarter": {"x": 61, "y": 78}, "left_eyebrow_lower_middle": {"x": 75, "y": 82}, "left_eyebrow_lower_right_quarter": {"x": 88, "y": 90}, "left_eyebrow_right_corner": {"x": 104, "y": 95}, "left_eyebrow_upper_left_quarter": {"x": 60, "y": 69}, "left_eyebrow_upper_middle": {"x": 78, "y": 72}, "left_eyebrow_upper_right_quarter": {"x": 93, "y": 80}, "mouth_left_corner": {"x": 80, "y": 194}, "mouth_lower_lip_bottom": {"x": 125, "y": 236}, "mouth_lower_lip_left_contour1": {"x": 98, "y": 216}, "mouth_lower_lip_left_contour2": {"x": 89, "y": 214}, "mouth_lower_lip_left_contour3": {"x": 103, "y": 229}, "mouth_lower_lip_right_contour1": {"x": 152, "y": 218}, "mouth_lower_lip_right_contour2": {"x": 161, "y": 218}, "mouth_lower_lip_right_contour3": {"x": 147, "y": 231}, "mouth_lower_lip_top": {"x": 126, "y": 225}, "mouth_right_corner": {"x": 171, "y": 199}, "mouth_upper_lip_bottom": {"x": 128, "y": 194}, "mouth_upper_lip_left_contour1": {"x": 119, "y": 184}, "mouth_upper_lip_left_contour2": {"x": 98, "y": 186}, "mouth_upper_lip_left_contour3": {"x": 104, "y": 191}, "mouth_upper_lip_right_contour1": {"x": 139, "y": 185}, "mouth_upper_lip_right_contour2": {"x": 157, "y": 189}, "mouth_upper_lip_right_contour3": {"x": 151, "y": 194}, "mouth_upper_lip_top": {"x": 129, "y": 186}, "nose_contour_left1": {"x": 113, "y": 109}, "nose_contour_left2": {"x": 107, "y": 140}, "nose_contour_left3": {"x": 113, "y": 163}, "nose_contour_lower_middle": {"x": 129, "y": 168}, "nose_contour_right1": {"x": 144, "y": 109}, "nose_contour_right2": {"x": 151, "y": 140}, "nose_contour_right3": {"x": 145, "y": 163}, "nose_left": {"x": 100, "y": 155}, "nose_right": {"x": 159, "y": 154}, "nose_tip": {"x": 129, "y": 154}, "right_eye_bottom": {"x": 177, "y": 112}, "right_eye_center": {"x": 176, "y": 106}, "right_eye_left_corner": {"x": 155, "y": 109}, "right_eye_lower_left_quarter": {"x": 166, "y": 111}, "right_eye_lower_right_quarter": {"x": 187, "y": 109}, "right_eye_pupil": {"x": 175, "y": 104}, "right_eye_right_corner": {"x": 195, "y": 104}, "right_eye_top": {"x": 176, "y": 99}, "right_eye_upper_left_quarter": {"x": 165, "y": 102}, "right_eye_upper_right_quarter": {"x": 187, "y": 100}, "right_eyebrow_left_corner": {"x": 153, "y": 95}, "right_eyebrow_lower_left_quarter": {"x": 170, "y": 89}, "right_eyebrow_lower_middle": {"x": 185, "y": 84}, "right_eyebrow_lower_right_quarter": {"x": 199, "y": 81}, "right_eyebrow_right_corner": {"x": 210, "y": 84}, "right_eyebrow_upper_left_quarter": {"x": 167, "y": 79}, "right_eyebrow_upper_middle": {"x": 183, "y": 70}, "right_eyebrow_upper_right_quarter": {"x": 200, "y": 69}}, "attributes": {"gender": {"value": "Male"}, "age": {"value": 26}, "emotion": {"anger": 100.0, "disgust": 0.0, "fear": 0.0, "happiness": 0.0, "neutral": 0.0, "sadness": 0.0, "surprise": 0.0}}}, 4 5
これはFace++APIの顔画像からのjson形式で出力される感情推定結果を複数まとめたものです。
この"attributes"以下のキーと値を抽出して一つのリスト内辞書にまとめたいです。
リスト内辞書に関する似た投稿を調べてみましたが思った通りの出力結果が得られなかったので投稿させていただきました。
windows10
python
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/06 10:30