Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kcchien
Created May 19, 2019 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kcchien/563fdcf1972d198e7d9a5666df27dedf to your computer and use it in GitHub Desktop.
Save kcchien/563fdcf1972d198e7d9a5666df27dedf to your computer and use it in GitHub Desktop.
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 6
{
"responses": [
{
"faceAnnotations": [
{
"boundingPoly": {
"vertices": [
{
"x": 669,
"y": 324
},
{
"x": 760,
"y": 324
},
{
"x": 760,
"y": 430
},
{
"x": 669,
"y": 430
}
]
},
"fdBoundingPoly": {
"vertices": [
{
"x": 675,
"y": 354
},
{
"x": 735,
"y": 354
},
{
"x": 735,
"y": 414
},
{
"x": 675,
"y": 414
}
]
},
"landmarks": [
{
"type": "LEFT_EYE",
"position": {
"x": 692.05646,
"y": 372.95868,
"z": -0.0002526854
}
},
{
"type": "RIGHT_EYE",
"position": {
"x": 717.7477,
"y": 372.9084,
"z": -10.85004
}
},
{
"type": "LEFT_OF_LEFT_EYEBROW",
"position": {
"x": 684.4492,
"y": 366.2851,
"z": 5.824417
}
},
{
"type": "RIGHT_OF_LEFT_EYEBROW",
"position": {
"x": 696.2992,
"y": 366.59366,
"z": -7.7937016
}
},
{
"type": "LEFT_OF_RIGHT_EYEBROW",
"position": {
"x": 708.5379,
"y": 366.7713,
"z": -13.004163
}
},
{
"type": "RIGHT_OF_RIGHT_EYEBROW",
"position": {
"x": 726.5456,
"y": 366.92877,
"z": -12.083326
}
},
{
"type": "MIDPOINT_BETWEEN_EYES",
"position": {
"x": 702.2475,
"y": 372.4972,
"z": -10.5965395
}
},
{
"type": "NOSE_TIP",
"position": {
"x": 699.05286,
"y": 388.38126,
"z": -17.563484
}
},
{
"type": "UPPER_LIP",
"position": {
"x": 701.245,
"y": 398.7124,
"z": -11.386475
}
},
{
"type": "LOWER_LIP",
"position": {
"x": 702.2174,
"y": 407.44824,
"z": -9.299454
}
},
{
"type": "MOUTH_LEFT",
"position": {
"x": 693.4581,
"y": 401.6477,
"z": 0.03429009
}
},
{
"type": "MOUTH_RIGHT",
"position": {
"x": 716.83954,
"y": 400.81027,
"z": -8.433873
}
},
{
"type": "MOUTH_CENTER",
"position": {
"x": 701.671,
"y": 402.3624,
"z": -9.415283
}
},
{
"type": "NOSE_BOTTOM_RIGHT",
"position": {
"x": 709.21423,
"y": 390.45886,
"z": -10.728386
}
},
{
"type": "NOSE_BOTTOM_LEFT",
"position": {
"x": 696.24554,
"y": 390.02206,
"z": -4.8575044
}
},
{
"type": "NOSE_BOTTOM_CENTER",
"position": {
"x": 701.87756,
"y": 392.6657,
"z": -11.612123
}
},
{
"type": "LEFT_EYE_TOP_BOUNDARY",
"position": {
"x": 691.178,
"y": 371.07794,
"z": -1.6994492
}
},
{
"type": "LEFT_EYE_RIGHT_CORNER",
"position": {
"x": 696.99115,
"y": 373.35028,
"z": -1.9849461
}
},
{
"type": "LEFT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 691.8553,
"y": 374.78043,
"z": -0.11956799
}
},
{
"type": "LEFT_EYE_LEFT_CORNER",
"position": {
"x": 687.85114,
"y": 372.87338,
"z": 4.5108714
}
},
{
"type": "LEFT_EYE_PUPIL",
"position": {
"x": 691.1986,
"y": 372.9344,
"z": -0.39302823
}
},
{
"type": "RIGHT_EYE_TOP_BOUNDARY",
"position": {
"x": 716.37085,
"y": 371.4634,
"z": -12.40188
}
},
{
"type": "RIGHT_EYE_RIGHT_CORNER",
"position": {
"x": 723.07336,
"y": 373.40768,
"z": -10.454721
}
},
{
"type": "RIGHT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 716.8877,
"y": 375.11426,
"z": -10.801529
}
},
{
"type": "RIGHT_EYE_LEFT_CORNER",
"position": {
"x": 711.8931,
"y": 373.45593,
"z": -8.378084
}
},
{
"type": "RIGHT_EYE_PUPIL",
"position": {
"x": 717.04047,
"y": 373.33057,
"z": -11.421103
}
},
{
"type": "LEFT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 689.58,
"y": 363.13654,
"z": -2.7445116
}
},
{
"type": "RIGHT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 716.9182,
"y": 363.54892,
"z": -14.362484
}
},
{
"type": "LEFT_EAR_TRAGION",
"position": {
"x": 689.0497,
"y": 385.31052,
"z": 38.497536
}
},
{
"type": "RIGHT_EAR_TRAGION",
"position": {
"x": 747.31775,
"y": 386.05096,
"z": 14.426956
}
},
{
"type": "FOREHEAD_GLABELLA",
"position": {
"x": 701.9971,
"y": 366.36548,
"z": -11.372161
}
},
{
"type": "CHIN_GNATHION",
"position": {
"x": 703.7108,
"y": 419.66806,
"z": -5.4058967
}
},
{
"type": "CHIN_LEFT_GONION",
"position": {
"x": 687.40045,
"y": 403.02136,
"z": 27.55279
}
},
{
"type": "CHIN_RIGHT_GONION",
"position": {
"x": 739.1988,
"y": 403.8794,
"z": 5.509255
}
}
],
"rollAngle": 0.21619819,
"panAngle": -23.02797,
"tiltAngle": -1.5531756,
"detectionConfidence": 0.72354823,
"landmarkingConfidence": 0.20047489,
"joyLikelihood": "POSSIBLE",
"sorrowLikelihood": "VERY_UNLIKELY",
"angerLikelihood": "VERY_UNLIKELY",
"surpriseLikelihood": "VERY_UNLIKELY",
"underExposedLikelihood": "VERY_UNLIKELY",
"blurredLikelihood": "VERY_UNLIKELY",
"headwearLikelihood": "VERY_LIKELY"
},
{
"boundingPoly": {
"vertices": [
{
"x": 85,
"y": 426
},
{
"x": 467,
"y": 426
},
{
"x": 467,
"y": 871
},
{
"x": 85,
"y": 871
}
]
},
"fdBoundingPoly": {
"vertices": [
{
"x": 106,
"y": 537
},
{
"x": 441,
"y": 537
},
{
"x": 441,
"y": 872
},
{
"x": 106,
"y": 872
}
]
},
"landmarks": [
{
"type": "LEFT_EYE",
"position": {
"x": 220.1872,
"y": 638.2954,
"z": -0.00013366595
}
},
{
"type": "RIGHT_EYE",
"position": {
"x": 335.80832,
"y": 641.8185,
"z": 0.57039523
}
},
{
"type": "LEFT_OF_LEFT_EYEBROW",
"position": {
"x": 182.38551,
"y": 608.7605,
"z": 7.420773
}
},
{
"type": "RIGHT_OF_LEFT_EYEBROW",
"position": {
"x": 250.94044,
"y": 613.97815,
"z": -25.401297
}
},
{
"type": "LEFT_OF_RIGHT_EYEBROW",
"position": {
"x": 307.05093,
"y": 615.59827,
"z": -25.144073
}
},
{
"type": "RIGHT_OF_RIGHT_EYEBROW",
"position": {
"x": 375.48718,
"y": 614.43286,
"z": 8.354321
}
},
{
"type": "MIDPOINT_BETWEEN_EYES",
"position": {
"x": 278.42282,
"y": 636.2649,
"z": -24.594847
}
},
{
"type": "NOSE_TIP",
"position": {
"x": 276.20016,
"y": 709.5746,
"z": -50.706635
}
},
{
"type": "UPPER_LIP",
"position": {
"x": 275.02386,
"y": 747.4613,
"z": -19.15356
}
},
{
"type": "LOWER_LIP",
"position": {
"x": 273.90552,
"y": 786.6168,
"z": -6.2561064
}
},
{
"type": "MOUTH_LEFT",
"position": {
"x": 227.00937,
"y": 757.92834,
"z": 14.062568
}
},
{
"type": "MOUTH_RIGHT",
"position": {
"x": 324.6917,
"y": 758.30756,
"z": 15.156286
}
},
{
"type": "MOUTH_CENTER",
"position": {
"x": 274.85626,
"y": 765.8013,
"z": -8.384632
}
},
{
"type": "NOSE_BOTTOM_RIGHT",
"position": {
"x": 308.7482,
"y": 713.3633,
"z": -5.05042
}
},
{
"type": "NOSE_BOTTOM_LEFT",
"position": {
"x": 243.35995,
"y": 713.08704,
"z": -5.2631865
}
},
{
"type": "NOSE_BOTTOM_CENTER",
"position": {
"x": 275.78268,
"y": 725.1536,
"z": -22.125332
}
},
{
"type": "LEFT_EYE_TOP_BOUNDARY",
"position": {
"x": 220.59596,
"y": 631.1835,
"z": -8.668753
}
},
{
"type": "LEFT_EYE_RIGHT_CORNER",
"position": {
"x": 242.8134,
"y": 640.2789,
"z": 0.6842047
}
},
{
"type": "LEFT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 219.90852,
"y": 646.19104,
"z": -0.12689543
}
},
{
"type": "LEFT_EYE_LEFT_CORNER",
"position": {
"x": 197.30377,
"y": 636.79987,
"z": 10.471473
}
},
{
"type": "LEFT_EYE_PUPIL",
"position": {
"x": 218.51605,
"y": 638.47107,
"z": -2.9172459
}
},
{
"type": "RIGHT_EYE_TOP_BOUNDARY",
"position": {
"x": 336.18198,
"y": 634.5311,
"z": -8.105895
}
},
{
"type": "RIGHT_EYE_RIGHT_CORNER",
"position": {
"x": 358.8801,
"y": 641.47675,
"z": 11.252687
}
},
{
"type": "RIGHT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 335.6239,
"y": 649.5006,
"z": 0.41631728
}
},
{
"type": "RIGHT_EYE_LEFT_CORNER",
"position": {
"x": 312.46457,
"y": 642.3819,
"z": 0.98882556
}
},
{
"type": "RIGHT_EYE_PUPIL",
"position": {
"x": 337.16272,
"y": 641.9324,
"z": -2.4989882
}
},
{
"type": "LEFT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 216.72218,
"y": 598.16785,
"z": -18.23109
}
},
{
"type": "RIGHT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 342.1192,
"y": 601.7854,
"z": -17.605368
}
},
{
"type": "LEFT_EAR_TRAGION",
"position": {
"x": 144.98914,
"y": 676.6305,
"z": 147.86142
}
},
{
"type": "RIGHT_EAR_TRAGION",
"position": {
"x": 407.576,
"y": 684.291,
"z": 149.1233
}
},
{
"type": "FOREHEAD_GLABELLA",
"position": {
"x": 279.06616,
"y": 613.7934,
"z": -29.803047
}
},
{
"type": "CHIN_GNATHION",
"position": {
"x": 272.37708,
"y": 836.28076,
"z": 15.637695
}
},
{
"type": "CHIN_LEFT_GONION",
"position": {
"x": 155.52937,
"y": 755.86255,
"z": 109.27146
}
},
{
"type": "CHIN_RIGHT_GONION",
"position": {
"x": 392.8323,
"y": 762.7853,
"z": 110.427895
}
}
],
"rollAngle": 1.6801219,
"panAngle": 0.28368974,
"tiltAngle": -6.298056,
"detectionConfidence": 0.98864377,
"landmarkingConfidence": 0.18741898,
"joyLikelihood": "VERY_LIKELY",
"sorrowLikelihood": "VERY_UNLIKELY",
"angerLikelihood": "VERY_UNLIKELY",
"surpriseLikelihood": "VERY_UNLIKELY",
"underExposedLikelihood": "VERY_UNLIKELY",
"blurredLikelihood": "VERY_UNLIKELY",
"headwearLikelihood": "VERY_LIKELY"
},
{
"boundingPoly": {
"vertices": [
{
"x": 745,
"y": 450
},
{
"x": 886,
"y": 450
},
{
"x": 886,
"y": 614
},
{
"x": 745,
"y": 614
}
]
},
"fdBoundingPoly": {
"vertices": [
{
"x": 756,
"y": 500
},
{
"x": 876,
"y": 500
},
{
"x": 876,
"y": 619
},
{
"x": 756,
"y": 619
}
]
},
"landmarks": [
{
"type": "LEFT_EYE",
"position": {
"x": 795.2683,
"y": 540.1295,
"z": -0.00034131587
}
},
{
"type": "RIGHT_EYE",
"position": {
"x": 838.8197,
"y": 535.54346,
"z": 1.083428
}
},
{
"type": "LEFT_OF_LEFT_EYEBROW",
"position": {
"x": 780.06946,
"y": 530.80524,
"z": 0.18970883
}
},
{
"type": "RIGHT_OF_LEFT_EYEBROW",
"position": {
"x": 805.75385,
"y": 531.9873,
"z": -10.820261
}
},
{
"type": "LEFT_OF_RIGHT_EYEBROW",
"position": {
"x": 826.2505,
"y": 529.98706,
"z": -10.284787
}
},
{
"type": "RIGHT_OF_RIGHT_EYEBROW",
"position": {
"x": 850.6104,
"y": 523.9195,
"z": 2.0552828
}
},
{
"type": "MIDPOINT_BETWEEN_EYES",
"position": {
"x": 816.94275,
"y": 538.88885,
"z": -8.501295
}
},
{
"type": "NOSE_TIP",
"position": {
"x": 819.5479,
"y": 566.6245,
"z": -12.472598
}
},
{
"type": "UPPER_LIP",
"position": {
"x": 819.75867,
"y": 577.23773,
"z": 1.5866246
}
},
{
"type": "LOWER_LIP",
"position": {
"x": 821.6677,
"y": 592.2127,
"z": 9.757308
}
},
{
"type": "MOUTH_LEFT",
"position": {
"x": 800.74994,
"y": 579.83185,
"z": 14.53717
}
},
{
"type": "MOUTH_RIGHT",
"position": {
"x": 839.99023,
"y": 576.3258,
"z": 15.661866
}
},
{
"type": "MOUTH_CENTER",
"position": {
"x": 820.2752,
"y": 584.20624,
"z": 7.0678606
}
},
{
"type": "NOSE_BOTTOM_RIGHT",
"position": {
"x": 830.94324,
"y": 563.6127,
"z": 4.5108185
}
},
{
"type": "NOSE_BOTTOM_LEFT",
"position": {
"x": 806.2289,
"y": 565.69257,
"z": 3.9439883
}
},
{
"type": "NOSE_BOTTOM_CENTER",
"position": {
"x": 819.4519,
"y": 569.8289,
"z": -1.1284136
}
},
{
"type": "LEFT_EYE_TOP_BOUNDARY",
"position": {
"x": 795.2146,
"y": 538.233,
"z": -3.6923947
}
},
{
"type": "LEFT_EYE_RIGHT_CORNER",
"position": {
"x": 803.71045,
"y": 539.7313,
"z": 0.4766285
}
},
{
"type": "LEFT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 795.55927,
"y": 542.9382,
"z": 0.51118195
}
},
{
"type": "LEFT_EYE_LEFT_CORNER",
"position": {
"x": 786.6779,
"y": 539.8564,
"z": 3.487713
}
},
{
"type": "LEFT_EYE_PUPIL",
"position": {
"x": 794.6569,
"y": 540.50604,
"z": -1.1093899
}
},
{
"type": "RIGHT_EYE_TOP_BOUNDARY",
"position": {
"x": 837.426,
"y": 534.113,
"z": -2.5722494
}
},
{
"type": "RIGHT_EYE_RIGHT_CORNER",
"position": {
"x": 845.71454,
"y": 534.0971,
"z": 5.058714
}
},
{
"type": "RIGHT_EYE_BOTTOM_BOUNDARY",
"position": {
"x": 837.79944,
"y": 538.8426,
"z": 1.6351256
}
},
{
"type": "RIGHT_EYE_LEFT_CORNER",
"position": {
"x": 829.1851,
"y": 537.70807,
"z": 1.2066321
}
},
{
"type": "RIGHT_EYE_PUPIL",
"position": {
"x": 837.99976,
"y": 536.31714,
"z": -0.020853035
}
},
{
"type": "LEFT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 792.4835,
"y": 527.3755,
"z": -9.6801405
}
},
{
"type": "RIGHT_EYEBROW_UPPER_MIDPOINT",
"position": {
"x": 838.27576,
"y": 522.91046,
"z": -8.46897
}
},
{
"type": "LEFT_EAR_TRAGION",
"position": {
"x": 767.26855,
"y": 546.09326,
"z": 55.599873
}
},
{
"type": "RIGHT_EAR_TRAGION",
"position": {
"x": 863.152,
"y": 536.71295,
"z": 58.08622
}
},
{
"type": "FOREHEAD_GLABELLA",
"position": {
"x": 816.03687,
"y": 530.975,
"z": -12.2784195
}
},
{
"type": "CHIN_GNATHION",
"position": {
"x": 822.5753,
"y": 607.1006,
"z": 20.960659
}
},
{
"type": "CHIN_LEFT_GONION",
"position": {
"x": 775.16174,
"y": 576.6841,
"z": 47.856
}
},
{
"type": "CHIN_RIGHT_GONION",
"position": {
"x": 861.7816,
"y": 568.26685,
"z": 50.14255
}
}
],
"rollAngle": -5.0866733,
"panAngle": 1.5809642,
"tiltAngle": -18.30349,
"detectionConfidence": 0.9379803,
"landmarkingConfidence": 0.24303582,
"joyLikelihood": "VERY_LIKELY",
"sorrowLikelihood": "VERY_UNLIKELY",
"angerLikelihood": "VERY_UNLIKELY",
"surpriseLikelihood": "VERY_UNLIKELY",
"underExposedLikelihood": "VERY_UNLIKELY",
"blurredLikelihood": "VERY_UNLIKELY",
"headwearLikelihood": "VERY_UNLIKELY"
}
],
"landmarkAnnotations": [
{
"mid": "/m/0c7zy",
"description": "Petra",
"score": 0.5100603,
"boundingPoly": {
"vertices": [
{
"x": 153,
"y": 30
},
{
"x": 531,
"y": 30
},
{
"x": 531,
"y": 257
},
{
"x": 153,
"y": 257
}
]
},
"locations": [
{
"latLng": {
"latitude": 30.323975,
"longitude": 35.449361
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment