Skip to content

Commit

Permalink
added map points
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankur Kedia committed Sep 24, 2021
1 parent c35a373 commit 083d59c
Show file tree
Hide file tree
Showing 9 changed files with 88,513 additions and 694 deletions.
2 changes: 1 addition & 1 deletion demo/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import wink from '../../index.js';
import wink from '../index.js';

const updateModelStatus = () => {
const status = document.querySelector('.model-status');
Expand Down
240 changes: 240 additions & 0 deletions demo/sample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
const pointsLength = {
rightEyeIris: 5,
leftEyeIris: 5,

rightEyeUpper0: 7,
rightEyeLower0: 9,

rightEyeUpper1: 7,
rightEyeUpper2: 7,
rightEyeLower1: 9,
rightEyeLower2: 9,
rightEyeLower3: 9,

leftEyeUpper0: 7,
leftEyeLower0: 9,

leftEyeUpper1: 7,
leftEyeUpper2: 7,
leftEyeLower1: 9,
leftEyeLower2: 9,
leftEyeLower3: 9,
};


const irisCoordinateModel = [
4
3 0 1
2
]
const eye0Model = [
8
15 7

6 0
5 1
4 2
3

]
const openLower = [ [277.91,178.08],
[275.91,176.59],
[272.39,174.84],
[266.90,174.08],
[261.45,174.86],
[256.23,177.09],
[252.39,180.04]];

const openLower = [ [279.56,179.41],
[277.25,181.79],
[274.70,183.30],
[271.12,184.64],
[265.70,185.41],
[260.39,185.01],
[255.43,183.82],
[252.21,182.89],
[250.58,182.02]];


let closedUpper = [[275.99,174.24],
[273.90,172.74],
[270.47,170.91],
[265.55,170.06],
[261.01,170.56],
[256.28,172.34],
[252.87,174.76]]

let closedLower = [ [277.75,175.22],
[275.25,177.12],
[272.57,178.17],
[268.95,179.06],
[263.85,179.60],
[259.30,179.17],
[255.07,177.89],
[252.47,177.10],
[251.19,176.66]]

const sample1 = {
faceInViewConfidence: 0.9997509121894836,
annotations: {
rightEyeUpper0: [
[316.4558563232422, 228.73590087890625, 10.984639167785645],
[314.5319519042969, 227.43081665039062, 9.325787544250488],
[311.28375244140625, 225.91615295410156, 7.701682090759277],
[306.3000793457031, 225.15606689453125, 6.2624192237854],
[301.43316650390625, 225.646728515625, 5.65355920791626],
[296.4994354248047, 227.06993103027344, 5.9732890129089355],
[293.1246643066406, 229.00021362304688, 6.609309673309326],
],
rightEyeLower0: [
[317.8633575439453, 229.66139221191406, 13.16678237915039],
[315.72381591796875, 231.53204345703125, 11.261553764343262],
[313.39598083496094, 232.6637420654297, 9.628640174865723],
[310.13990783691406, 233.69775390625, 7.713962554931641],
[305.22315979003906, 234.35833740234375, 6.114638805389404],
[300.3984069824219, 234.09439086914062, 5.5672831535339355],
[295.80845642089844, 232.6842041015625, 5.996964454650879],
[293.0185852050781, 231.45159912109375, 6.947413921356201],
[291.5740966796875, 230.5567626953125, 6.939347267150879],
],
rightEyeUpper1: [
[319.9203186035156, 225.85910034179688, 11.55571460723877],
[317.19065856933594, 222.57937622070312, 8.808296203613281],
[313.2731628417969, 219.79055786132812, 6.742804050445557],
[307.4088592529297, 218.58193969726562, 4.823305130004883],
[301.0321807861328, 219.22732543945312, 4.458434104919434],
[295.4365997314453, 221.7000274658203, 5.22852087020874],
[290.6459655761719, 226.63099670410156, 5.828087329864502],
],
rightEyeLower1: [
[320.3075408935547, 230.12823486328125, 14.18520736694336],
[318.44789123535156, 233.99671936035156, 11.76822566986084],
[315.9236145019531, 236.45370483398438, 9.455986022949219],
[311.4869079589844, 237.7508087158203, 6.9202141761779785],
[305.9769592285156, 238.1464385986328, 5.07948112487793],
[300.1329803466797, 237.54702758789062, 4.261294364929199],
[295.16998291015625, 235.51625061035156, 4.497573375701904],
[291.8407440185547, 233.08523559570312, 5.216071128845215],
[289.6629943847656, 230.65866088867188, 5.870261192321777],
],
rightEyeUpper2: [
[323.2840270996094, 225.48838806152344, 13.474348068237305],
[320.78643798828125, 219.85902404785156, 9.769828796386719],
[316.0009765625, 216.19680786132812, 6.567578315734863],
[309.2125549316406, 214.5472412109375, 4.139621734619141],
[300.9591979980469, 215.24827575683594, 3.2132115364074707],
[291.6093292236328, 219.4542236328125, 3.080608367919922],
[287.33851623535156, 225.88404846191406, 3.489706039428711],
],
rightEyeLower2: [
[324.29063415527344, 232.1839599609375, 16.303287506103516],
[323.4114227294922, 238.55734252929688, 13.953198432922363],
[320.6928253173828, 241.17697143554688, 10.850263595581055],
[315.36981201171875, 243.08766174316406, 7.187951564788818],
[307.89776611328125, 243.11354064941406, 4.532236099243164],
[300.39073181152344, 241.5896759033203, 3.164551258087158],
[294.4740905761719, 239.07383728027344, 2.894444227218628],
[290.4168243408203, 236.5804901123047, 2.523927927017212],
[287.1132354736328, 232.64488220214844, 2.3499860763549805],
],
rightEyeLower3: [
[334.0215606689453, 235.82766723632812, 25.50864601135254],
[329.84657287597656, 243.15464782714844, 16.628986358642578],
[326.6418151855469, 247.3538360595703, 11.186138153076172],
[319.9693145751953, 249.6035919189453, 5.633381366729736],
[309.2664794921875, 248.69569396972656, 2.701173782348633],
[300.9960021972656, 245.91311645507812, 1.2698984146118164],
[294.57835388183594, 242.70277404785156, -0.08383488655090332],
[289.7573699951172, 238.85769653320312, -0.5831782817840576],
[285.9342956542969, 233.53407287597656, -1.5760375261306763],
],
rightEyeIris: [
[303.7965850830078, 234.3605499267578, 6.188529014587402],
[297.7848663330078, 234.06031799316406, 6.188529014587402],
[303.8927307128906, 228.9445037841797, 6.2624192237854],
[309.8382263183594, 234.55706787109375, 6.188529014587402],
[303.7152404785156, 239.58145141601562, 6.114638805389404],
],
leftEyeUpper0: [
[215.9903564453125, 231.18653869628906, 5.233613014221191],
[217.9547119140625, 229.97251892089844, 3.785628318786621],
[221.33346557617188, 228.42742919921875, 2.451026678085327],
[226.82156372070312, 227.59530639648438, 1.5464396476745605],
[232.2386474609375, 227.9449005126953, 1.4993122816085815],
[237.6002197265625, 229.23487854003906, 2.403029203414917],
[241.40203857421875, 231.12045288085938, 3.444145917892456],
],
leftEyeLower0: [
[214.63455200195312, 231.96717834472656, 7.229278564453125],
[217.14193725585938, 233.88253784179688, 5.62473201751709],
[219.95367431640625, 235.03619384765625, 4.295414924621582],
[223.78143310546875, 235.85801696777344, 2.8165273666381836],
[229.296630859375, 236.09677124023438, 1.808180809020996],
[234.46676635742188, 235.49078369140625, 1.8542532920837402],
[239.0870361328125, 234.13877868652344, 2.748312473297119],
[241.89163208007812, 233.09112548828125, 3.956031322479248],
[243.25741577148438, 232.49777221679688, 4.122570514678955],
],
leftEyeUpper1: [
[212.52468872070312, 227.61874389648438, 5.418386936187744],
[215.25897216796875, 224.38719177246094, 2.9381256103515625],
[219.34292602539062, 221.732666015625, 1.1824309825897217],
[225.5960693359375, 220.65667724609375, -0.08640122413635254],
[232.30386352539062, 221.2853240966797, 0.39621150493621826],
[238.41015625, 223.66815185546875, 1.8391668796539307],
[244.1087646484375, 228.52841186523438, 2.98101544380188],
],
leftEyeLower1: [
[212.27337646484375, 232.0154266357422, 7.979268550872803],
[214.7415771484375, 236.093017578125, 5.989004135131836],
[217.98971557617188, 238.72625732421875, 4.069088459014893],
[223.22048950195312, 240.10702514648438, 2.1103646755218506],
[229.34323120117188, 240.2465057373047, 0.9384834170341492],
[235.47369384765625, 239.3803253173828, 0.8332018852233887],
[240.5206298828125, 237.3475799560547, 1.7199287414550781],
[243.52633666992188, 235.12762451171875, 2.6444480419158936],
[245.50750732421875, 232.74314880371094, 3.482106924057007],
],
leftEyeUpper2: [
[209.37750244140625, 226.84034729003906, 6.780000686645508],
[211.60671997070312, 221.326904296875, 3.3226895332336426],
[216.58053588867188, 217.97293090820312, 0.7052052021026611],
[223.73272705078125, 216.38754272460938, -0.864924430847168],
[232.31329345703125, 217.05271911621094, -0.78946852684021],
[242.49652099609375, 221.20587158203125, 0.13675737380981445],
[247.8274688720703, 227.6739044189453, 1.3716703653335571],
],
leftEyeLower2: [
[208.89306640625, 233.50180053710938, 9.704765319824219],
[210.45693969726562, 240.3459930419922, 7.894819736480713],
[213.6229248046875, 243.47152709960938, 5.281005382537842],
[219.822509765625, 245.7073974609375, 2.452056884765625],
[228.08822631835938, 245.82656860351562, 0.7408129572868347],
[235.96109008789062, 244.07437133789062, 0.21630769968032837],
[241.87655639648438, 241.48309326171875, 0.5917224884033203],
[245.84820556640625, 239.09725952148438, 0.5720595121383667],
[248.84242248535156, 235.0342254638672, 0.5704395771026611],
],
leftEyeLower3: [
[199.65225219726562, 236.0408172607422, 17.6357364654541],
[204.4935302734375, 244.87132263183594, 10.033550262451172],
[208.1915283203125, 249.82798767089844, 5.285192489624023],
[215.61148071289062, 252.74908447265625, 0.9032927751541138],
[227.22940063476562, 252.04397583007812, -0.8352845311164856],
[235.90457153320312, 249.185791015625, -1.3485082387924194],
[242.38827514648438, 245.9823760986328, -2.079688310623169],
[247.05165100097656, 242.25833129882812, -2.251185178756714],
[250.49386596679688, 236.73406982421875, -2.9601540565490723],
],
leftEyeIris: [
[227.33206176757812, 235.81146240234375, 1.6773102283477783],
[233.149169921875, 235.31809997558594, 1.6773102283477783],
[226.52880859375, 230.4038848876953, 1.5464396476745605],
[221.37783813476562, 236.25758361816406, 1.6773102283477783],
[228.09347534179688, 241.0303497314453, 1.808180809020996],
],
midwayBetweenEyes: [
[269.6813201904297, 218.88470458984375, -1.7089649438858032],
],
},
};
Loading

0 comments on commit 083d59c

Please sign in to comment.