Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openface 128d embedding not match with same trained image #1607

Open
iruthaya opened this issue Sep 5, 2024 · 0 comments
Open

Openface 128d embedding not match with same trained image #1607

iruthaya opened this issue Sep 5, 2024 · 0 comments

Comments

@iruthaya
Copy link

iruthaya commented Sep 5, 2024

  • face_recognition version: 1.3.0
  • Python version: 3.10.12
  • Operating System: Ubuntu 14.04.4 LTS

Description

Image comparison not working as expected.

What I Did

https://gist.github.com/ageitgey/ddbae3b209b6344a458fa41a3cf75719

I was generating 128d by using the steps in the above link.

labels.csv
reps.csv

The exact same trained image does not match when I compare it with compare_faces and euclidean distance.

my code is below

@app.route('/compare', methods=['POST'])
def compare_faces():
# Check if an image is uploaded
if 'image' not in request.files:
return jsonify({"error": "No image uploaded"}), 400

  #return jsonify({"error": known_faces}), 400

  image_file = request.files['image']
  image = face_recognition.load_image_file(image_file)
  
  # Get face encodings from the uploaded image
  uploaded_face_encodings = face_recognition.face_encodings(image)

  if not uploaded_face_encodings:
      return jsonify({"error": "No faces detected in the uploaded image"}), 400

