photoprism/internal/entity/face_fixtures.go
2021-08-19 21:12:38 +02:00

51 lines
20 KiB
Go

package entity
type FaceMap map[string]Face
func (m FaceMap) Get(name string) Face {
if result, ok := m[name]; ok {
return result
}
return UnknownFace
}
func (m FaceMap) Pointer(name string) *Face {
if result, ok := m[name]; ok {
return &result
}
return &UnknownFace
}
var FaceFixtures = FaceMap{
"known": Face{
ID: "PN6QO5INYTUSAATOFL43LL2ABAV5ACZK",
EmbeddingJSON: []byte("[-0.015105677000169373,-0.0005582744874266051,0.0480268501406662,-0.03601115760977173,0.0005837739331054689,0.014168089953522492,-0.03945336629091645,-0.02582770810183487,0.020898761370506287,0.049166841007919314,0.021960500727076723,-0.019064476425213243,0.02198730232398834,0.0006670523258575441,0.03028046368291855,0.00649638007861023,-0.01584042613295212,0.00530397326763153,-0.06404373233350608,0.03889477750802231,-0.0365899261901268,0.0360787547656456,0.07579429823342132,0.039115246617597965,-0.0777424514863777,0.035950400633987425,-0.01904672616637268,0.031240118709612276,-0.01142303718094612,0.021169409966093445,-0.04066713893357315,0.048964979162612915,-0.016256413336937715,-0.02378354035888214,-0.020449917192553707,-0.02040227800516968,0.06541690078029251,0.016761249534914705,0.03380005035063598,-0.10038679582336427,0.043679719882033535,0.03128701222455444,0.012390233834701538,0.05524386205410767,0.021537026348385238,-0.016655772903281404,0.007295974349593354,-0.000005785312992858532,-0.047790829845092773,0.017440576051146697,-0.06534523391118621,0.06609203363401413,0.03238222320728302,0.006614993631034087,-0.054927458582173155,0.030833110256991578,-0.0056855157837505345,-0.007370784518985901,0.0013351148462055202,0.047366844577483365,0.04135019693103943,-0.02510304556774292,-0.05305447016115189,-0.03180977055114746,0.012452435193779296,-0.031038226814250947,-0.06159064720963287,0.057565623878417974,0.006987256155133055,0.10980759767712402,0.0014624758511650082,0.04941792959784012,0.02249399537556839,-0.007318808567618561,0.011643714617645264,-0.033996864613095854,-0.10756568994960479,-0.008790611639031982,-0.06265860528228379,-0.03834362793397904,-0.007061803256170654,-0.02360514984864273,-0.030340688408576965,-0.006711280069554138,-0.026063804222563172,-0.06257436487065124,-0.03489222804085922,0.023775160926244356,-0.05953325934691238,-0.0015599671627334586,0.04257923482005539,-0.02072714042014847,0.042186514202873227,0.03334131403590164,-0.04231802868860626,-0.03938228046069336,0.04991599600813751,0.005012853217630309,0.02852926982268677,-0.04592934168044281,-0.0446876756071167,0.05780069138760376,-0.06523845092017364,0.03691154157677917,0.0048527119732078555,-0.008498008999919891,-0.06625776342607116,0.013960302090915604,-0.029253019821994783,0.02477269871644745,0.010155390116101837,0.03100301871340158,-0.07413353268207168,0.01750142506529999,0.03461705135130691,0.04982243958808899,0.00851692480498886,-0.002991416728403473,0.01759018484255066,-0.07281463888115311,0.07669263036101531,0.0287119138326683,-0.0011225693401481635,-0.022214332482351686,0.08318748801869094,0.06656315672954559,0.0034995880579914086,0.04958693578422928,-0.027691547638692474,-0.03405751975708465,-0.062014044191894525,-0.0004367024225837711,0.007944679561768342,0.03339219333856888,-0.04039564807562256,-0.06730881179145813,-0.07099339792601776,-0.033052287483390806,-0.050682249608245855,0.011561693050074387,-0.09867453691846315,-0.02774825273226944,0.010811723733195496,0.02427582366474533,-0.02078586645137596,0.01433492286357048,0.026900254564299775,-0.05306856266233825,-0.007102414552368164,-0.02275204349867813,-0.03211197205357055,-0.014967170406674196,0.022953155306690905,-0.03644228327174301,0.012341418549354555,0.020687427985451052,-0.09076456366364288,0.031082595049208066,0.04102866745965958,-0.02306090883122635,0.027812227150472258,-0.013119295590370941,-0.004158771480469893,-0.007025444076653517,0.009275999232177735,-0.039368103392872236,0.01910143328294525,-0.05630273885418091,0.055353015055413055,-0.0014070097039474495,0.042947509516956334,0.0024906970417621615,-0.03561797166536834,0.006505803784743882,0.006665486497595978,-0.006378142944042969,0.05448368035679932,0.07332471840206146,-0.0014946864171386718,-0.008414893981474686,-0.00006825545633163364,0.02668107540572357,-0.024539537215417483,-0.07293688736830901,0.06344162595002364,-0.033607367797969814,-0.01986442914540863,0.026089177944317626,-0.022147074482840423,-0.08048881567908478,0.050637503425783534,-0.06346700348937226,-0.015700777833213043,-0.04264569287159348,-0.002655311902906036,-0.03654008229608307,-0.007810925734401397,-0.0435794361814415,-0.011699671276438905,0.057055175916534424,0.04544679800120926,0.037604382557088464,-0.02941164037058258,-0.05797836845658112,-0.06812897444572831,0.08032934278161621,-0.01328043643980198,-0.08971531949739076,0.0065821178142807,0.008762343139662933,0.020370728524544524,0.03974483299145508,-0.0051898651247510525,-0.0031604766306224056,0.07640609197084428,0.038082580676622776,0.05806105880397415,-0.014124205852999725,0.007738546446239335,-0.04230980231715012,-0.01059650656994934,0.010447661136037827,-0.04688999712561989,-0.06730292583744431,0.016754640387374113,-0.011607031355502319,0.023310211609113313,0.08731236136631013,0.05903231309516144,0.04731763803346557,-0.02573253768891525,-0.06296218933005523,0.04012439522837066,0.025853857002137298,0.007843758596900636,0.046765933136711124,-0.0018710897452026364,-0.005570995783544921,0.0005954957864215851,0.029306860778232576,0.03074633266388397,0.02318916068950821,-0.011157762649505614,-0.013694216304312515,0.015094815793841173,-0.008802384161989595,0.032486344160458376,0.05804673958212662,-0.006112833595197296,0.006215988022933197,0.04096582699106979,-0.03384389014125061,-0.01596561475662651,-0.010684742677253074,0.07758476984541932,-0.005856569876429291,0.024524756417617796,-0.007312638971189117,-0.017082938609609223,0.0011795664558563231,0.0134139216274601,-0.09028529851032258,-0.039419858379217534,0.022968888672964094,0.004521465961741944,-0.06451345260910797,-0.04178954661956787,-0.024166587057536396,0.012531514465320588,0.02323170220531845,0.04000117979464722,0.03214717679358063,0.056948825253341676,0.05539476134574128,0.013257249967432405,-0.0001733097061775205,-0.01234630922813568,0.0645579352090454,0.029838023576596068,-0.06455350567951279,-0.013353814450276946,0.0018903859134303275,0.0483956355803524,-0.004311148732519531,-0.014597871326852417,-0.006853384533165969,0.04057120248826332,0.007104495398272705,-0.027431613068233492,-0.09228961372112274,-0.06612821609320907,0.0607875549739154,-0.026342729023012542,0.06454961398086471,0.004993419094538574,-0.031680751000938416,0.007030828889411162,-0.010022039687029268,-0.05428986021428299,0.017565788880432403,0.04025441392524147,0.009023673541622163,0.009042981797892759,0.019972970522025298,0.058956133531005865,-0.008320068883990478,0.02986469039841843,-0.053139615835475926,-0.024647880182499998,0.007398424838289642,0.09050773480216218,-0.015264475845877838,-0.06385353173209762,0.016500261584825135,0.02948610469222336,-0.02504260549529915,-0.018835162326039122,0.050848700451684575,-0.03199441179409637,-0.019780421813622284,-0.027626615849293518,-0.03419102001171112,-0.014344497819357758,0.07330804638220215,-0.02937739203966522,-0.00813064343063736,-0.01626787766690979,-0.011862281442715148,0.01708495452203865,-0.07908452169694902,0.023940025203119657,-0.13222904368403626,0.048117978374713134,-0.017696039928765107,0.004759198936071777,0.01974903359319687,0.010760925580199815,-0.005599215416766357,0.0457550643199234,-0.01929695170711136,-0.007629453917987061,-0.010118543879554747,0.015504727550686645,0.03245994598398285,0.05049195915774918,-0.06673184178328552,-0.01761782965561676,0.008011984665633392,0.023189021348875426,0.06720727829968262,0.010742643820915984,-0.03080342023261017,-0.050128828091691585,0.04935064662135315,0.012293871085033494,0.05639020959568253,-0.02957390940026932,-0.03676535286145477,-0.004796114565882111,0.05806600428461456,0.018004375270679475,-0.020827009949742126,-0.0336628292589238,-0.0018759192028083797,-0.06518067211773682,-0.02731396445179306,-0.03430377823384857,0.016512887052202073,0.061277289867412564,-0.019134398406000827,0.05822277240970993,0.044241398569797516,-0.005043084829421997,-0.04018607674626312,0.06927013858769607,-0.004344519528141023,0.012868128092136383,-0.08525498011501847,0.03454513801989975,-0.024010073233037568,0.02195751011467056,-0.006334513400955963,0.06579357440817261,-0.009711559918811036,-0.013345796425511931,0.014702989589321902,0.025344240384365696,0.021528159041582107,0.062108358473124695,-0.05624000855096435,0.05573243638398361,0.006079895555899353,-0.002001432319259644,-0.002443507762801743,-0.010721616536909867,-0.04295436979775849,0.08180931740979766,-0.014715828856610106,-0.03683209432014542,-0.012104101579055901,0.013437134275827486,0.06964065576705855,0.06482510509484864,-0.03570993432865906,-0.05314338450149346,-0.11395284172808075,0.01426200422902832,0.012089334595506287,-0.058501489031186675,0.060430661880981444,0.0500264671381279,0.056157483018959044,-0.05001220665976715,0.07527209592948914,0.031277665487422945,-0.02043782967053299,-0.08342602471109009,-0.0008383195362091063,0.045666852330976865,-0.05341016683117676,-0.0003998352299102786,-0.03577085955021919,-0.038460902215493774,-0.01896648460201416,0.012595410857717131,-0.0060184891112971504,0.019921306564183502,-0.060824947492757256,-0.08852370824755859,0.003392263133862915,0.0036400299628715506,0.03255903972799225,-0.008351102953604507,0.01567778415994263,-0.00023129789984893678,-0.023584983993255156,0.06815277690185165,0.032341226983652875,0.0026074800379161833,-0.0395687710902481,-0.003838149411266327,0.04100280903240967,-0.019130064566046143,-0.07410366493117905,-0.07626375565908813,-0.014898051247527312,-0.02028174410337219,-0.0413983021689148,0.05420100971967316,0.02752598950049637,-0.024227222049773407,0.01466367372080475,0.013159825923877717,0.03946128732824249,0.02427177671503067,0.03591388100347939,-0.003222521540391235,0.0183274046263958,-0.03000545738402557,-0.04066711644104462,0.017155749921449585,-0.06134375247813416,-0.036362408407546995,-0.019471377535612868,0.034648935124684144,0.01776573165824356,-0.005382945029614257,-0.034531315796222685,-0.004955845186902466,-0.023998231859699858,0.03130629873801392,-0.012495260702575683,-0.031263154234012984,-0.063910194205719,0.01745994660978073,0.038960702542871095,0.04021203330704117,0.023016385340854643,-0.0403753269719162,-0.018214478771432493,0.009230925650691108,0.031802766191501616,-0.0060094809595568855,-0.05665428473038101,-0.0026934481642271802,-0.01278887994417572,0.013757778161637,-0.06991252187433472,0.025432326767399597,-0.05928275511783676,-0.0071204498857164004,0.009102611771803285,-0.048021745720825196,-0.04234071017774048,0.0378105065918541,-0.0030949641070522308,-0.0802945368397522,-0.029345935146197513,-0.055173430818717964,0.035613126717409516,-0.07929294203311157,0.011167600883222962,-0.010140670248493196,0.018876611506684494,0.038331590555036925,-0.021097202962330627,-0.02206313974373703,-0.0409461827742096,0.07130217153391571,0.06408282878469848,0.005774317041436768,-0.07263691064697265]"),
SubjectUID: SubjectFixtures.Get("known_face").SubjectUID,
FaceSrc: SrcAuto,
Radius: 0.8,
Samples: 5,
Collisions: 1,
CreatedAt: Timestamp(),
UpdatedAt: Timestamp(),
},
"unknown": Face{
ID: "IW2P73ISBCUFPIAWSIOZKRDCHHFHC35S",
EmbeddingJSON: []byte("[-0.01391313475,-0.031814132,0.017377053075,-0.01851261325,0.021255451499999998,-0.051055306,0.0366150855,0.007998470175,0.0695672645,-0.1067636275,0.0307072165,0.02941578425,0.054768010500000006,0.041151049,-0.06493903375,0.0015896528499999996,-0.05437162425,0.011924136,-0.025054364,0.0009921848250000003,0.012807875,-0.01319641825,-0.00488935855,-0.07366566999999999,-0.0611034065,-0.06666547924999999,-0.04888238425,-0.035091203,-0.01854779615,-0.024557007999999998,0.0030882324,-0.055875238499999993,-0.0246700375,-0.02172630285,-0.025565405,0.058197003,0.0547107775,0.047857131,-0.04580487,-0.00021249714999999926,0.009770386499999999,0.044646309999999995,0.0018705221250000003,0.0371642205,0.018666550325,-0.0032051121500000002,0.0057689690000000005,0.06864431525,-0.04906746575,-0.07431345875,-0.0647896445,0.0120775261,-0.02890944,0.01879340475,0.024201165499999996,0.04355076025,-0.014099167999999999,0.026033113750000003,0.025052837749999998,-0.068487575,0.022659832499999998,-0.0027816580000000002,0.03500908899999999,0.012073708,0.006179701499999999,0.034802054,-0.01799351825,0.0457090165,0.0036213202500000002,-0.008580024424999999,-0.072938294,-0.016224131250000003,0.06459961750000001,-0.04963675325,0.08387918625,-0.13179572750000002,-0.011209804,0.011490459325,-0.04273579375,-0.0603162555,-0.03941750125,0.061718414,0.029566903,0.011713920749999999,-0.07820421,0.042141458,0.04053815075,-0.0431640475,-0.009912542250000001,0.0083520422,0.04968228825,0.061740414,-0.003251780325,-0.0009849047250000001,-0.07888640699999999,0.00013775579999999977,0.0545293975,0.0314430285,-0.025010752249999997,-0.0754261725,0.00026732155,-0.04167998875,-0.038423044,-0.012128476325,-0.042172063999999995,-0.03992470075,0.055492729500000004,0.005174035799999999,-0.0491557875,0.047224008,0.027870127375,0.11123915125,-0.0017566490000000008,0.06637293625,0.08444959,-0.038633152000000004,0.040549324,0.0181765085,-0.0103707255,-0.052444608749999996,-0.0721162075,0.0017395296250000006,0.03576854825,-0.0010544938500000002,-0.03536455575,0.026296009000000002,-0.011038092,0.009561795625000001,0.0061376165,0.016413343999999996,-0.0007041408250000004,0.008430746000000001,0.007772767000000001,0.035255850500000005,0.03609753,-0.004700959499999999,-0.0244996355,0.029143511,0.0019076424499999993,-0.02425797625,-0.02824462725,0.03748850525,0.004536174249999999,0.094921252,0.0402888305,-0.035919796500000004,0.0325914395,0.028936399249999998,0.0100435923175,0.051378176750000004,0.0466342265,-0.104555035,-0.058734387250000006,-0.053190730000000006,-0.004201957500000001,-0.0030598753299999996,-0.009583216875000002,-0.05078611825,-0.037133980925000004,0.0406709395,0.01118452775,-0.028617762,-0.006732865225,-0.03122189575,-0.054440001749999994,0.055957135,-0.054629830500000004,0.00548484575,0.0018623927500000005,-0.0054835023,0.04359883825,-0.04169836625,0.025491153,0.035283773500000004,0.020951236874999998,0.017083047,0.011288541499999999,0.029325848999999998,0.031001949125000004,0.04632318125,0.058114136999999996,-0.018353527600000002,0.0010329377499999999,-0.05167622725,0.0015087445249999999,0.0665028595,-0.017552406,0.0030785925075000006,0.067237884,-0.045436311,0.022067097,-0.068492519,-0.09581154575,0.02946200275,0.019267693750000002,-0.013623341,-0.0023418241499999996,0.057798097500000006,-0.02830513875,0.00967313775,-0.0156008155,-0.038696254,-0.046455728749999994,-0.020938623415,0.00489014375,0.0191956194,0.01110382618,0.020775547499999998,0.116135215,-0.040037983750000006,0.039333228250000005,0.011678268775,0.0650113585,0.0023590035,-0.05381264350000001,-0.008376887255000002,-0.05688126,0.01151456675,0.00003846570000000035,-0.01287236325,-0.06661450099999999,-0.03827642075,-0.045446761,-0.03154112575,0.028140978,0.070225409,-0.020004859,0.0193362475,-0.0034820117499999997,-0.074293175,-0.04876132,0.0074359382499999994,0.0066796961250000005,-0.011634815875,0.009048144557499999,0.0344562235,-0.01762691475,0.019571052749999998,0.026697968750000002,0.015484052000000002,0.03876590725,0.0037216567,0.04729691375,0.008930467375,-0.07800198875,-0.043134631,0.0424968855,-0.0057933688750000005,-0.075971065,-0.005398360425,0.01736323075,-0.03068225125,-0.0700152155,0.012127145199999998,0.052686005499999994,0.00609444565,-0.05195201175,-0.01496918725,0.032330921,-0.0251999175,-0.0317094965,0.0063436068250000005,-0.046775514000000004,0.024125194250000002,-0.025942028000000002,0.0683850275,0.048410787250000004,-0.020441745875,0.0014374775000000001,-0.007761475925,-0.003657494249999999,-0.01002698675,-0.0033783719824999996,-0.01613361275,0.054106417000000004,-0.0499455445,0.07898722825,-0.014621054499999998,0.08328554125,-0.02660218675,0.0029891759249999995,-0.010516797999999999,0.03557642825,-0.060217531,0.0171425431,0.03266155825,-0.0598199765,0.021716342,0.0851276085,0.06803951925,0.02062912125,-0.008283969975,-0.032307963655,0.0506742335,0.020532822,0.0360789155,-0.0006283978250000003,-0.02785933975,-0.0030728417500000002,-0.034540906499999996,-0.0300205485,0.1115321695,0.053453546000000005,0.0703359815,0.010377180074999999,0.036756731075,-0.00297751195,-0.077184735,0.0264304635,0.0481822745,0.073460445,0.06669125100000001,0.09291405250000001,0.05010346175,0.029880568250000003,-0.034649416,0.029474834999999998,0.031317542500000004,-0.02699742575,0.0557845065,-0.05035647375,-0.0022147215,0.0213037777,0.07004532675,0.0264894885,-0.04297427725,0.07081584375,-0.00481877925,0.0048342215,-0.02130823725,-0.025961382749999998,-0.06262777725,0.034384046749999994,-0.0190645906,-0.031134641674999998,-0.068910896,0.06261982975,-0.0260708335,0.09122910349999999,-0.03100116965,0.049027657,-0.01474484825,-0.03469707425,-0.006989758326499999,-0.056124094,0.009483469874999999,-0.04452728725,-0.011856436750000001,-0.02315196925,-0.0312197325,0.04668023435,-0.013576097,0.12342725624999999,0.009619299000000001,-0.03253524225,0.00691780145,-0.007575374,0.017970803,0.039913282575,0.01719394935,-0.034085923000000004,0.0160938888,0.047048848750000004,0.05772991225,0.03188324875,0.005430960675,-0.015838408499999998,-0.020243144275,0.017690586,-0.038486903249999996,-0.0037113453749999994,-0.05992632025,-0.0066788766,-0.009260173449999999,-0.043526957500000005,0.035566587250000004,0.0520154155,-0.03742566475,-0.012924420124999999,0.05485878925,0.017260086875,-0.00945986855,0.06038467375,0.028211044,0.01180591125,0.076735146,0.010415625750000001,-0.026288575499999998,0.03359009575,-0.029869059499999996,0.018123453499999997,-0.039763396500000006,0.013718122,0.015185622250000001,-0.021508391,0.0933689765,0.0861815165,0.01772232125,-0.03339793175,-0.018280382249999998,0.024922235325,-0.00670621405,-0.004941027,-0.0030330302750000006,0.049037655,0.0407625665,-0.098270484,-0.010615769,0.014149342125,0.0732888865,0.01031384975,0.0708132685,-0.0248589595,0.01914073765,0.023424223175,0.0017784540000000003,-0.0016458964999999989,0.034801676250000003,0.0007287893750000003,-0.00010908749999999942,-0.10601041950000001,0.035614491750000005,0.0023196674499999996,-0.07413317850000001,-0.03187354875,0.0022230885000000004,-0.022146297500000002,-0.0020944157250000002,-0.053558506000000006,0.005407627825000001,-0.00868874405,0.049080156750000006,-0.015095300350000002,0.050741894499999995,-0.0644765125,0.049679071875,0.011181570100000001,0.08374534125,0.047086234500000004,0.04629623975,0.07211018675,0.01747124065,0.03838733075,-0.02483115725,0.059315212,-0.007435562849999999,-0.033800771,-0.062262683750000006,0.018508591749999997,0.05456382,-0.032214809750000004,-0.0060910296,-0.0688426575,0.028439918925000002,-0.050798488,-0.032318176500000004,0.0070076956499999996,-0.0850821425,0.0116441195,-0.06209254825,0.0392326955,-0.038714852,0.042342809,-0.07345825249999999,-0.0783221335,-0.00245315065,0.0052674726500000005,0.06709293425,-0.033900455,0.059125045,-0.0089869296,0.03726652275,0.036819674749999996,-0.066015052,0.0090962235,-0.0532330595,-0.0423983279,0.054948274,-0.0021313933875,-0.036738087749999995,-0.061552870499999995,0.01083386435,-0.000004987750000000173,0.03250943875,-0.00265433175,0.023262875250000002,0.04094322,-0.0458693885,0.004981979125000001,-0.01146187345,-0.017557853249999998,-0.02698673775,-0.02743749775,0.015717598925,0.00637069715,0.0225431645,-0.024064882425,0.07339412125,0.031813663,0.04107066175,-0.0605346105,0.005952673775,-0.06258660275,-0.0320774,-0.049892332,0.024880522500000002,0.0639617125,-0.0702298615,0.017941317249999998,-0.005220711350000001,0.014933126924999998,0.0115449712]"),
SubjectUID: "",
FaceSrc: SrcAuto,
Radius: 0.0,
Samples: 1,
Collisions: 0,
CreatedAt: Timestamp(),
UpdatedAt: Timestamp(),
},
}
// CreateFaceFixtures inserts known entities into the database for testing.
func CreateFaceFixtures() {
for _, entity := range FaceFixtures {
Db().Create(&entity)
}
}