uploaded_face_encoding = uploaded_face_encodings[0]
print(uploaded_face_encoding)
# Compare with known faces
known_face_encoding = [
[-0.042639598250389,0.12697510421276,0.014530797488987,0.13035343587399,-0.053164716809988,0.03371787071228,-0.065738879144192,-0.17718656361103,0.080609485507011,-0.11265439540148,0.027732145041227,-0.033682178705931,-0.021273426711559,0.1271135956049,-0.088499918580055,-0.017446519806981,0.04732845723629,0.13976719975471,-0.036167126148939,-0.0037440515588969,0.1137520223856,-0.130355656147,-0.027596805244684,0.042697597295046,0.087767049670219,-0.12187146395445,-0.13563132286072,0.022973045706749,-0.03948700428009,0.13130995631218,0.073374330997467,0.12439737468958,0.079822011291981,0.0089356424286962,0.082266487181187,0.095859199762344,-0.040055748075247,0.031072063371539,-0.074191235005856,-0.17806507647038,-0.087892279028893,0.013930887915194,0.085297517478466,-0.044885698705912,0.096631646156311,-0.0075566885061562,0.080720603466034,-0.035989042371511,-0.14826467633247,-0.056701730936766,-0.049690458923578,0.017967024818063,0.14563573896885,-0.027589414268732,0.054250501096249,0.10214652121067,-0.092639699578285,0.020972931757569,0.014154405333102,-0.14585763216019,-0.02223851531744,0.11198300123215,0.064870603382587,-0.11900229007006,0.078739352524281,0.18985342979431,-0.012095944024622,-0.064483337104321,-0.21039552986622,0.13132260739803,0.041820485144854,-0.11704779416323,-0.028266865760088,-0.10028419643641,-0.051676206290722,0.012402578257024,0.05369595810771,-0.14907367527485,-0.066312000155449,-0.10602341592312,-0.10003349930048,0.092825524508953,-0.14685097336769,-0.13497270643711,-0.053804859519005,0.03851144015789,-0.16012623906136,-0.11530403792858,0.0057000494562089,0.15166638791561,0.059543684124947,-0.12744852900505,0.03084815479815,-0.023206077516079,0.10967537015676,0.093494229018688,-0.068601228296757,0.093406267464161,0.015747642144561,0.048768877983093,0.06850703805685,0.035241514444351,-0.028212416917086,-0.05110789835453,-0.049297332763672,0.15850211679935,0.050036493688822,-0.06911689043045,-0.013669647276402,-0.062428008764982,-0.062884271144867,-0.03328175842762,-0.054058488458395,-0.051508847624063,0.086876899003983,-0.046026568859816,-0.0099649019539356,-0.045602090656757,0.16972871124744,0.047455701977015,0.017695063725114,-0.034802637994289,0.015226993709803,-0.022453054785728,0.089553937315941,0.09223198890686,0.18687371909618,-0.066576138138771],
[0.055613808333874,0.23937717080116,0.0089270416647196,0.10860153287649,-0.032639816403389,0.11277642846107,-0.03260862454772,-0.19252985715866,0.0019439090974629,-0.041309412568808,0.032614573836327,-0.06381094455719,-0.098509475588799,-0.039520747959614,-0.01540186535567,-0.041114009916782,0.06089461222291,0.14244966208935,-0.00045189965749159,-0.084111198782921,-0.0011501947883517,0.027437288314104,-0.092919737100601,-0.022076603025198,0.10692550241947,-0.1196915358305,-0.093174204230309,0.070295117795467,0.01634475030005,0.11146104335785,0.039160467684269,0.14571678638458,-0.043790321797132,0.031612180173397,0.12365055084229,0.00087340985191986,0.023179413750768,-0.13007631897926,0.096716858446598,-0.11788406223059,-0.046744037419558,-0.074903510510921,0.07706793397665,-0.054277934134007,0.092464335262775,0.080445468425751,0.060482930392027,0.041037645190954,-0.21540303528309,-0.035607349127531,0.058236334472895,0.17023223638535,0.097409255802631,-0.060038048774004,-0.084272548556328,0.018030831590295,-0.076140634715557,-0.050178419798613,-0.028042629361153,-0.049750987440348,0.015386243350804,0.11153670400381,0.053715504705906,-0.12542614340782,0.0022591203451157,0.10636805742979,0.026868682354689,-0.084597490727901,-0.19584453105927,0.15214705467224,-0.0012741283280775,-0.089538745582104,-0.041064027696848,-0.01902768202126,-0.091991879045963,-0.064264059066772,0.055605828762054,-0.12281081080437,-0.063547171652317,-0.035711713135242,-0.011462590657175,0.12492739409208,-0.10255584865808,-0.093456633388996,0.032458107918501,0.0094103431329131,-0.19250643253326,-0.1792269796133,-0.025431634858251,0.19430130720139,0.082642786204815,-0.074526868760586,-0.033339016139507,0.050241567194462,0.054607648402452,0.048752602189779,0.023208003491163,0.0066654342226684,-0.00017185721662827,-0.014421094208956,0.06570877879858,0.08906052261591,-0.035791795700788,0.0089566949754953,-0.032716002315283,0.095502406358719,0.10443993657827,0.023695711046457,-0.029279123991728,0.056580681353807,0.055809542536736,-0.05198122933507,-0.036654360592365,-0.010450888425112,0.046844448894262,-0.14979350566864,-0.051716115325689,-0.016919666901231,0.18561559915543,-0.011618514545262,0.067465245723724,-0.042514979839325,0.063586033880711,-0.017269732430577,0.17972235381603,-0.013478375971317,0.18746584653854,-0.14408808946609],
[-0.046409923583269,0.14275135099888,-0.020206075161695,0.13094086945057,-0.066317372024059,0.045044831931591,-0.060534726828337,-0.14903724193573,0.144775390625,-0.083141691982746,0.026805952191353,-0.084183342754841,-0.042907811701298,0.053794980049133,-0.086552456021309,0.0017250479431823,0.010070266202092,0.15907000005245,-0.057653710246086,-0.035284772515297,0.1171251013875,-0.14050729572773,0.021223044022918,-0.012099059298635,0.096086606383324,-0.16558781266212,-0.15414437651634,-0.010143375955522,0.00355408876203,0.10029724240303,0.12984086573124,0.12682993710041,0.075984515249729,-0.030323300510645,0.097674936056137,0.05338453873992,-0.071143925189972,0.067299477756023,-0.048141118139029,-0.16671036183834,-0.10736055672169,0.0096022738143802,0.0028196130879223,-0.026506416499615,0.093422792851925,-0.063832618296146,0.020247554406524,-0.010550227016211,-0.10845052450895,-0.048582468181849,-0.073508620262146,0.068104453384876,0.16403575241566,-0.067074075341225,-0.052132442593575,0.069527804851532,-0.025323715060949,-0.023631932213902,0.0071521117351949,-0.16321963071823,-0.04454044252634,0.096155606210232,0.08116989582777,-0.10458963364363,0.045911829918623,0.17166335880756,0.0055129071697593,-0.055852342396975,-0.19484350085258,0.11528442054987,0.034294880926609,-0.097315281629562,-0.032181523740292,-0.071247756481171,-0.10131964832544,-0.056367103010416,0.026083504781127,-0.19628386199474,-0.085156813263893,-0.061706945300102,-0.09988434612751,0.078996740281582,-0.15703459084034,-0.12736891210079,-0.012361166067421,0.035946529358625,-0.18608286976814,-0.11424336582422,0.033208839595318,0.091637209057808,0.055211085826159,-0.092921890318394,0.0069955559447408,-0.031503535807133,0.14418071508408,0.057891324162483,-0.082995712757111,0.10115893930197,-0.041444327682257,0.064187750220299,0.097800508141518,-0.009218443185091,-0.032868083566427,-0.056375309824944,-0.0091537432745099,0.13074633479118,0.1066899895668,-0.079883523285389,0.075130484998226,-0.021639298647642,-0.067046836018562,-0.0097468104213476,-0.041125174611807,-0.038910984992981,0.094796404242516,-0.041251868009567,-0.015741614624858,-0.0027021029964089,0.21717239916325,0.03562194108963,0.0045869667083025,-0.041017550975084,0.010920321568847,-0.023823134601116,0.095528602600098,0.043644055724144,0.16932967305183,-0.041339788585901],
[0.013780671171844,0.19558653235435,-0.055685244500637,0.12483725696802,0.032383214682341,0.086455814540386,-0.042423292994499,-0.18779334425926,0.002420925302431,-0.10458210855722,0.053402237594128,-0.045877143740654,-0.041845586150885,0.0024896692484617,-0.082303591072559,0.039764326065779,0.078081101179123,0.051690772175789,0.015863578766584,-0.00015870729112066,0.13939470052719,-0.14341476559639,0.012546990066767,-0.0030002184212208,0.16778583824635,-0.14178158342838,-0.12095952033997,-0.027547845616937,0.098923318088055,0.11808313429356,0.13838838040829,0.044549725949764,0.0068206377327442,-0.06490945070982,0.079400807619095,0.031536046415567,-0.067453071475029,0.018005052581429,0.07255207747221,-0.13497090339661,-0.081951074302197,0.031266428530216,0.0395632609725,-0.036552608013153,0.080500535666943,0.053072724491358,0.085998639464378,-0.022951364517212,-0.17071408033371,-0.12564088404179,-0.10072579979897,0.11395018547773,0.1355512291193,-0.10269705206156,-0.076146997511387,0.038566388189793,-0.050627283751965,0.085439532995224,-0.064178094267845,-0.074392378330231,-0.047741912305355,0.11450712382793,0.14884519577026,-0.17038397490978,0.097738698124886,0.14338178932667,-0.014962556771934,-0.035033088177443,-0.19568425416946,0.035050000995398,0.046203508973122,-0.015411102212965,-0.088083811104298,-0.09800673276186,-0.012874022126198,0.0099510438740253,0.050794653594494,-0.089435994625092,-0.05340712890029,0.060215555131435,-0.122932523489,0.02719147130847,-0.090412721037865,-0.058958020061255,-0.022569946944714,0.051863107830286,-0.17134764790535,-0.10671120882034,-0.057948585599661,0.019985461607575,0.069870747625828,-0.078484125435352,-0.020202104002237,0.089879341423512,0.12931175529957,-0.036336503922939,-0.0010278268018737,0.092892028391361,-0.055507510900497,0.02378880046308,0.0070027061738074,-0.0049524693749845,-0.066663175821304,0.018926216289401,-0.093918152153492,0.1916306912899,0.15878915786743,0.058671068400145,0.090878315269947,-0.062421940267086,-0.02660140953958,-0.046941347420216,-0.041066221892834,0.019176544621587,0.10896826535463,0.00029134773649275,-0.17875841259956,0.059632748365402,0.14107595384121,0.097961373627186,-0.083745993673801,-0.042063418775797,-0.064479634165764,-0.018410103395581,0.078777156770229,0.12179320305586,0.088372208178043,-0.084172815084457],
[0.017436478286982,0.15265408158302,-0.057195000350475,0.068236418068409,-0.012206327170134,0.040723010897636,-0.068634010851383,-0.15463297069073,0.063787922263145,-0.10341247916222,0.041973620653152,-0.050086099654436,-0.017106359824538,0.096124954521656,-0.082979686558247,-0.0023128720931709,0.17111632227898,0.15614266693592,0.0079648336395621,0.0043908567167819,0.098881751298904,0.027176834642887,-0.03071465715766,0.036126393824816,-0.0013177836081013,-0.099650517106056,-0.082668036222458,0.035379182547331,0.093273386359215,0.15947197377682,0.074475914239883,0.11401677131653,0.083263792097569,-0.035065524280071,0.12319471687078,0.082561656832695,0.0184973385185,0.013608870096505,-0.04237949475646,-0.12393672019243,-0.15431959927082,0.08441074937582,0.015289196744561,0.015441262163222,0.082267954945564,0.062345206737518,0.079343102872372,0.026487153023481,-0.13269458711147,-0.061230853199959,-0.051763687282801,0.11918643862009,0.11232906579971,-0.069847621023655,-0.041126389056444,0.077351167798042,-0.068015836179256,0.024266842752695,-0.02053683064878,-0.068268291652203,-0.040250711143017,0.087763644754887,0.11155608296394,-0.13195277750492,0.055230230093002,-0.0016144065884873,0.029094494879246,-0.089142389595509,-0.17803245782852,0.12611265480518,0.036009687930346,-0.16505542397499,-0.051857613027096,-0.084991417825222,-0.13877719640732,-0.032407496124506,0.056874550879002,-0.059793166816235,-0.070299670100212,-0.13329327106476,-0.034629568457603,0.14771635830402,-0.17700992524624,-0.10843899101019,0.067076988518238,-0.017291661351919,-0.19324915111065,-0.14535410702229,-0.021584838628769,0.14812396466732,0.090144753456116,-0.073609381914139,-0.053262442350388,0.031764347106218,0.22608089447021,0.067851178348064,-0.0056585534475744,0.089871622622013,-0.059039697051048,0.05576242133975,0.057641565799713,0.08864776045084,-0.043295226991177,-0.028989214450121,-0.11447885632515,0.12444134801626,0.10222475975752,-0.12746362388134,0.067118816077709,0.0011316630989313,-0.015003034844995,-0.08572543412447,-0.050333324819803,-0.0056428085081279,0.054521191865206,-0.055458482354879,0.010989096947014,-0.13146448135376,0.13377696275711,0.030988808721304,-0.018071042373776,-0.032481547445059,0.027691887691617,-0.013504042290151,0.070252500474453,0.031691536307335,0.14447848498821,-0.11390105634928],
[-0.050015494227409,-0.029548274353147,0.20792125165462,0.13333758711815,0.08747398853302,0.07155604660511,-0.10526418685913,-0.20878820121288,0.16745284199715,-0.15812605619431,-0.0039296103641391,0.051496464759111,-0.13103801012039,0.02115816436708,0.072124049067497,0.011818782426417,-0.028903443366289,0.088022604584694,-0.094931446015835,-0.030943591147661,0.021949658170342,0.042120061814785,0.088356032967567,0.057297311723232,0.14481854438782,-0.093604072928429,-0.061685912311077,0.029844118282199,-0.11627205461264,-0.071934796869755,0.20634953677654,0.049577631056309,0.054378904402256,0.070024996995926,0.12484881281853,0.11783464998007,0.010170026682317,-0.023503929376602,-0.011274812743068,-0.096019722521305,0.11307081580162,0.036712553352118,0.036630295217037,-0.14989930391312,-0.017714057117701,-0.072355248034,-0.057015549391508,-0.0049135941080749,0.043704215437174,0.0411944873631,-0.040146391838789,-0.057299841195345,0.1416444927454,-0.034353692084551,0.035366866737604,0.022673552855849,-0.040698289871216,0.005769332870841,-0.10907848924398,-0.0020489543676376,-0.11808796226978,0.069662436842918,-0.038970254361629,-0.10940813273191,0.12031205743551,0.15755678713322,-0.039453737437725,0.01869192533195,-0.19487522542477,0.23753154277802,0.05809835344553,0.036188293248415,-0.010893057100475,-0.04548516869545,0.014795971103013,0.0087893977761269,-0.016552198678255,-0.13863936066628,-0.067398011684418,-0.035745609551668,-0.011504234746099,0.11402925848961,0.034933224320412,-0.026927761733532,-0.031029485166073,-0.052525177598,-0.037723246961832,0.063044905662537,-0.15904994308949,0.11850807070732,0.096934840083122,-0.030339693650603,0.070948839187622,0.033599562942982,0.021089397370815,0.074192747473717,-0.12915140390396,0.019354889169335,-0.0077866641804576,0.01825200393796,0.039130885154009,-0.1115215793252,-0.086440794169903,-0.090076208114624,0.15906849503517,0.05703342705965,0.087826132774353,-0.14923846721649,0.032207056879997,0.017376286908984,-0.092224203050137,0.036210086196661,0.062057986855507,0.046719785779715,0.10168225318193,-0.052410341799259,-0.061749927699566,0.094171218574047,0.039151545614004,0.1174149364233,0.13644976913929,0.047367807477713,-0.033534653484821,-0.033014342188835,0.08518685400486,0.09445845335722,0.17508402466774,0.012602902017534],
[-0.083765558898449,-0.014501499943435,0.088738612830639,0.065638020634651,0.066335745155811,0.11870822310448,-0.12896421551704,-0.29198268055916,0.090132817625999,-0.051258102059364,-0.0047508152201772,0.084916293621063,-0.069540239870548,0.080636575818062,0.0027683421503752,0.022471088916063,-0.014068430289626,0.13779996335506,-0.013569470494986,-0.05782226100564,0.0049576452001929,0.0061337067745626,0.056299101561308,0.12465297430754,0.093381434679031,-0.01807320304215,-0.013448080979288,0.0074667125009,-0.13376395404339,0.010886839590967,0.14297227561474,0.01117748953402,0.011426858603954,0.019020956009626,0.12421862781048,0.14822804927826,-0.029338199645281,-0.076356418430805,0.021402703598142,-0.044938001781702,0.016630316153169,0.044206000864506,0.047922786325216,-0.11534231156111,0.015918239951134,-0.071240931749344,0.010135795921087,0.055533234030008,0.0047811879776418,0.009471382945776,0.023567600175738,-0.13095505535603,0.13692021369934,-0.051368188112974,0.051971133798361,0.090228565037251,-0.036855023354292,0.12531980872154,-0.07005600631237,-0.0035811180714518,-0.064553365111351,0.13269318640232,0.068363919854164,-0.13509759306908,0.14753703773022,0.12470969557762,-0.061250001192093,0.04046569019556,-0.20173275470734,0.21172516047955,0.05939482524991,0.05896133929491,-0.0285301245749,-0.078968346118927,-0.013507191091776,0.05621600151062,-0.018412929028273,-0.11111051589251,-0.033064257353544,-0.09567341953516,0.01410408038646,0.13091513514519,0.0088051343336701,-0.023951502516866,-0.1417039334774,-0.059371780604124,-0.03372223302722,0.0093726506456733,-0.10665619373322,0.091291517019272,0.022212853655219,-0.028450068086386,0.16503129899502,0.046907249838114,0.042253598570824,0.093417726457119,-0.13023954629898,0.034699469804764,0.026482284069061,0.039274245500565,0.088272787630558,-0.074777834117413,-0.12865823507309,-0.092780888080597,0.12892712652683,0.069441735744476,0.01000767480582,-0.22360181808472,-0.10560930520296,0.066946402192116,-0.047429569065571,0.017873909324408,0.1568523645401,0.033809117972851,0.028569228947163,0.0064340028911829,-0.090472772717476,0.12813225388527,-0.029208030551672,0.079416997730732,0.11168450117111,-0.07107999175787,-0.030306173488498,-0.11530534923077,-0.042490810155869,0.19390724599361,0.010178679600358,-0.015391187742352],
[-0.061956081539392,-0.022484805434942,0.1493503600359,0.14212280511856,0.021493664011359,0.024239521473646,-0.098181955516338,-0.23378792405128,0.16351814568043,-0.078256405889988,-0.0081448461860418,0.062212321907282,-0.070034682750702,0.080747053027153,0.00833441875875,0.014583409763873,0.043257541954517,0.071124717593193,-0.089721597731113,-0.0014622189337388,-0.021090181544423,-0.069824516773224,0.03187808021903,0.15614582598209,0.11209855973721,-0.068972781300545,-0.050694968551397,0.058844115585089,-0.12702502310276,-0.036087263375521,0.17020580172539,0.10594090819359,0.021126022562385,0.059506431221962,0.040929518640041,0.11226863414049,-0.0093470439314842,0.040504835546017,-0.034800037741661,-0.074820719659328,0.039874847978354,0.020090226083994,0.015484821051359,-0.2181783169508,0.097601413726807,-0.085091486573219,-0.061242282390594,0.031248541548848,0.029373006895185,-0.0046410681679845,2.6411627914058e-05,-0.088792353868484,0.16946440935135,-0.069416202604771,0.044397678226233,0.055705297738314,-0.0960863083601,0.071105353534222,-0.048963695764542,-0.026439482346177,-0.069134540855885,0.10775401443243,-0.039726499468088,-0.14344456791878,0.088965639472008,0.220320135355,-0.017042571678758,0.027006993070245,-0.2415008097887,0.14358149468899,0.022646691650152,0.014438941143453,-0.037992421537638,-0.016703763976693,0.027875086292624,0.030575657263398,0.06011214479804,-0.12634706497192,-0.028192879632115,-0.048772279173136,-0.042679261416197,0.078760303556919,-0.023556189611554,-0.10531740635633,-0.05943625420332,-0.068732284009457,-0.055401980876923,0.026204381138086,-0.096916876733303,0.074566170573235,0.021254302933812,-0.036283545196056,0.19432048499584,0.068112887442112,0.041846491396427,0.12415794283152,-0.08850109577179,-0.053831331431866,0.05304192006588,0.014253308065236,0.063289247453213,-0.12874417006969,-0.15425810217857,-0.015991594642401,0.12146760523319,0.059954807162285,0.03346149623394,-0.19462861120701,-0.038302093744278,-0.0029021201189607,-0.10790725797415,0.085630096495152,0.10912533849478,0.036322049796581,0.066435910761356,-0.042640961706638,-0.1259251832962,0.13290391862392,0.01134142652154,0.085034422576427,0.054345335811377,0.027704354375601,-0.057081144303083,-0.048045203089714,0.03511169180274,0.15821197628975,0.029906516894698,-0.083144277334213],
[-0.076422274112701,0.047509048134089,0.12335707992315,0.12703670561314,0.057277984917164,0.038952343165874,-0.098281428217888,-0.27266931533813,0.12539114058018,-0.051104880869389,-0.048530075699091,0.11099845916033,-0.1146102398634,0.050036612898111,-0.012207457795739,0.038375962525606,0.019191233441234,0.057915162295103,-0.062970533967018,-0.032676786184311,-0.082126133143902,-0.01109372638166,0.074953235685825,0.13018110394478,0.10179648548365,-0.066680274903774,0.010060090571642,0.084424301981926,-0.10187204927206,-0.020020857453346,0.10936467349529,0.10816745460033,0.012964885681868,0.043573670089245,0.017440928146243,0.067529872059822,0.021027898415923,-0.0049190130084753,-0.019848510622978,0.015866316854954,0.062691494822502,0.015975354239345,0.062665939331055,-0.23708580434322,0.040727246552706,-0.034618493169546,-0.010670852847397,0.0055861882865429,0.031881801784039,0.042380899190903,0.083430618047714,-0.048806171864271,0.12633839249611,-0.050659269094467,0.042699281126261,0.046929657459259,-0.013568887487054,0.070347331464291,-0.047182999551296,0.041659776121378,-0.076080188155174,0.1099189221859,-0.03707692027092,-0.17387989163399,0.13117749989033,0.15450751781464,-0.043385036289692,0.0019830644596368,-0.2503162920475,0.21095950901508,0.0024021521676332,0.073483310639858,-0.026437031105161,0.059617567807436,0.074987597763538,0.074362717568874,0.063277333974838,-0.092538975179195,-0.070975668728352,-0.10365568101406,-0.012564870528877,0.10152444243431,0.026452321559191,-0.020145116373897,-0.067713230848312,-0.065569363534451,-0.065768659114838,0.023289110511541,-0.13943402469158,0.068852461874485,-0.027571026235819,-0.031095996499062,0.16584676504135,0.057096093893051,0.077298693358898,0.10732589662075,-0.064329072833061,-0.011192227713764,0.089212715625763,0.016788225620985,0.033042654395103,-0.12847080826759,-0.13395820558071,0.050200529396534,0.12205896526575,0.01564409583807,0.010177195072174,-0.14677184820175,-0.087258346378803,0.01363864634186,-0.085788503289223,0.094509892165661,0.17986164987087,0.05974180996418,0.012334205210209,-0.061586890369654,-0.099529728293419,0.16897206008434,0.01005744561553,0.111895814538,0.083577014505863,0.041515991091728,-0.043486662209034,-0.10324924439192,0.015783043578267,0.17247514426708,-0.019050940871239,-0.073232181370258],
[-0.067287668585777,0.035373948514462,0.18858940899372,0.16614359617233,0.060579009354115,0.035517878830433,-0.025328112766147,-0.27297013998032,0.10614354908466,-0.1141789034009,-0.033624671399593,0.041767504066229,-0.087929502129555,0.061808209866285,0.049151193350554,0.032518114894629,-0.044796001166105,0.031538996845484,-0.11062426120043,-0.021272841840982,-0.0053228009492159,-0.063478395342827,0.066054917871952,0.12066606432199,0.15411694347858,-0.11189599335194,-0.13701122999191,0.03320188075304,-0.056864537298679,-0.010362966917455,0.17956918478012,0.11577894538641,-0.044237110763788,0.030822711065412,0.049843043088913,0.093820832669735,-0.076581723988056,0.033408023416996,-0.042615178972483,-0.041134044528008,0.079216636717319,0.028165072202682,0.021119331941009,-0.17995630204678,0.044976036995649,0.0030527510680258,-0.031682524830103,0.013389680534601,0.012919556349516,-0.017616182565689,-0.009196843020618,-0.040246225893497,0.14827065169811,-0.10008823126554,0.051535792648792,0.031042452901602,-0.069396540522575,0.13513387739658,-0.032581832259893,0.019487082958221,-0.095900036394596,0.14155946671963,-0.028176710009575,-0.11687868088484,0.12891620397568,0.21617382764816,-0.023720901459455,-0.0055604591034353,-0.25102096796036,0.16993199288845,0.050801355391741,0.1093994230032,0.0036954209208488,0.051551636308432,0.056877240538597,0.034127064049244,0.01790683157742,-0.15584862232208,-0.038529604673386,0.0041359500028193,0.01399436313659,0.041507944464684,-0.017255626618862,-0.082265093922615,-0.085046693682671,-0.074806869029999,-0.048411265015602,0.0019335995893925,-0.18265390396118,0.056025985628366,0.053394746035337,-0.0092457169666886,0.15032857656479,0.00750049110502,0.023194810375571,0.090235278010368,-0.073446504771709,-0.0094513464719057,0.088165238499641,0.025362033396959,0.03573190048337,-0.10276201367378,-0.097379393875599,-0.0030639425385743,0.060087233781815,0.070002838969231,0.039126228541136,-0.072707407176495,0.061470825225115,-0.0044091842137277,-0.051904585212469,0.10342574119568,0.04935546964407,0.020408846437931,0.066699430346489,0.0046918326988816,-0.11595545709133,0.18028254806995,0.017790984362364,0.14219780266285,0.043982680886984,0.03574563190341,-0.094531394541264,-0.035903621464968,-0.0059403134509921,0.18414182960987,0.023323940113187,-0.056276511400938],
[-0.068819791078568,0.11113447695971,-0.029641443863511,-0.13797822594643,0.077332086861134,0.15619084239006,-0.042445138096809,-0.067653141915798,-0.0033735579345375,0.14265093207359,-0.015739876776934,-0.075293458998203,-0.020257137715816,0.076582729816437,0.21141257882118,-0.023607017472386,-0.035866774618626,0.087054215371609,0.014451699331403,-0.082602255046368,-0.18126119673252,0.089472696185112,0.12679126858711,-0.10874640196562,-0.022261453792453,-0.070525377988815,0.031722705811262,0.086020678281784,-0.019286600872874,-0.091589324176311,0.06096813455224,-0.0034312037751079,0.054444175213575,0.020864047110081,0.1122324988246,0.13482092320919,0.087749630212784,-0.076102301478386,0.0068231192417443,-0.012598834000528,0.016736650839448,-0.051075454801321,0.030939817428589,-0.030738823115826,-0.17074699699879,0.062171142548323,-0.019930245354772,0.17998442053795,-0.070853665471077,0.088261805474758,-0.073122844099998,-0.037882961332798,-0.019754307344556,-0.020352140069008,-0.080835655331612,0.05879032984376,-0.028185963630676,0.013265792280436,-0.07270559668541,0.047813251614571,-0.17119732499123,0.10810248553753,0.080751791596413,-0.13721850514412,0.091930896043777,0.1898375749588,-0.083654798567295,0.10333336144686,-0.13459508121014,0.13936410844326,0.035059131681919,0.041540842503309,-0.0091469930484891,-0.013840612024069,0.035647485405207,0.003783248597756,-0.034338641911745,-0.10848513990641,0.035602170974016,-0.22000727057457,0.077585890889168,0.010793522931635,-0.051295898854733,0.026103585958481,-0.086273327469826,0.017102984711528,-0.084135808050632,-0.0069366758689284,0.049410324543715,0.1964568644762,0.11975663155317,-0.051748622208834,0.027678592130542,-0.0099136289209127,0.079025156795979,0.018314305692911,-0.11548910290003,0.080859802663326,-0.033581797033548,0.017933644354343,0.043137151747942,-0.042955726385117,-0.018471743911505,-0.17650182545185,0.041385870426893,0.10052253305912,-0.028182949870825,-0.14147248864174,0.0018069706857204,0.077418550848961,0.04974302649498,0.051435980945826,0.17934057116508,0.052971191704273,0.0013390087988228,-0.093912109732628,0.062474317848682,0.079687297344208,0.10544055700302,0.061813920736313,0.18951259553432,-0.20570626854897,0.070391863584518,0.053120438009501,0.00039904567529447,-0.014639029279351,0.036745563149452,-0.013918291777372],
[-0.053160015493631,0.14341738820076,-0.022609170526266,-0.050295099616051,0.12005289644003,0.064930059015751,-0.10400898754597,-0.13628609478474,0.043405875563622,0.014856503345072,0.0033854623325169,-0.017162954434752,-0.01320490706712,0.14163130521774,0.094162970781326,0.032668150961399,0.1269752830267,0.1008932068944,0.023368842899799,0.0088714985176921,-0.026065617799759,0.076148800551891,0.062935099005699,0.045432765036821,0.075380802154541,-0.10844546556473,0.050898183137178,0.15480820834637,0.076027140021324,0.074463188648224,0.10056042671204,0.0012248507700861,0.13850000500679,0.025652544572949,0.098264962434769,0.13900671899319,0.095974296331406,-0.079848892986774,-0.024742562323809,-0.10514716804028,-0.028916483744979,0.024637915194035,0.18886841833591,-0.011473304592073,-0.059463407844305,0.011474262923002,0.055830895900726,0.12792989611626,-0.021090991795063,0.05562711134553,-0.045433454215527,-0.014610456302762,0.033548034727573,-0.063763968646526,0.027448473498225,0.10121110826731,-0.11838974058628,0.054622415453196,-0.062473442405462,-0.028885142877698,-0.17330360412598,0.049190621823072,0.079043529927731,-0.15053209662437,0.07314095646143,0.14198611676693,-0.10735024511814,-0.032297555357218,-0.23532126843929,0.12105821818113,0.01839498244226,-0.03065076097846,-0.059106532484293,-0.1076994612813,0.026109153404832,0.029976818710566,0.090452678501606,-0.032015923410654,-0.0032120414543897,-0.17728817462921,0.072384126484394,0.093165174126625,-0.026978898793459,0.040541082620621,0.022467447444797,-0.032834436744452,-0.16631670296192,0.01498655974865,0.04671623557806,0.22942599654198,0.083183638751507,-0.070878453552723,-0.046029355376959,0.050842147320509,0.1772079616785,0.039338193833828,-0.1277123093605,0.14920414984226,-0.049000419676304,-0.021544687449932,0.031142732128501,-0.012623278424144,-0.004179151263088,-0.099225260317326,-0.077447630465031,0.16110560297966,0.010538514703512,-0.1778252273798,0.068668909370899,0.0071855704300106,0.0060958075337112,-0.0068542174994946,0.078534707427025,0.12590524554253,0.016460981220007,-0.084553100168705,0.077230215072632,0.037148006260395,0.05304442346096,0.14385429024696,0.12257721275091,-0.099843598902225,0.02815412171185,0.00063376367324963,-0.052998319268227,0.06233249977231,0.11460449546576,-0.052595987915993],
[-0.082635961472988,0.12569543719292,-0.032462656497955,-0.099001698195934,0.12452234327793,0.094421416521072,-0.055162776261568,-0.054176487028599,-0.014543112367392,0.10025914013386,-0.015890317037702,-0.054853111505508,-0.014828141778708,0.064720347523689,0.1416005641222,0.075313366949558,0.043709300458431,0.084870353341103,0.04516338929534,-0.033132411539555,-0.049929816275835,0.06984605640173,0.05052237585187,-0.013059274293482,0.051590256392956,-0.03492658957839,0.052728790789843,0.093563809990883,0.13542310893536,-0.00093571783509105,0.081259146332741,0.017669739201665,0.077913090586662,0.023995639756322,0.10149494558573,0.13156059384346,0.084971770644188,-0.10807630419731,-0.011631992645562,-0.10611893236637,0.026781722903252,-0.043835751712322,0.1914601624012,0.049108117818832,-0.071479171514511,0.025344179943204,0.08289809525013,0.15431463718414,-0.074239619076252,0.010908733122051,-0.076288469135761,-0.062417514622211,-0.013707264326513,-0.080875292420387,0.023606266826391,0.10873566567898,-0.10521475970745,0.054055634886026,-0.042939133942127,-0.020368564873934,-0.17431890964508,0.029403375461698,0.105877622962,-0.11135002225637,0.10394912958145,0.17602269351482,-0.13709904253483,-0.043197881430387,-0.14930547773838,0.10416898876429,-0.048456609249115,0.024647787213326,-0.04539117962122,-0.061547037214041,0.03080777823925,-0.031005704775453,0.069049157202244,0.041017293930054,0.010108017362654,-0.22906006872654,0.10860614478588,0.083161123096943,-0.044696219265461,0.031637422740459,-0.013298467732966,-0.031140554696321,-0.11741755157709,0.063732728362083,0.071583859622478,0.22321060299873,0.14989285171032,-0.001465592184104,-0.12447371333838,0.0051024025306106,0.16750583052635,0.091913975775242,-0.098998375236988,0.16788426041603,-0.036709133535624,-0.0069644404575229,0.010127568617463,-0.059247557073832,0.011687627993524,-0.14321954548359,-0.067818559706211,0.14556103944778,-0.013041469268501,-0.1483573615551,0.086215771734715,0.0083551369607449,0.015087471343577,0.045166406780481,0.084830865263939,0.051880765706301,0.074411250650883,-0.10050738602877,0.105005197227,0.0062838052399457,0.065249033272266,0.098688945174217,0.1592628210783,-0.13476750254631,0.092326156795025,0.026300707831979,-0.10592013597488,0.043257389217615,0.076670400798321,-0.044942278414965],
[-0.04717031866312,0.061741381883621,0.076984338462353,-0.078705571591854,0.10126850754023,0.12502503395081,-0.022280264645815,-0.015640459954739,-0.15005710721016,0.066045813262463,-0.051186319440603,-0.06142845749855,-0.068953305482864,0.027692794799805,0.22859302163124,0.017219902947545,-0.051040809601545,0.015803212299943,0.1045757830143,-0.043475564569235,-0.094753846526146,0.097873449325562,0.1436812877655,-0.092186369001865,0.028920268639922,-0.016249684616923,0.038409899920225,0.017843334004283,0.070213459432125,-0.1062593832612,0.02985174395144,-0.030969154089689,0.027384411543608,0.033263932913542,0.12415986508131,0.11887020617723,0.049601919949055,-0.08306796848774,-0.037529829889536,-0.070609040558338,0.050477065145969,-0.068878509104252,0.089880838990211,0.013250795193017,-0.17396739125252,0.15504369139671,0.086887769401073,0.1090722233057,-0.14599014818668,0.072608560323715,-0.054993495345116,-0.019627381116152,-0.019753584638238,-0.032374884933233,0.042926017194986,0.036842070519924,0.0036703010555357,0.028883719816804,-0.046539820730686,0.053901169449091,-0.12390347570181,0.073789246380329,0.064376249909401,-0.10087576508522,0.20482391119003,0.13092397153378,-0.12095169723034,-0.01806734316051,-0.10786003619432,0.21338407695293,-0.055984776467085,0.077638201415539,-0.031278744339943,0.030765714123845,0.040415063500404,-0.038492176681757,0.015318446792662,0.013629022054374,0.052123811095953,-0.16793924570084,0.077497228980064,-0.02237144112587,-0.053120948374271,0.0020261565223336,-0.039018709212542,-0.082597799599171,-0.084142275154591,0.06009966135025,-0.015208520926535,0.22046586871147,0.20358687639236,0.067417643964291,-0.09620589017868,-0.025185536593199,0.078111946582794,0.067558281123638,-0.0048934570513666,0.18059319257736,0.017736040055752,-0.0083608850836754,-0.0089262332767248,0.0013247531605884,0.010326885618269,-0.18546684086323,-0.0063087283633649,0.091743387281895,0.0083029745146632,-0.07061829417944,0.099802181124687,0.008060259744525,0.038510099053383,0.081135675311089,0.1114601418376,-0.035491574555635,0.10245355963707,-0.06367389857769,0.13416719436646,-0.017039695754647,0.075779877603054,0.12467829883099,0.15519185364246,-0.14646236598492,0.089872635900974,0.03388013318181,-0.031934395432472,0.032220967113972,0.15176233649254,-0.0034781156573445],
[-0.12132085859776,0.09852971881628,0.041892345994711,-0.07077968865633,0.11473740637302,0.086649492383003,-0.048417780548334,-0.028898872435093,0.040093656629324,0.07790419459343,-0.043610416352749,-0.025296568870544,-0.022419581189752,0.09338752925396,0.18799994885921,-0.01410439517349,0.088418371975422,0.055694758892059,0.032526738941669,-0.06257601827383,-0.070950523018837,0.030882589519024,-0.02001073397696,0.059368673712015,0.11423096805811,-0.086981095373631,0.029333433136344,0.13031956553459,0.039964940398932,-0.019474916160107,0.14282801747322,-0.020786892622709,0.092536844313145,0.05168729275465,0.072627350687981,0.13202904164791,0.095734313130379,-0.14917215704918,-0.058747950941324,-0.1127115637064,0.11738627403975,-0.036067955195904,0.21227933466434,-0.0075629027560353,-0.032846596091986,-0.0085843587294221,0.034755129367113,0.11516663432121,-0.03493957221508,-0.038479290902615,-0.066656783223152,-0.12994810938835,0.043748859316111,-0.10662186145782,0.050649229437113,0.15587782859802,-0.20941892266273,0.070244543254375,-0.037777483463287,-0.035057704895735,-0.16293980181217,0.048266883939505,-0.0096209840849042,-0.13721656799316,0.095396123826504,0.24169293045998,-0.099606916308403,-0.032394200563431,-0.19572451710701,0.056043546646833,-0.011456613428891,0.0169224049896,-0.052491143345833,-0.13217321038246,0.07500471919775,0.064426690340042,0.062439933419228,0.02089430950582,0.031240304931998,-0.2001047283411,0.01282867975533,0.079058483242989,0.0093256393447518,0.045348953455687,-0.0063658328726888,-0.030669068917632,-0.057113528251648,0.062472350895405,0.039604373276234,0.20688000321388,0.08102160692215,-0.040461245924234,-0.022124789655209,0.0040694810450077,0.10208822786808,0.099264450371265,-0.10149141401052,0.062004450708628,-0.039147946983576,-0.0041726198978722,-0.0045386534184217,-0.069970823824406,0.0010615786304697,-0.1452428996563,-0.089892648160458,0.14853870868683,-0.04631781950593,-0.18521182239056,-0.018989287316799,0.00084138632519171,0.014714129269123,0.0022349341306835,0.058381460607052,0.033589843660593,0.04635052382946,-0.11691634356976,0.023357275873423,0.025887282565236,0.040165822952986,0.10634339600801,0.16670942306519,-0.10392625629902,-0.0012454178649932,0.036852490156889,-0.048750702291727,0.065954804420471,0.044361095875502,-0.065958574414253]
]	
results = face_recognition.compare_faces(known_face_encoding, uploaded_face_encoding)
print(results)
mydb = mysql.connector.connect(
  host="localhost",
  user="thom",       # just an example
  passwd="pass",      # just an example
  database="dbname"    # just an example
)
    #return jsonify({"No match found"}), 404
    mycursor = mydb.cursor()
    quryString = 'SELECT user_id,name, sqrt(' \
'power(f1 - (' + str(uploaded_face_encoding[0]) + ') , 2) + ' \
'power(f2 - (' + str(uploaded_face_encoding[1]) + ') , 2) + ' \
'power(f3 - (' + str(uploaded_face_encoding[2]) + ') , 2) + ' \
'power(f4 - (' + str(uploaded_face_encoding[3]) + ') , 2) + ' \
'power(f5 - (' + str(uploaded_face_encoding[4]) + ') , 2) + ' \
'power(f6 - (' + str(uploaded_face_encoding[5]) + ') , 2) + ' \
'power(f7 - (' + str(uploaded_face_encoding[6]) + ') , 2) + ' \
'power(f8 - (' + str(uploaded_face_encoding[7]) + ') , 2) + ' \
'power(f9 - (' + str(uploaded_face_encoding[8]) + ') , 2) + ' \
'power(f10 - (' + str(uploaded_face_encoding[9]) + ') , 2) + ' \
'power(f11 - (' + str(uploaded_face_encoding[10]) + ') , 2) + ' \
'power(f12 - (' + str(uploaded_face_encoding[11]) + ') , 2) + ' \
'power(f13 - (' + str(uploaded_face_encoding[12]) + ') , 2) + ' \
'power(f14 - (' + str(uploaded_face_encoding[13]) + ') , 2) + ' \
'power(f15 - (' + str(uploaded_face_encoding[14]) + ') , 2) + ' \
'power(f16 - (' + str(uploaded_face_encoding[15]) + ') , 2) + ' \
'power(f17 - (' + str(uploaded_face_encoding[16]) + ') , 2) + ' \
'power(f18 - (' + str(uploaded_face_encoding[17]) + ') , 2) + ' \
'power(f19 - (' + str(uploaded_face_encoding[18]) + ') , 2) + ' \
'power(f20 - (' + str(uploaded_face_encoding[19]) + ') , 2) + ' \
'power(f21 - (' + str(uploaded_face_encoding[20]) + ') , 2) + ' \
'power(f22 - (' + str(uploaded_face_encoding[21]) + ') , 2) + ' \
'power(f23 - (' + str(uploaded_face_encoding[22]) + ') , 2) + ' \
'power(f24 - (' + str(uploaded_face_encoding[23]) + ') , 2) + ' \
'power(f25 - (' + str(uploaded_face_encoding[24]) + ') , 2) + ' \
'power(f26 - (' + str(uploaded_face_encoding[25]) + ') , 2) + ' \
'power(f27 - (' + str(uploaded_face_encoding[26]) + ') , 2) + ' \
'power(f28 - (' + str(uploaded_face_encoding[27]) + ') , 2) + ' \
'power(f29 - (' + str(uploaded_face_encoding[28]) + ') , 2) + ' \
'power(f30 - (' + str(uploaded_face_encoding[29]) + ') , 2) + ' \
'power(f31 - (' + str(uploaded_face_encoding[30]) + ') , 2) + ' \
'power(f32 - (' + str(uploaded_face_encoding[31]) + ') , 2) + ' \
'power(f33 - (' + str(uploaded_face_encoding[32]) + ') , 2) + ' \
'power(f34 - (' + str(uploaded_face_encoding[33]) + ') , 2) + ' \
'power(f35 - (' + str(uploaded_face_encoding[34]) + ') , 2) + ' \
'power(f36 - (' + str(uploaded_face_encoding[35]) + ') , 2) + ' \
'power(f37 - (' + str(uploaded_face_encoding[36]) + ') , 2) + ' \
'power(f38 - (' + str(uploaded_face_encoding[37]) + ') , 2) + ' \
'power(f39 - (' + str(uploaded_face_encoding[38]) + ') , 2) + ' \
'power(f40 - (' + str(uploaded_face_encoding[39]) + ') , 2) + ' \
'power(f41 - (' + str(uploaded_face_encoding[40]) + ') , 2) + ' \
'power(f42 - (' + str(uploaded_face_encoding[41]) + ') , 2) + ' \
'power(f43 - (' + str(uploaded_face_encoding[42]) + ') , 2) + ' \
'power(f44 - (' + str(uploaded_face_encoding[43]) + ') , 2) + ' \
'power(f45 - (' + str(uploaded_face_encoding[44]) + ') , 2) + ' \
'power(f46 - (' + str(uploaded_face_encoding[45]) + ') , 2) + ' \
'power(f47 - (' + str(uploaded_face_encoding[46]) + ') , 2) + ' \
'power(f48 - (' + str(uploaded_face_encoding[47]) + ') , 2) + ' \
'power(f49 - (' + str(uploaded_face_encoding[48]) + ') , 2) + ' \
'power(f50 - (' + str(uploaded_face_encoding[49]) + ') , 2) + ' \
'power(f51 - (' + str(uploaded_face_encoding[50]) + ') , 2) + ' \
'power(f52 - (' + str(uploaded_face_encoding[51]) + ') , 2) + ' \
'power(f53 - (' + str(uploaded_face_encoding[52]) + ') , 2) + ' \
'power(f54 - (' + str(uploaded_face_encoding[53]) + ') , 2) + ' \
'power(f55 - (' + str(uploaded_face_encoding[54]) + ') , 2) + ' \
'power(f56 - (' + str(uploaded_face_encoding[55]) + ') , 2) + ' \
'power(f57 - (' + str(uploaded_face_encoding[56]) + ') , 2) + ' \
'power(f58 - (' + str(uploaded_face_encoding[57]) + ') , 2) + ' \
'power(f59 - (' + str(uploaded_face_encoding[58]) + ') , 2) + ' \
'power(f60 - (' + str(uploaded_face_encoding[59]) + ') , 2) + ' \
'power(f61 - (' + str(uploaded_face_encoding[60]) + ') , 2) + ' \
'power(f62 - (' + str(uploaded_face_encoding[61]) + ') , 2) + ' \
'power(f63 - (' + str(uploaded_face_encoding[62]) + ') , 2) + ' \
'power(f64 - (' + str(uploaded_face_encoding[63]) + ') , 2) + ' \
'power(f65 - (' + str(uploaded_face_encoding[64]) + ') , 2) + ' \
'power(f66 - (' + str(uploaded_face_encoding[65]) + ') , 2) + ' \
'power(f67 - (' + str(uploaded_face_encoding[66]) + ') , 2) + ' \
'power(f68 - (' + str(uploaded_face_encoding[67]) + ') , 2) + ' \
'power(f69 - (' + str(uploaded_face_encoding[68]) + ') , 2) + ' \
'power(f70 - (' + str(uploaded_face_encoding[69]) + ') , 2) + ' \
'power(f71 - (' + str(uploaded_face_encoding[70]) + ') , 2) + ' \
'power(f72 - (' + str(uploaded_face_encoding[71]) + ') , 2) + ' \
'power(f73 - (' + str(uploaded_face_encoding[72]) + ') , 2) + ' \
'power(f74 - (' + str(uploaded_face_encoding[73]) + ') , 2) + ' \
'power(f75 - (' + str(uploaded_face_encoding[74]) + ') , 2) + ' \
'power(f76 - (' + str(uploaded_face_encoding[75]) + ') , 2) + ' \
'power(f77 - (' + str(uploaded_face_encoding[76]) + ') , 2) + ' \
'power(f78 - (' + str(uploaded_face_encoding[77]) + ') , 2) + ' \
'power(f79 - (' + str(uploaded_face_encoding[78]) + ') , 2) + ' \
'power(f80 - (' + str(uploaded_face_encoding[79]) + ') , 2) + ' \
'power(f81 - (' + str(uploaded_face_encoding[80]) + ') , 2) + ' \
'power(f82 - (' + str(uploaded_face_encoding[81]) + ') , 2) + ' \
'power(f83 - (' + str(uploaded_face_encoding[82]) + ') , 2) + ' \
'power(f84 - (' + str(uploaded_face_encoding[83]) + ') , 2) + ' \
'power(f85 - (' + str(uploaded_face_encoding[84]) + ') , 2) + ' \
'power(f86 - (' + str(uploaded_face_encoding[85]) + ') , 2) + ' \
'power(f87 - (' + str(uploaded_face_encoding[86]) + ') , 2) + ' \
'power(f88 - (' + str(uploaded_face_encoding[87]) + ') , 2) + ' \
'power(f89 - (' + str(uploaded_face_encoding[88]) + ') , 2) + ' \
'power(f90 - (' + str(uploaded_face_encoding[89]) + ') , 2) + ' \
'power(f91 - (' + str(uploaded_face_encoding[90]) + ') , 2) + ' \
'power(f92 - (' + str(uploaded_face_encoding[91]) + ') , 2) + ' \
'power(f93 - (' + str(uploaded_face_encoding[92]) + ') , 2) + ' \
'power(f94 - (' + str(uploaded_face_encoding[93]) + ') , 2) + ' \
'power(f95 - (' + str(uploaded_face_encoding[94]) + ') , 2) + ' \
'power(f96 - (' + str(uploaded_face_encoding[95]) + ') , 2) + ' \
'power(f97 - (' + str(uploaded_face_encoding[96]) + ') , 2) + ' \
'power(f98 - (' + str(uploaded_face_encoding[97]) + ') , 2) + ' \
'power(f99 - (' + str(uploaded_face_encoding[98]) + ') , 2) + ' \
'power(f100 - (' + str(uploaded_face_encoding[99]) + ') , 2) + ' \
'power(f101 - (' + str(uploaded_face_encoding[100]) + ') , 2) + ' \
'power(f102 - (' + str(uploaded_face_encoding[101]) + ') , 2) + ' \
'power(f103 - (' + str(uploaded_face_encoding[102]) + ') , 2) + ' \
'power(f104 - (' + str(uploaded_face_encoding[103]) + ') , 2) + ' \
'power(f105 - (' + str(uploaded_face_encoding[104]) + ') , 2) + ' \
'power(f106 - (' + str(uploaded_face_encoding[105]) + ') , 2) + ' \
'power(f107 - (' + str(uploaded_face_encoding[106]) + ') , 2) + ' \
'power(f108 - (' + str(uploaded_face_encoding[107]) + ') , 2) + ' \
'power(f109 - (' + str(uploaded_face_encoding[108]) + ') , 2) + ' \
'power(f110 - (' + str(uploaded_face_encoding[109]) + ') , 2) + ' \
'power(f111 - (' + str(uploaded_face_encoding[110]) + ') , 2) + ' \
'power(f112 - (' + str(uploaded_face_encoding[111]) + ') , 2) + ' \
'power(f113 - (' + str(uploaded_face_encoding[112]) + ') , 2) + ' \
'power(f114 - (' + str(uploaded_face_encoding[113]) + ') , 2) + ' \
'power(f115 - (' + str(uploaded_face_encoding[114]) + ') , 2) + ' \
'power(f116 - (' + str(uploaded_face_encoding[115]) + ') , 2) + ' \
'power(f117 - (' + str(uploaded_face_encoding[116]) + ') , 2) + ' \
'power(f118 - (' + str(uploaded_face_encoding[117]) + ') , 2) + ' \
'power(f119 - (' + str(uploaded_face_encoding[118]) + ') , 2) + ' \
'power(f120 - (' + str(uploaded_face_encoding[119]) + ') , 2) + ' \
'power(f121 - (' + str(uploaded_face_encoding[120]) + ') , 2) + ' \
'power(f122 - (' + str(uploaded_face_encoding[121]) + ') , 2) + ' \
'power(f123 - (' + str(uploaded_face_encoding[122]) + ') , 2) + ' \
'power(f124 - (' + str(uploaded_face_encoding[123]) + ') , 2) + ' \
'power(f125 - (' + str(uploaded_face_encoding[124]) + ') , 2) + ' \
'power(f126 - (' + str(uploaded_face_encoding[125]) + ') , 2) + ' \
'power(f127 - (' + str(uploaded_face_encoding[126]) + ') , 2) + ' \
'power(f128 - (' + str(uploaded_face_encoding[127]) + ') , 2) ' \
') as distance FROM user_face_embeddings ORDER BY distance LIMIT 100;'
#print(quryString)
mycursor.execute(quryString)	
face_data = mycursor.fetchall()
if not face_data:
    return jsonify({"match": "No match found"}), 404
else:
    return jsonify({"match": face_data})

Please assist me in fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant