-
Notifications
You must be signed in to change notification settings - Fork 2
/
train.py
129 lines (95 loc) · 57.3 KB
/
train.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import cv2
from imutils import face_utils
import numpy as np
import argparse
import imutils
import dlib
import math
from PIL import Image
from subprocess import call
import os
import array
import simplejson
import face_recognition
import tensorflow as tf
from tensorflow import keras
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
#Importing Haar cascade and DLIB's facial landmarks detector
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
# Start video capture (webcam)
video = cv2.VideoCapture(0)
#Set name of new user
currentUser = raw_input("Enter name of current user : ")
masterValues = []
while(True) :
ret, frame = video.read()
cv2.imshow('Original video feed', frame)
#Convert the frame to grayscale
grayFrame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
#Activating Haar cascade classifier to detect faces
faces = face_cascade.detectMultiScale(grayFrame, scaleFactor = 1.5, minNeighbors = 5)
for(x, y, w, h) in faces :
#Cropping and resizing face area
pillowImage = Image.fromarray(frame[y:y+h, x:x+w])
#Resizing dimensions
resizedHeight = 300
resizedWidth = 300
faceCropped = np.array(pillowImage.resize((resizedHeight, resizedWidth), Image.ANTIALIAS))
tempEcodings = face_recognition.face_encodings(faceCropped)
masterValues.append(np.array(tempEcodings[0]).tolist())
ratiosToProcess = []
temp = [[-0.16058756411075592, 0.0636807307600975, 0.0376606360077858, -0.03935481980443001, -0.010114511474967003, -0.11132754385471344, 0.05779705569148064, -0.060473907738924026, 0.11178746819496155, -0.05231789872050285, 0.10880276560783386, -0.012334633618593216, -0.22565817832946777, -0.07567988336086273, 0.03127690404653549, 0.11884500831365585, -0.12214721739292145, -0.22875449061393738, -0.06762215495109558, -0.11021792143583298, 0.0243105199187994, 0.030992601066827774, -0.08911500871181488, 0.0506906658411026, -0.09754867851734161, -0.25768935680389404, -0.052521687000989914, -0.07753703743219376, 0.0048594726249575615, -0.05942101776599884, -0.04012541100382805, 0.10334717482328415, -0.15507593750953674, -0.05693257972598076, 0.06525803357362747, 0.15494456887245178, -0.017113853245973587, -0.03649125620722771, 0.1909250020980835, 0.04157409444451332, -0.16166916489601135, -0.06808726489543915, 0.07826981693506241, 0.3523993492126465, 0.1654338240623474, -0.008505256846547127, 0.009582027792930603, 0.026448260992765427, 0.11864621192216873, -0.24726229906082153, 0.06718979775905609, 0.12874619662761688, 0.15176904201507568, 0.11779879033565521, 0.04883664473891258, -0.19602641463279724, 0.07938124239444733, 0.04897548630833626, -0.21567659080028534, 0.10181659460067749, 0.06803721934556961, -0.23187682032585144, -0.04692285507917404, 0.004488328006118536, 0.2135220468044281, 0.06736606359481812, -0.08278419077396393, -0.13015249371528625, 0.17734359204769135, -0.16498512029647827, -0.0836932510137558, 0.047273389995098114, -0.08698692917823792, -0.11517869681119919, -0.27065223455429077, 0.05132128298282623, 0.338249534368515, 0.11551252752542496, -0.16776596009731293, 0.07379783689975739, -0.04255974292755127, -0.025235293433070183, 0.10325067490339279, 0.0711914524435997, -0.09800561517477036, 0.05750729888677597, -0.16285312175750732, 0.01941496878862381, 0.24762192368507385, 0.045452482998371124, -0.0912117138504982, 0.1106196716427803, -0.005636980757117271, -0.001470879651606083, 0.09338302165269852, 0.04653451219201088, -0.033738985657691956, -0.04062246158719063, -0.12046588957309723, -0.034643616527318954, 0.08042170107364655, -0.192594975233078, -0.052051618695259094, 0.10720360279083252, -0.18942303955554962, 0.1499396413564682, 0.009822689928114414, 0.015804823487997055, -0.10430128872394562, -0.021103236824274063, -0.10010777413845062, 0.03169170022010803, 0.11335677653551102, -0.21574226021766663, 0.22633780539035797, 0.1959267258644104, 0.01912039890885353, 0.1367107480764389, 0.018465371802449226, -0.0017221048474311829, -0.008018583059310913, -0.0774337649345398, -0.13961786031723022, -0.11854754388332367, 0.06167518347501755, 0.0445391945540905, 0.10704100131988525, 0.09399937838315964], [-0.12046408653259277, 0.07569843530654907, 0.050590258091688156, -0.07579321414232254, -0.045465558767318726, -0.07860085368156433, 0.058851007372140884, -0.06248028576374054, 0.106553815305233, -0.054276466369628906, 0.13690342009067535, -0.05284229665994644, -0.25608429312705994, -0.03497099131345749, 0.040133003145456314, 0.13121488690376282, -0.11824581027030945, -0.21645167469978333, -0.06606166809797287, -0.10942760109901428, 0.026845784857869148, 0.024436546489596367, -0.09434223920106888, 0.06437499821186066, -0.11573536694049835, -0.2708664536476135, -0.07306597381830215, -0.08194007724523544, -0.02896323800086975, -0.07360959053039551, -0.04596545919775963, 0.12666694819927216, -0.1482868492603302, -0.05322358012199402, 0.05124839022755623, 0.12918107211589813, -0.00941445305943489, -0.0654948353767395, 0.15637199580669403, 0.04265888035297394, -0.1436046063899994, -0.06893369555473328, 0.09573428332805634, 0.3230438232421875, 0.14563632011413574, -0.007630591280758381, 0.03522150218486786, 0.03869270533323288, 0.08473610877990723, -0.21599234640598297, 0.0722014456987381, 0.10429375618696213, 0.1424555629491806, 0.12930446863174438, 0.030092816799879074, -0.20036651194095612, 0.06434313207864761, 0.062268663197755814, -0.21068210899829865, 0.11751458793878555, 0.09127523750066757, -0.23224970698356628, -0.06453520804643631, -0.026975354179739952, 0.23440690338611603, 0.09475556761026382, -0.08884439617395401, -0.13268713653087616, 0.18333770334720612, -0.14261795580387115, -0.10957488417625427, 0.011887066066265106, -0.13273915648460388, -0.09801727533340454, -0.2643449902534485, 0.05985860526561737, 0.3200593888759613, 0.10747790336608887, -0.1899142861366272, 0.044126369059085846, -0.029262447729706764, 0.0050050038844347, 0.09414400160312653, 0.08336438983678818, -0.0669286847114563, 0.042499031871557236, -0.14795583486557007, 0.027212277054786682, 0.24119289219379425, 0.02709529548883438, -0.09192658215761185, 0.13142129778862, -0.021718624979257584, -0.0054259393364191055, 0.09345964342355728, 0.04856133088469505, -0.03370584547519684, -0.04168497025966644, -0.11497235298156738, -0.008648402988910675, 0.05154150724411011, -0.19076551496982574, -0.0832974761724472, 0.11470342427492142, -0.1680855005979538, 0.1368314027786255, 0.0035311724059283733, 0.016512824222445488, -0.11439118534326553, -0.007115036249160767, -0.10245423763990402, 0.0033887180034071207, 0.12929239869117737, -0.21527230739593506, 0.19176162779331207, 0.19960330426692963, 0.017212308943271637, 0.1237931177020073, 0.006553234998136759, 0.034733232110738754, 0.005845557898283005, -0.07017242908477783, -0.16218315064907074, -0.11058448255062103, 0.08505218476057053, 0.03940201550722122, 0.079583540558815, 0.09782031923532486], [-0.1475421041250229, 0.05950998142361641, 0.04965712130069733, -0.06629028916358948, -0.04740948602557182, -0.06786379218101501, 0.06669281423091888, -0.05039528012275696, 0.0919494554400444, -0.053083427250385284, 0.11931020021438599, -0.040636107325553894, -0.262459397315979, -0.04243757203221321, 0.042262375354766846, 0.12385665625333786, -0.12544405460357666, -0.23096397519111633, -0.0833180844783783, -0.14017866551876068, 0.021807122975587845, 0.040456026792526245, -0.08945015072822571, 0.06785031408071518, -0.11259470134973526, -0.2539052963256836, -0.04239777848124504, -0.08591881394386292, 0.010035509243607521, -0.08168294280767441, -0.05060352012515068, 0.10262973606586456, -0.15256737172603607, -0.043311960995197296, 0.04711556434631348, 0.11546146124601364, -0.028271982446312904, -0.07721788436174393, 0.1691916435956955, 0.05326102674007416, -0.16415132582187653, -0.05612674355506897, 0.08357390761375427, 0.3429083824157715, 0.17343613505363464, -0.01180371455848217, 0.03718951344490051, 0.02691357210278511, 0.11046381294727325, -0.23221765458583832, 0.04547455161809921, 0.1312638819217682, 0.13064904510974884, 0.12232048809528351, 0.010302687995135784, -0.19815947115421295, 0.06193281710147858, 0.058517228811979294, -0.2090752273797989, 0.12696729600429535, 0.09267175942659378, -0.23958735167980194, -0.051011357456445694, -0.017439067363739014, 0.21311920881271362, 0.07922179996967316, -0.09107719361782074, -0.155939519405365, 0.16478708386421204, -0.17516344785690308, -0.11318331956863403, 0.05321946740150452, -0.12182236462831497, -0.09859548509120941, -0.2512771189212799, 0.04937191680073738, 0.33397573232650757, 0.10476039350032806, -0.15976639091968536, 0.051255397498607635, -0.03184382617473602, 0.005471127573400736, 0.1079225167632103, 0.1162102222442627, -0.08583489060401917, 0.04346155747771263, -0.14640869200229645, 0.027093298733234406, 0.2531896233558655, 0.03429608792066574, -0.09899937361478806, 0.1264575719833374, 0.00664135068655014, -0.016555583104491234, 0.10083075612783432, 0.07125965505838394, -0.04677143692970276, -0.04343250021338463, -0.0950026884675026, -0.024144187569618225, 0.04812188446521759, -0.18854716420173645, -0.050546206533908844, 0.0982251688838005, -0.15843529999256134, 0.1698393076658249, -0.013092582114040852, 0.03224742040038109, -0.11650799214839935, -0.032975826412439346, -0.06592023372650146, 0.031225476413965225, 0.10812892019748688, -0.21577881276607513, 0.18920186161994934, 0.2145397812128067, 0.037720441818237305, 0.1212368905544281, 0.010755590163171291, 0.015716614201664925, -0.0065152812749147415, -0.051761481910943985, -0.15046341717243195, -0.11246804893016815, 0.06667158007621765, 0.038626667112112045, 0.10204924643039703, 0.08144401013851166], [-0.13299690186977386, 0.06945871561765671, 0.06660611927509308, -0.04276531934738159, -0.04381458833813667, -0.0732308179140091, 0.05599222704768181, -0.06192062050104141, 0.08185970783233643, -0.04396764561533928, 0.11672331392765045, -0.017116595059633255, -0.2609136998653412, -0.06024987995624542, 0.0626707375049591, 0.11825390160083771, -0.08920733630657196, -0.22746531665325165, -0.08410844206809998, -0.1135781854391098, 0.0016999330837279558, 0.038689952343702316, -0.08218181133270264, 0.04685716703534126, -0.11475533246994019, -0.2537398934364319, -0.07154887169599533, -0.08359658718109131, -0.0029202699661254883, -0.053799618035554886, -0.0426722876727581, 0.1196199581027031, -0.1518319547176361, -0.049407124519348145, 0.05863766372203827, 0.1427750438451767, -0.02062099426984787, -0.05125677213072777, 0.14497080445289612, 0.03017798811197281, -0.15374112129211426, -0.0781860277056694, 0.08485699445009232, 0.32068386673927307, 0.16377045214176178, -0.014651182107627392, 0.05345863103866577, 0.04108890891075134, 0.08464504778385162, -0.22392906248569489, 0.07837367802858353, 0.10749936103820801, 0.15137110650539398, 0.135562002658844, 0.04486851394176483, -0.22258540987968445, 0.061957187950611115, 0.07149017602205276, -0.20341749489307404, 0.13837096095085144, 0.05859268084168434, -0.23296618461608887, -0.0537763349711895, -0.01793874055147171, 0.22143304347991943, 0.08759690821170807, -0.085111603140831, -0.16096821427345276, 0.18753038346767426, -0.16985543072223663, -0.10526200383901596, 0.054206013679504395, -0.1289944350719452, -0.08797290921211243, -0.29332098364830017, 0.046305589377880096, 0.31616178154945374, 0.10876677930355072, -0.17860057950019836, 0.05011996626853943, -0.026728404685854912, -0.0035959994420409203, 0.05596007779240608, 0.09270406514406204, -0.0893620029091835, 0.05950302630662918, -0.15558570623397827, 0.020221393555402756, 0.24963337182998657, 0.03189521282911301, -0.08968386054039001, 0.133307546377182, -0.019872214645147324, -0.009645850397646427, 0.09334486722946167, 0.056388530880212784, -0.032745927572250366, -0.06670873612165451, -0.10120611637830734, -0.04138083755970001, 0.05927262455224991, -0.21068017184734344, -0.05938451737165451, 0.1186881810426712, -0.1694469451904297, 0.15773646533489227, -0.016574092209339142, 0.04498561471700668, -0.11659755557775497, -0.020124921575188637, -0.08690356463193893, 0.03016914613544941, 0.14586296677589417, -0.20895197987556458, 0.2087920606136322, 0.20362675189971924, 0.011456763371825218, 0.1096658855676651, 0.013040602207183838, 0.03080689162015915, -0.01630478724837303, -0.0695410817861557, -0.14890067279338837, -0.11150544881820679, 0.0609334260225296, 0.013814521953463554, 0.08126034587621689, 0.11416693776845932], [-0.15362903475761414, 0.09002649039030075, 0.037400856614112854, -0.05012188479304314, -0.019869185984134674, -0.08285094797611237, 0.06286749243736267, -0.07769197970628738, 0.11395786702632904, -0.057612478733062744, 0.12277189642190933, -0.017021283507347107, -0.22849838435649872, -0.07719473540782928, 0.028576545417308807, 0.12318442016839981, -0.13421964645385742, -0.21506524085998535, -0.07236570119857788, -0.11425057053565979, 0.038256704807281494, 0.036172978579998016, -0.07161315530538559, 0.0331520214676857, -0.13035525381565094, -0.2523796856403351, -0.053656287491321564, -0.0860857293009758, -0.012524516321718693, -0.0582490935921669, -0.03179509937763214, 0.11097351461648941, -0.16169682145118713, -0.06139849126338959, 0.04539503902196884, 0.14716428518295288, -0.0013751848600804806, -0.025001022964715958, 0.14920879900455475, 0.050667278468608856, -0.1621169000864029, -0.0637516975402832, 0.09002333134412766, 0.36088043451309204, 0.18021149933338165, -0.01411073561757803, -0.0060021113604307175, 0.04203087463974953, 0.08579713851213455, -0.23930655419826508, 0.06923814862966537, 0.09460287541151047, 0.14874927699565887, 0.11684852838516235, 0.04276704788208008, -0.18502487242221832, 0.06560969352722168, 0.05971700698137283, -0.21158988773822784, 0.09989331662654877, 0.07182306051254272, -0.23121581971645355, -0.0497637614607811, 0.002026110887527466, 0.24473139643669128, 0.10462082922458649, -0.08870389312505722, -0.10530369728803635, 0.1936948448419571, -0.14555047452449799, -0.10121042281389236, 0.010351824574172497, -0.10775303095579147, -0.09257549792528152, -0.2852262854576111, 0.045689843595027924, 0.34619462490081787, 0.10531912744045258, -0.19606353342533112, 0.042775675654411316, -0.040137879550457, 0.009468091651797295, 0.10782943665981293, 0.09336765110492706, -0.09039260447025299, 0.05744396150112152, -0.14044374227523804, 0.01334518101066351, 0.2375975251197815, 0.038038723170757294, -0.11189942061901093, 0.13513794541358948, -0.007961908355355263, -0.02434275671839714, 0.11299792677164078, 0.030044041574001312, -0.030944332480430603, -0.06271152198314667, -0.14822593331336975, -0.05123346298933029, 0.052270613610744476, -0.2076018899679184, -0.06850843131542206, 0.13756367564201355, -0.17945259809494019, 0.14398300647735596, 0.028690408915281296, 0.01470291055738926, -0.08802715688943863, -0.0034127971157431602, -0.07690078020095825, 0.006509126164019108, 0.11795638501644135, -0.19838257133960724, 0.21758036315441132, 0.20268701016902924, 0.012323194183409214, 0.1384298950433731, 0.015501603484153748, 0.023296386003494263, -0.006933147087693214, -0.043408602476119995, -0.13030403852462769, -0.11078225821256638, 0.06721694022417068, 0.0250669177621603, 0.10384761542081833, 0.0978623554110527]]
for x in temp:
ratiosToProcess.append(x)
temp = [[-0.17883968353271484, 0.09685202687978745, 0.1355264037847519, 0.03871630132198334, -0.010842392221093178, -0.061071690171957016, 0.12089972198009491, -0.1063336431980133, 0.07464174181222916, -0.0855834037065506, 0.20767970383167267, -0.0829855278134346, -0.20149552822113037, -0.1606522649526596, 0.12477170675992966, 0.11687660217285156, -0.14202359318733215, -0.21920867264270782, -0.11841166764497757, -0.2154742330312729, -0.008518240414559841, 0.017148135229945183, -0.055706411600112915, 0.0305109191685915, -0.1339557021856308, -0.22681666910648346, -0.07459728419780731, -0.16029506921768188, 0.09651943296194077, -0.06661660224199295, 0.019607948139309883, 0.033159349113702774, -0.2271769940853119, -0.01821187138557434, -0.0557732880115509, 0.04772236943244934, 0.0708337277173996, -0.02549140341579914, 0.10987995564937592, -0.04930029436945915, -0.12195754796266556, -0.08431088924407959, 0.0226850975304842, 0.23814445734024048, 0.13058245182037354, -0.06052793562412262, -0.05363190174102783, 0.07725740969181061, 0.041357237845659256, -0.22129875421524048, 0.05617881566286087, 0.11656972765922546, 0.1533696949481964, 0.10978681594133377, -0.007298467680811882, -0.14513202011585236, -0.04086624085903168, 0.01246914267539978, -0.15337210893630981, 0.05611168593168259, 0.03494987264275551, -0.15306305885314941, -0.11054125428199768, -0.043489597737789154, 0.18620119988918304, 0.10883289575576782, -0.05566750839352608, -0.15861773490905762, 0.17304575443267822, -0.1631094366312027, -0.04099646583199501, 0.08085598051548004, -0.12065430730581284, -0.04629595950245857, -0.2812815010547638, 0.12712660431861877, 0.35522252321243286, 0.0760456845164299, -0.18302635848522186, -0.005394667387008667, -0.17008595168590546, 0.04247783124446869, -0.015217546373605728, 0.02217961475253105, -0.0731467753648758, 0.0599106065928936, -0.12069153040647507, 0.079556904733181, 0.12489908188581467, -0.043190278112888336, -0.04614923149347305, 0.1910967081785202, -0.028604162856936455, 0.001606934703886509, 0.02050172910094261, -0.03184674307703972, 0.029921384528279305, -0.07131051272153854, -0.046320606023073196, -0.02233225107192993, 0.0681295171380043, -0.09962833672761917, -0.028960801661014557, 0.09537843614816666, -0.1585794985294342, 0.13327482342720032, 0.04072371870279312, 0.015788136050105095, -0.03746465593576431, 0.055353712290525436, -0.05786050483584404, -0.05317634716629982, 0.13939332962036133, -0.19668805599212646, 0.15656425058841705, 0.2021840512752533, -0.05133131146430969, 0.12191268056631088, -0.020909404382109642, 0.10788469016551971, -0.05811002478003502, -0.04989095777273178, -0.11023180186748505, -0.05047847330570221, 0.08431155979633331, -0.011762590147554874, -0.05256260558962822, 0.08228937536478043], [-0.17362040281295776, 0.10334017872810364, 0.14331640303134918, 0.04824948310852051, -0.004648368805646896, -0.06093806028366089, 0.11035914719104767, -0.10353288054466248, 0.06018410623073578, -0.07661343365907669, 0.20116032660007477, -0.08542311936616898, -0.2007059007883072, -0.1549598127603531, 0.12511149048805237, 0.10675956308841705, -0.1315738707780838, -0.2160925418138504, -0.1204507127404213, -0.20862612128257751, 0.004889390897005796, 0.024904360994696617, -0.06104832887649536, 0.020337319001555443, -0.13983136415481567, -0.23124466836452484, -0.07163914293050766, -0.16372069716453552, 0.09394221007823944, -0.07129663228988647, 0.03306008130311966, 0.039651863276958466, -0.21800991892814636, -0.012911411002278328, -0.05617274343967438, 0.05133334547281265, 0.07272414118051529, -0.022144563496112823, 0.10160297155380249, -0.0533335879445076, -0.13240115344524384, -0.08750023692846298, 0.022077741101384163, 0.2409566044807434, 0.1269095093011856, -0.05576103553175926, -0.04712846130132675, 0.07887829095125198, 0.01948128268122673, -0.21479928493499756, 0.049326732754707336, 0.11917873471975327, 0.1390538513660431, 0.11791162192821503, -0.00862107053399086, -0.1484968364238739, -0.03366468846797943, 0.009585162624716759, -0.1626136153936386, 0.05897408351302147, 0.035301968455314636, -0.16015447676181793, -0.10537677258253098, -0.03357422724366188, 0.19213412702083588, 0.10618201643228531, -0.054879408329725266, -0.16072110831737518, 0.1692391335964203, -0.16687677800655365, -0.04873422160744667, 0.0872207060456276, -0.12285163253545761, -0.04597978666424751, -0.28372618556022644, 0.12113803625106812, 0.3603432774543762, 0.07299960404634476, -0.18518534302711487, 0.0013493020087480545, -0.1711096465587616, 0.04370527341961861, -0.002593378070741892, 0.024600567296147346, -0.0666458010673523, 0.06158963218331337, -0.11628566682338715, 0.0783437192440033, 0.1284789741039276, -0.03921567648649216, -0.05481509864330292, 0.18225185573101044, -0.031482137739658356, -0.006664959713816643, 0.02282077446579933, -0.03379756957292557, 0.03310848027467728, -0.07147069275379181, -0.04599788039922714, -0.03387092798948288, 0.07087475806474686, -0.09703634679317474, -0.029204636812210083, 0.10208754986524582, -0.15460869669914246, 0.136112779378891, 0.047993868589401245, 0.01828339323401451, -0.02900622971355915, 0.058891259133815765, -0.059923868626356125, -0.05349491909146309, 0.150101900100708, -0.19957980513572693, 0.16174745559692383, 0.2069678008556366, -0.044690486043691635, 0.11759449541568756, -0.011629579588770866, 0.10902272909879684, -0.05628075450658798, -0.050190337002277374, -0.1186661571264267, -0.04573502019047737, 0.08508198708295822, -0.0079140430316329, -0.051212068647146225, 0.07816608995199203], [-0.1776663362979889, 0.0891975611448288, 0.1427963823080063, 0.04519350454211235, -0.008186006918549538, -0.056939784437417984, 0.11069182306528091, -0.1025584414601326, 0.06722218543291092, -0.08197634667158127, 0.19966138899326324, -0.08013549447059631, -0.2041071355342865, -0.16390635073184967, 0.13166682422161102, 0.11201724410057068, -0.13379359245300293, -0.2219691425561905, -0.1179371178150177, -0.20922616124153137, -0.01307724043726921, 0.02864561602473259, -0.0558941476047039, 0.02958773262798786, -0.13688769936561584, -0.24071118235588074, -0.06922280788421631, -0.1599729359149933, 0.08594774454832077, -0.06298856437206268, 0.014702166430652142, 0.04806956648826599, -0.22368672490119934, -0.014866424724459648, -0.05274944752454758, 0.05473121255636215, 0.06764615327119827, -0.02257319912314415, 0.1063457801938057, -0.05566706135869026, -0.12988469004631042, -0.09175453335046768, 0.027444273233413696, 0.24483925104141235, 0.1307857185602188, -0.05792988836765289, -0.046816810965538025, 0.0840783417224884, 0.028729794546961784, -0.2128191739320755, 0.05632207542657852, 0.12476493418216705, 0.14496898651123047, 0.10968780517578125, -0.010591610334813595, -0.15083524584770203, -0.04081878438591957, 0.006693700328469276, -0.15448911488056183, 0.0553702674806118, 0.03258964419364929, -0.15136827528476715, -0.11204896867275238, -0.03790292516350746, 0.19601041078567505, 0.11059241741895676, -0.05958191305398941, -0.16084767878055573, 0.1697520911693573, -0.17036676406860352, -0.043500352650880814, 0.0822860524058342, -0.133065864443779, -0.047555312514305115, -0.285798043012619, 0.1128327026963234, 0.3543397784233093, 0.06752383708953857, -0.18973448872566223, -0.0003538047894835472, -0.16596780717372894, 0.04452238976955414, -0.002787980018183589, 0.03387443348765373, -0.07016587257385254, 0.06985180079936981, -0.11765541136264801, 0.08120255917310715, 0.12756726145744324, -0.030744662508368492, -0.05537322536110878, 0.18517693877220154, -0.019354067742824554, -0.009869365021586418, 0.03168175742030144, -0.029385941103100777, 0.04323723539710045, -0.07945454865694046, -0.05540918931365013, -0.024631094187498093, 0.06717681884765625, -0.09557691216468811, -0.030735930427908897, 0.1009989008307457, -0.15399284660816193, 0.14130538702011108, 0.05166810750961304, 0.0271756574511528, -0.027086975052952766, 0.05876222625374794, -0.060215696692466736, -0.06286552548408508, 0.1416139304637909, -0.1989438831806183, 0.14702440798282623, 0.19692207872867584, -0.04717274010181427, 0.12337637692689896, -0.024687834084033966, 0.1153339073061943, -0.0640157163143158, -0.04848884046077728, -0.11764099448919296, -0.0478457473218441, 0.08395478129386902, -0.008208854123950005, -0.042668312788009644, 0.08609551936388016], [-0.1849982738494873, 0.09040351212024689, 0.14664524793624878, 0.048139434307813644, -0.018475670367479324, -0.06524576991796494, 0.11338340491056442, -0.0998423770070076, 0.07065091282129288, -0.08596208691596985, 0.20435741543769836, -0.0817871242761612, -0.20088441669940948, -0.1639888882637024, 0.12802785634994507, 0.11753244698047638, -0.13212627172470093, -0.21574023365974426, -0.11682289838790894, -0.21727199852466583, 0.0036620653700083494, 0.026630891487002373, -0.06576204299926758, 0.025554824620485306, -0.13626278936862946, -0.2245977520942688, -0.06624695658683777, -0.17045600712299347, 0.08661185950040817, -0.07755651324987411, 0.029398052021861076, 0.03917849063873291, -0.21386224031448364, -0.01568903960287571, -0.05647812411189079, 0.04972708225250244, 0.06968503445386887, -0.022466817870736122, 0.10375691205263138, -0.06598959863185883, -0.13266579806804657, -0.09340446442365646, 0.025640984997153282, 0.23909792304039001, 0.1233510971069336, -0.05616365000605583, -0.0545673668384552, 0.07363369315862656, 0.043061401695013046, -0.21897755563259125, 0.05261893570423126, 0.11615407466888428, 0.14965346455574036, 0.10877939313650131, -0.0016010897234082222, -0.15008625388145447, -0.03490389883518219, 0.0033769048750400543, -0.16924326121807098, 0.062368325889110565, 0.033357955515384674, -0.15634594857692719, -0.1216774433851242, -0.04113563895225525, 0.1899464875459671, 0.11444845050573349, -0.06053595244884491, -0.16124506294727325, 0.17145010828971863, -0.17239683866500854, -0.052499331533908844, 0.0852704718708992, -0.12404432892799377, -0.051873717457056046, -0.28548943996429443, 0.10787907242774963, 0.357751727104187, 0.06659729778766632, -0.19761891663074493, -0.0015702992677688599, -0.16049879789352417, 0.043375931680202484, -0.002981805242598057, 0.03726958483457565, -0.06478971242904663, 0.0637747049331665, -0.1146821677684784, 0.07824583351612091, 0.12026800215244293, -0.04716061055660248, -0.04798344895243645, 0.19220823049545288, -0.020805472508072853, -0.005214513745158911, 0.01961507834494114, -0.03046255372464657, 0.03741868957877159, -0.07237159460783005, -0.043727099895477295, -0.030401211231946945, 0.08330219984054565, -0.09505439549684525, -0.026913544163107872, 0.09091111272573471, -0.15539400279521942, 0.14530469477176666, 0.04906097799539566, 0.03130623698234558, -0.03004852682352066, 0.05138002336025238, -0.061535224318504333, -0.049950242042541504, 0.14784668385982513, -0.19390839338302612, 0.1629936397075653, 0.19680306315422058, -0.053882207721471786, 0.12255166471004486, -0.021128425374627113, 0.11110201478004456, -0.05615099146962166, -0.05554013326764107, -0.11989878118038177, -0.04685219004750252, 0.08324657380580902, -0.016436312347650528, -0.052364904433488846, 0.08341184258460999], [-0.18385276198387146, 0.09650610387325287, 0.13660000264644623, 0.048549480736255646, -0.02077183872461319, -0.06522174179553986, 0.11301331222057343, -0.10037422925233841, 0.07309908419847488, -0.08592837303876877, 0.21176695823669434, -0.0800417959690094, -0.1949080377817154, -0.15974298119544983, 0.12095668911933899, 0.11313759535551071, -0.13243888318538666, -0.2134835571050644, -0.11107804626226425, -0.20810511708259583, 0.008527466095983982, 0.022404633462429047, -0.060219716280698776, 0.022601604461669922, -0.14099429547786713, -0.22445102035999298, -0.0706510916352272, -0.16421133279800415, 0.09279040992259979, -0.07993180304765701, 0.030063223093748093, 0.04243665561079979, -0.2091933786869049, -0.012478353455662727, -0.0616125650703907, 0.050836190581321716, 0.06210685521364212, -0.011211028322577477, 0.10976910591125488, -0.04573498293757439, -0.13713574409484863, -0.08210165053606033, 0.014948632568120956, 0.25131967663764954, 0.13635854423046112, -0.05457782745361328, -0.06061980128288269, 0.07708965986967087, 0.037713054567575455, -0.22417575120925903, 0.05143469572067261, 0.1190115362405777, 0.15274237096309662, 0.1126779243350029, -0.005743027664721012, -0.139665886759758, -0.04325275868177414, 0.003076145425438881, -0.1560525894165039, 0.05405450612306595, 0.03639836981892586, -0.16196763515472412, -0.1132444366812706, -0.04857391119003296, 0.19688156247138977, 0.1100781038403511, -0.061718687415122986, -0.14247038960456848, 0.17244039475917816, -0.16385923326015472, -0.05660492926836014, 0.08276141434907913, -0.11966744065284729, -0.0466277077794075, -0.27865034341812134, 0.11513780802488327, 0.34492337703704834, 0.07150552421808243, -0.19233104586601257, -0.004310267046093941, -0.16730304062366486, 0.05253211781382561, -0.0141083849593997, 0.027677981182932854, -0.07024908065795898, 0.06385370343923569, -0.11520839482545853, 0.06708452105522156, 0.11772993206977844, -0.05205128341913223, -0.042471785098314285, 0.19902507960796356, -0.02248583361506462, 0.004931132309138775, 0.02643774263560772, -0.03537145256996155, 0.03318668156862259, -0.08194558322429657, -0.04714210331439972, -0.04078172147274017, 0.07767187803983688, -0.10496389865875244, -0.02327725477516651, 0.09238679707050323, -0.16035744547843933, 0.15086960792541504, 0.04796573519706726, 0.034521546214818954, -0.02332954853773117, 0.05606609582901001, -0.05315661057829857, -0.04937436431646347, 0.1459239274263382, -0.19224070012569427, 0.16506975889205933, 0.19487369060516357, -0.05133920907974243, 0.12245791405439377, -0.008496797643601894, 0.10909375548362732, -0.07281265407800674, -0.05169253796339035, -0.11024392396211624, -0.04422008991241455, 0.08326131105422974, -0.012178943492472172, -0.052592914551496506, 0.08273817598819733]]
for x in temp:
ratiosToProcess.append(x)
temp = [[-0.06618092209100723, 0.09452034533023834, 0.03516053035855293, -0.055747054517269135, -0.03499554842710495, 0.022922640666365623, -0.021955087780952454, -0.10324463993310928, 0.18048252165317535, -0.08181431889533997, 0.2252836674451828, 0.07486680150032043, -0.19734302163124084, -0.13183683156967163, 0.07437098026275635, 0.10089698433876038, -0.16166506707668304, -0.05974496901035309, -0.09826689958572388, -0.10107212513685226, 0.022351454943418503, -0.015389563515782356, 0.07957669347524643, -0.01606976054608822, -0.10556185245513916, -0.3427068293094635, -0.07055359333753586, -0.13632456958293915, 0.04724348336458206, -0.0700891837477684, -0.04308079555630684, 0.002305101603269577, -0.19682183861732483, -0.10707138478755951, 0.01641210913658142, -0.013967668637633324, -0.08063293248414993, -0.043253470212221146, 0.25189653038978577, -0.004329829476773739, -0.10840817540884018, 0.08448316156864166, 0.007765183225274086, 0.18878008425235748, 0.2755110561847687, 0.038965579122304916, 0.014802615158259869, -0.08026032149791718, 0.15102115273475647, -0.24863731861114502, 0.0783199742436409, 0.14960730075836182, 0.1087896004319191, 0.05878612399101257, 0.052086908370256424, -0.14699824154376984, 0.005109930410981178, 0.08112838864326477, -0.16780929267406464, 0.020008917897939682, 0.04440971836447716, -0.11945667117834091, -0.08120477199554443, 0.019624099135398865, 0.19726884365081787, 0.12924379110336304, -0.086909219622612, -0.10464310646057129, 0.16554145514965057, -0.0643167793750763, 0.004569535609334707, 0.0068847863003611565, -0.17828388512134552, -0.16820359230041504, -0.2400127649307251, 0.07928739488124847, 0.32945677638053894, 0.15369991958141327, -0.2009376436471939, -0.015533220954239368, -0.19775612652301788, 0.05945916101336479, 0.061730414628982544, 0.008426276035606861, -0.055748239159584045, -0.14739665389060974, -0.03292812034487724, 0.03074158914387226, 0.1366569995880127, -0.02879076823592186, -0.06234872713685036, 0.2247270941734314, 0.02963823638856411, 0.053789425641298294, 0.014361999928951263, 0.014001259580254555, -0.09018175303936005, -0.04232901334762573, -0.15862533450126648, -0.03705289214849472, 0.046790312975645065, -0.05637121945619583, 0.05496210604906082, 0.169339120388031, -0.25910770893096924, 0.14422844350337982, -0.011556874960660934, -0.013566982932388783, 0.06941746175289154, -0.013134797103703022, -0.04619351029396057, -0.02530762553215027, 0.09579379856586456, -0.22578273713588715, 0.2635821998119354, 0.21174660325050354, 0.012890947982668877, 0.15877564251422882, 0.05157633125782013, 0.041838064789772034, -0.019782546907663345, -0.012470994144678116, -0.19471696019172668, -0.05912964791059494, 0.03802014887332916, 0.0773821622133255, 0.03196116164326668, 0.030086249113082886], [-0.07243254035711288, 0.07979921996593475, 0.03343481943011284, -0.06084685027599335, -0.029439078643918037, 0.01969626545906067, -0.006775829941034317, -0.09741471707820892, 0.19042417407035828, -0.09327798336744308, 0.21568554639816284, 0.07195427268743515, -0.21662087738513947, -0.13178420066833496, 0.0886325091123581, 0.10623670369386673, -0.15981604158878326, -0.05003897845745087, -0.11260867118835449, -0.12083195894956589, 0.008794194087386131, -0.026017386466264725, 0.09429708868265152, -0.02577054314315319, -0.10546258836984634, -0.3462051451206207, -0.06821136921644211, -0.13071049749851227, 0.030427677556872368, -0.057442788034677505, -0.04192512854933739, 0.0034197503700852394, -0.20114092528820038, -0.11603318154811859, -0.004987888503819704, -0.018803784623742104, -0.06474703550338745, -0.03007158264517784, 0.24702778458595276, 0.0025882460176944733, -0.11158709228038788, 0.068882055580616, 0.010195611044764519, 0.18802103400230408, 0.27557602524757385, 0.03402087837457657, 0.0076890625059604645, -0.06414933502674103, 0.1294562965631485, -0.2451399266719818, 0.08411586284637451, 0.13408933579921722, 0.1101989671587944, 0.040764324367046356, 0.05778473615646362, -0.14598479866981506, -0.005235569551587105, 0.08267045021057129, -0.15443271398544312, 0.018168019130825996, 0.043438464403152466, -0.10680998861789703, -0.08652502298355103, 0.022958284243941307, 0.19857867062091827, 0.12734228372573853, -0.0824228972196579, -0.09616077691316605, 0.16879858076572418, -0.057746902108192444, 0.017868535593152046, -0.007988321594893932, -0.18588915467262268, -0.17595195770263672, -0.24483458697795868, 0.09318633377552032, 0.3275664150714874, 0.1536216139793396, -0.2026768922805786, -0.023384612053632736, -0.19497258961200714, 0.044164951890707016, 0.06772341579198837, 0.02099364623427391, -0.04916835576295853, -0.1329978108406067, -0.025791458785533905, 0.03994574770331383, 0.11654919385910034, -0.03403297811746597, -0.06486386060714722, 0.23379208147525787, 0.03166443109512329, 0.04217265546321869, 0.008358396589756012, 0.005305244121700525, -0.09423080831766129, -0.030155189335346222, -0.17801082134246826, -0.041789744049310684, 0.06251490861177444, -0.06365745514631271, 0.05965413525700569, 0.1654919981956482, -0.2556881010532379, 0.13064567744731903, -0.00650368444621563, -0.0243042204529047, 0.07287396490573883, 0.00046339735854417086, -0.04230482876300812, -0.049221258610486984, 0.09895175695419312, -0.20303551852703094, 0.2355843037366867, 0.23146069049835205, 0.004398566670715809, 0.16012254357337952, 0.050001565366983414, 0.05216081067919731, -0.00018311757594347, 0.014776353724300861, -0.19188465178012848, -0.041846103966236115, 0.03328167274594307, 0.0759240910410881, 0.03036014549434185, 0.04511850327253342], [-0.0700124129652977, 0.07589367032051086, 0.04863652214407921, -0.058329179883003235, -0.06225999817252159, 0.011232942342758179, -0.02428481914103031, -0.10316479206085205, 0.17121689021587372, -0.08290863037109375, 0.1932421326637268, 0.054958999156951904, -0.20745882391929626, -0.1222134381532669, 0.06557822227478027, 0.10690615326166153, -0.14708447456359863, -0.0650724545121193, -0.10127920657396317, -0.12807966768741608, 0.02424701489508152, -0.03477601706981659, 0.0998983159661293, -0.03238299861550331, -0.11132334172725677, -0.3394905924797058, -0.06516260653734207, -0.13489177823066711, 0.030988559126853943, -0.042878955602645874, -0.04582570865750313, 0.010796894319355488, -0.2053185999393463, -0.12222021073102951, 0.009837324731051922, -0.012247766368091106, -0.07568071037530899, -0.04214786738157272, 0.22886043787002563, -0.015107359737157822, -0.10486066341400146, 0.07136170566082001, 0.02196945622563362, 0.17009317874908447, 0.27580758929252625, 0.04826182872056961, 0.017527688294649124, -0.08437025547027588, 0.14185193181037903, -0.2461668699979782, 0.09234954416751862, 0.14606259763240814, 0.10505358874797821, 0.055433325469493866, 0.05944859981536865, -0.13396398723125458, 0.017019040882587433, 0.08248130977153778, -0.16550606489181519, 0.03497497737407684, 0.05718473717570305, -0.09481486678123474, -0.09188413619995117, -0.0030674701556563377, 0.2043759971857071, 0.14093276858329773, -0.08275330811738968, -0.09934262931346893, 0.17178291082382202, -0.053864337503910065, 0.00704195536673069, -0.003563155420124531, -0.19371995329856873, -0.16994522511959076, -0.23069661855697632, 0.07500973343849182, 0.3373330235481262, 0.1598295271396637, -0.19696208834648132, -0.030634399503469467, -0.1935383677482605, 0.059728220105171204, 0.061318036168813705, 0.012546653859317303, -0.04750680550932884, -0.14224109053611755, -0.019190000370144844, 0.038298022001981735, 0.12436278164386749, -0.051214225590229034, -0.07513770461082458, 0.2306945025920868, 0.03627884387969971, 0.050480917096138, 0.003989095333963633, 0.014150583185255527, -0.09892018139362335, -0.023854736238718033, -0.17815713584423065, -0.04849468171596527, 0.06053373962640762, -0.0561671145260334, 0.05966247618198395, 0.15211834013462067, -0.2324565201997757, 0.1273956298828125, -0.017397722229361534, -0.004599898587912321, 0.059357255697250366, -0.019332483410835266, -0.05189449340105057, -0.03571910411119461, 0.09775249660015106, -0.19683511555194855, 0.2569682002067566, 0.22035659849643707, 0.016527028754353523, 0.1509309858083725, 0.05670156702399254, 0.04505119472742081, 0.008402558043599129, -0.0046005528420209885, -0.18083244562149048, -0.04698456451296806, 0.04062587022781372, 0.07018552720546722, 0.025983236730098724, 0.05214061588048935], [-0.06774028390645981, 0.0770343691110611, 0.02490340918302536, -0.05533936247229576, -0.05580153316259384, 0.011461232788860798, -0.021460622549057007, -0.1008981466293335, 0.1731707751750946, -0.08681687712669373, 0.19969144463539124, 0.05881047993898392, -0.21329285204410553, -0.12348803877830505, 0.061459895223379135, 0.10017403960227966, -0.16645027697086334, -0.057853471487760544, -0.10197567194700241, -0.1398266702890396, 0.021895311772823334, -0.019461719319224358, 0.0901045873761177, -0.029752440750598907, -0.11002950370311737, -0.33913931250572205, -0.05570162460207939, -0.13779276609420776, 0.03231837600469589, -0.06149762496352196, -0.033193252980709076, 0.00971541553735733, -0.21527975797653198, -0.11199421435594559, 0.009726629592478275, 0.0016110092401504517, -0.06998565047979355, -0.02831004559993744, 0.23005805909633636, -0.005117480643093586, -0.0993012934923172, 0.07572649419307709, 0.026401188224554062, 0.1798585206270218, 0.285114049911499, 0.03762653097510338, 0.005962194874882698, -0.06668687611818314, 0.12351233512163162, -0.24554960429668427, 0.08096050471067429, 0.15136021375656128, 0.1097506582736969, 0.052189771085977554, 0.05484429746866226, -0.1364058256149292, -0.0019092904403805733, 0.07929179817438126, -0.14319205284118652, 0.022659210488200188, 0.06661401689052582, -0.10072870552539825, -0.0968160629272461, 0.02455226145684719, 0.20699217915534973, 0.1143723726272583, -0.08870547264814377, -0.0942600667476654, 0.17479486763477325, -0.06485708057880402, -0.002137034200131893, -0.007799588609486818, -0.1781596541404724, -0.17027316987514496, -0.22333991527557373, 0.09601754695177078, 0.35038065910339355, 0.16103076934814453, -0.19554837048053741, -0.010046628303825855, -0.20420390367507935, 0.058926571160554886, 0.0638941153883934, 0.006723462603986263, -0.04021980240941048, -0.1373405009508133, -0.02782914601266384, 0.04880392551422119, 0.11775225400924683, -0.037877511233091354, -0.07087532430887222, 0.22323936223983765, 0.03139178454875946, 0.04612656682729721, 0.013647424057126045, 0.0033146138302981853, -0.0928955003619194, -0.029477758333086967, -0.17645932734012604, -0.05428214371204376, 0.06457416713237762, -0.06807996332645416, 0.054932333528995514, 0.1570153832435608, -0.2364443987607956, 0.13061323761940002, -0.011847605928778648, -0.01994159445166588, 0.06909231096506119, 0.001865542959421873, -0.04788189008831978, -0.03504617512226105, 0.09848652780056, -0.21695555746555328, 0.26286056637763977, 0.22294177114963531, 0.010614436119794846, 0.16392910480499268, 0.06049185246229172, 0.05353987589478493, 0.014365090988576412, -0.0009870296344161034, -0.18372607231140137, -0.06603013724088669, 0.020067650824785233, 0.08052056282758713, 0.02895638905465603, 0.04466724023222923], [-0.06358089298009872, 0.08617204427719116, 0.04751918464899063, -0.06499502807855606, -0.03662006929516792, 0.02908378094434738, -0.01000724546611309, -0.09020029008388519, 0.18893077969551086, -0.09375175088644028, 0.21498894691467285, 0.08456733822822571, -0.21085381507873535, -0.12353790551424026, 0.07024352252483368, 0.11105899512767792, -0.1709376573562622, -0.06393018364906311, -0.10707461088895798, -0.12450065463781357, 0.02371804602444172, -0.017455851659178734, 0.09910958260297775, -0.047889214009046555, -0.10467226803302765, -0.34815046191215515, -0.06156788766384125, -0.12591494619846344, 0.04385443404316902, -0.05937910079956055, -0.0472676083445549, -0.004099750425666571, -0.20169465243816376, -0.10914339125156403, -0.0015482353046536446, -0.029579773545265198, -0.0655517727136612, -0.041492994874715805, 0.24290631711483002, -0.0014076028019189835, -0.10012612491846085, 0.07285307347774506, 0.021087031811475754, 0.17735512554645538, 0.288272500038147, 0.03974013403058052, 0.015855401754379272, -0.08440640568733215, 0.1258791834115982, -0.25277650356292725, 0.07736984640359879, 0.1399199217557907, 0.0932011678814888, 0.05878372862935066, 0.05654711276292801, -0.14015920460224152, -0.0036904197186231613, 0.06581569463014603, -0.1567983776330948, 0.02718179300427437, 0.04813545197248459, -0.09249399602413177, -0.08879390358924866, 0.012568986974656582, 0.19350075721740723, 0.12043644487857819, -0.0834069550037384, -0.11215976625680923, 0.16415050625801086, -0.0642513632774353, 0.007141624577343464, -0.0053764935582876205, -0.1877918541431427, -0.17082479596138, -0.23207564651966095, 0.08106870204210281, 0.32999154925346375, 0.15541763603687286, -0.18196341395378113, -0.01734643429517746, -0.1907513290643692, 0.043040681630373, 0.06881525367498398, 0.01207629032433033, -0.04772210121154785, -0.1389196664094925, -0.020372746512293816, 0.05501541867852211, 0.12594211101531982, -0.041520603001117706, -0.07477973401546478, 0.22843556106090546, 0.026845429092645645, 0.05039875581860542, 0.00453182402998209, 0.031513724476099014, -0.08634303510189056, -0.006870988756418228, -0.17566117644309998, -0.0290842168033123, 0.060366492718458176, -0.060605816543102264, 0.06571808457374573, 0.1630503535270691, -0.23173962533473969, 0.1197037473320961, -0.022479813545942307, -0.013526756316423416, 0.06991603225469589, -0.008880054578185081, -0.053230322897434235, -0.0423477403819561, 0.09507262706756592, -0.20524811744689941, 0.25180360674858093, 0.24232004582881927, 0.0018394209910184145, 0.14877407252788544, 0.05110028386116028, 0.053021326661109924, 0.006750382017344236, 0.009884658269584179, -0.19172531366348267, -0.04271562397480011, 0.01895054057240486, 0.07690248638391495, 0.02666492760181427, 0.047504354268312454]]
for x in temp:
ratiosToProcess.append(x)
temp = [[-0.06621432304382324, 0.0903577134013176, 0.01666644588112831, -0.027002960443496704, -0.15835316479206085, 0.029073132202029228, -0.033519499003887177, -0.049252644181251526, 0.009295930154621601, 0.07257981598377228, 0.21280518174171448, -0.11055807024240494, -0.2507183253765106, -0.058991506695747375, -0.016698889434337616, 0.14465782046318054, -0.07557804137468338, -0.0990355834364891, -0.14778731763362885, -0.05264373868703842, -0.12145504355430603, -0.028836628422141075, 0.02293407917022705, -0.002773925429210067, -0.05354580283164978, -0.2967393100261688, -0.029537837952375412, -0.05863555148243904, 0.09387204796075821, -0.07563068717718124, -0.051935721188783646, 0.08016929030418396, -0.27961885929107666, -0.07306467741727829, 0.06372014433145523, 0.11775723844766617, -0.08798535168170929, -0.0032225903123617172, 0.24701383709907532, 0.003172122873365879, -0.14383456110954285, 0.08735249191522598, 0.09096965193748474, 0.22837498784065247, 0.18926911056041718, 0.052978672087192535, 0.016043830662965775, 0.007455100305378437, 0.11799588799476624, -0.24434854090213776, 0.05333342403173447, 0.1735660433769226, 0.1378072202205658, 0.056060533970594406, 0.03030483052134514, -0.13855327665805817, -0.02085334062576294, 0.14850692451000214, -0.1545325070619583, 0.044801656156778336, -0.019911788403987885, -0.03806713968515396, -0.07215480506420135, -0.12800100445747375, 0.21819624304771423, 0.11953041702508926, -0.057260848581790924, -0.16659797728061676, 0.20586133003234863, -0.1262633502483368, -0.025982309132814407, 0.07570692896842957, -0.06518654525279999, -0.07914383709430695, -0.30997249484062195, 0.06521991640329361, 0.258011132478714, 0.017346428707242012, -0.22771848738193512, 0.0051881675608456135, 3.0262512154877186e-05, -0.09151210635900497, -0.04110018163919449, -0.011092007160186768, -0.0847724974155426, -0.01014012936502695, -0.08761677891016006, -0.05131443589925766, 0.2777740955352783, -0.09049393981695175, 0.06059972941875458, 0.14919620752334595, 0.019527480006217957, 0.0042428262531757355, 0.04290252551436424, 0.05599943548440933, -0.06584948301315308, -0.10279162973165512, -0.1726696789264679, -0.0019893781282007694, 0.010398562997579575, -0.18853318691253662, -0.05615716427564621, 0.07903599739074707, -0.2295554131269455, 0.10912832617759705, -0.025060690939426422, -0.05855552852153778, -0.0909399539232254, -0.03061934933066368, -0.028141137212514877, 0.0066085983999073505, 0.20270918309688568, -0.2635437846183777, 0.2998714745044708, 0.17859844863414764, -0.0530729778110981, 0.039993926882743835, 0.07985084503889084, 0.03462403267621994, -0.01369742676615715, 0.03285893425345421, -0.09419776499271393, -0.2126876711845398, 0.022657662630081177, -0.06009829416871071, -0.048730961978435516, 0.08531177043914795], [-0.03971511125564575, 0.11558707803487778, 0.002546262228861451, -0.010247713886201382, -0.1522705852985382, 0.029708821326494217, -0.026686685159802437, -0.059967316687107086, 0.0158176738768816, 0.05574800819158554, 0.20897170901298523, -0.09779141843318939, -0.25278884172439575, -0.07280892133712769, -0.0239633210003376, 0.1359269767999649, -0.045291073620319366, -0.07291162014007568, -0.16513147950172424, -0.07587037980556488, -0.09987851232290268, 0.006829887628555298, 0.0673067718744278, -0.011712824925780296, -0.06574785709381104, -0.3130345344543457, -0.014638231135904789, -0.06622777134180069, 0.06046278774738312, -0.11306333541870117, -0.011950270272791386, 0.09271016716957092, -0.28621429204940796, -0.06291987001895905, 0.020097166299819946, 0.08405883610248566, -0.06416959315538406, 0.023199614137411118, 0.2685449719429016, 0.009714418090879917, -0.13733239471912384, 0.11130131781101227, 0.1269470900297165, 0.2203015834093094, 0.16848669946193695, 0.041321977972984314, 0.026270151138305664, -0.014507701620459557, 0.11671018600463867, -0.22782067954540253, 0.03783155232667923, 0.157487154006958, 0.14667119085788727, 0.057269901037216187, 0.03130999207496643, -0.10765642672777176, -0.02609722688794136, 0.15576647222042084, -0.1510888636112213, 0.08608128130435944, -0.016611624509096146, -0.02020811103284359, -0.06689701229333878, -0.0881885290145874, 0.2268800288438797, 0.07868076115846634, -0.052008308470249176, -0.12877537310123444, 0.1767568141222, -0.13658040761947632, -0.03322431072592735, 0.09796924889087677, -0.04853193089365959, -0.10109392553567886, -0.3156655728816986, 0.08516202867031097, 0.2377910017967224, 0.033114511519670486, -0.22785726189613342, -0.01531337108463049, -0.03489777818322182, -0.10276179760694504, -0.047333117574453354, -0.017995616421103477, -0.08065281808376312, -0.050770606845617294, -0.09422748535871506, -0.02381785586476326, 0.2998148500919342, -0.08517727255821228, 0.06735985726118088, 0.21042628586292267, 0.05450207740068436, 0.015009299851953983, -0.01357926893979311, 0.0699668601155281, -0.10824365168809891, -0.09440485388040543, -0.1585865616798401, 0.001737083774060011, 0.012557893991470337, -0.18266808986663818, -0.04911433905363083, 0.08527006953954697, -0.25200292468070984, 0.10325495153665543, -0.04111577197909355, -0.0819937139749527, -0.0574956089258194, 0.012059109285473824, -0.020950306206941605, -0.02989727072417736, 0.1869751513004303, -0.2432924062013626, 0.28230127692222595, 0.186350479722023, -0.05396820604801178, 0.042630359530448914, 0.08064305037260056, 0.06239452585577965, -0.00464628916233778, 0.02645387500524521, -0.08539550006389618, -0.20133830606937408, 0.03686675429344177, -0.05880565568804741, -0.06369529664516449, 0.08424662053585052], [-0.06166704744100571, 0.0831257551908493, 0.02708716131746769, -0.021200139075517654, -0.16853851079940796, 0.04798150435090065, -0.042903751134872437, -0.048321682959795, 0.022033587098121643, 0.05289117246866226, 0.2143750637769699, -0.09282509982585907, -0.25825831294059753, -0.0620877631008625, -0.021392259746789932, 0.14265206456184387, -0.08152968436479568, -0.10709181427955627, -0.14253643155097961, -0.0653415322303772, -0.11345885694026947, -0.03189175948500633, 0.01342715136706829, -0.019886482506990433, -0.05293324589729309, -0.30850812792778015, -0.02662855014204979, -0.07788218557834625, 0.092132568359375, -0.0794040709733963, -0.03949543461203575, 0.08335356414318085, -0.2754380404949188, -0.0759698823094368, 0.06694675236940384, 0.1055760607123375, -0.08437595516443253, 0.008635314181447029, 0.23726215958595276, 0.006766770966351032, -0.13782508671283722, 0.07303879410028458, 0.08850407600402832, 0.2256397008895874, 0.19427774846553802, 0.06768051534891129, 0.020262792706489563, 0.019099092110991478, 0.12660939991474152, -0.2405078411102295, 0.03571808338165283, 0.18728551268577576, 0.1450890153646469, 0.06678904592990875, 0.02900228276848793, -0.1376713216304779, -0.00817800685763359, 0.12026914954185486, -0.16332902014255524, 0.042791854590177536, -0.012184541672468185, -0.03827686235308647, -0.08211787045001984, -0.09961768239736557, 0.2175755351781845, 0.09666565805673599, -0.05582816153764725, -0.1722995787858963, 0.19933268427848816, -0.13753509521484375, -0.022672586143016815, 0.07375157624483109, -0.07850442826747894, -0.08228950947523117, -0.277776837348938, 0.051813267171382904, 0.279696524143219, 0.01905011385679245, -0.21912717819213867, 0.017471332103013992, -0.01603415608406067, -0.10066543519496918, -0.052269961684942245, -0.019127393141388893, -0.07420588284730911, 0.00605605635792017, -0.07406178116798401, -0.05720233544707298, 0.2715407907962799, -0.09511636942625046, 0.0696507915854454, 0.16265590488910675, 0.01710415631532669, -0.010292081162333488, 0.054283130913972855, 0.04722082242369652, -0.06245825067162514, -0.10344000160694122, -0.16615784168243408, -0.030458929017186165, 0.003260635305196047, -0.1948426365852356, -0.04723186045885086, 0.043160900473594666, -0.24309399724006653, 0.12656371295452118, -0.03484467789530754, -0.039408791810274124, -0.09376813471317291, -0.03762286528944969, -0.042518675327301025, 0.009676896966993809, 0.2204638421535492, -0.2649235427379608, 0.29315152764320374, 0.18886280059814453, -0.048914339393377304, 0.048391200602054596, 0.08543349802494049, 0.03275448828935623, -0.013065683655440807, 0.026149839162826538, -0.08135046809911728, -0.23077674210071564, 0.007515834644436836, -0.06187448278069496, -0.051758673042058945, 0.068220354616642], [-0.04016770049929619, 0.11163542419672012, 0.030061326920986176, -0.0052609872072935104, -0.1521364152431488, 0.032152749598026276, -0.0414387509226799, -0.06481703370809555, 0.028667030856013298, 0.041384629905223846, 0.20583178102970123, -0.09441480040550232, -0.2534394860267639, -0.06974266469478607, -0.032179031521081924, 0.13706164062023163, -0.04523332417011261, -0.08997799456119537, -0.149201437830925, -0.09215670824050903, -0.09263396263122559, 0.0034661395475268364, 0.05217991769313812, -0.023044299334287643, -0.07837245613336563, -0.31130602955818176, -0.015923159196972847, -0.0720243752002716, 0.069407619535923, -0.11585726588964462, -0.011668156832456589, 0.10312039405107498, -0.2938825190067291, -0.0640556588768959, 0.029726918786764145, 0.08710086345672607, -0.07153724133968353, 0.01736569032073021, 0.26054444909095764, 0.009766045957803726, -0.13037514686584473, 0.09647972881793976, 0.128408744931221, 0.22362461686134338, 0.17060866951942444, 0.05062350258231163, 0.02546701952815056, 0.008405321277678013, 0.12575429677963257, -0.21823562681674957, 0.017993779852986336, 0.17478127777576447, 0.14648115634918213, 0.08144606649875641, 0.030295802280306816, -0.12060648202896118, -0.010196413844823837, 0.13716694712638855, -0.14887382090091705, 0.08532818406820297, -0.009527366608381271, -0.03322518989443779, -0.06752870976924896, -0.07011477649211884, 0.2285808026790619, 0.05123036727309227, -0.05493824556469917, -0.12769044935703278, 0.16797685623168945, -0.1320122480392456, -0.01824313960969448, 0.10531476885080338, -0.06453399360179901, -0.0983344241976738, -0.2815468907356262, 0.07757259905338287, 0.25987112522125244, 0.032173898071050644, -0.21861262619495392, 8.23289155960083e-06, -0.03567736595869064, -0.1050088033080101, -0.055776335299015045, -0.022669536992907524, -0.06861603260040283, -0.029483776539564133, -0.08545559644699097, -0.030915655195713043, 0.3010200560092926, -0.08083482086658478, 0.06926550716161728, 0.20654648542404175, 0.04450873285531998, 0.006409059278666973, -0.011215683072805405, 0.0531884990632534, -0.10956097394227982, -0.0988367348909378, -0.15122577548027039, -0.022128546610474586, -0.0015826169401407242, -0.18252815306186676, -0.054418183863162994, 0.05937887728214264, -0.25325214862823486, 0.12279829382896423, -0.031816042959690094, -0.06091767176985741, -0.07763143628835678, 0.011805460788309574, -0.03662671148777008, -0.016704315319657326, 0.19087037444114685, -0.2537141442298889, 0.2858954966068268, 0.19173671305179596, -0.04378447309136391, 0.051130227744579315, 0.08550437539815903, 0.05334405601024628, -0.0017034951597452164, 0.024645289406180382, -0.0623248852789402, -0.22535328567028046, 0.029338572174310684, -0.060527727007865906, -0.05094598978757858, 0.06975126266479492], [-0.03133946284651756, 0.1140744611620903, 0.022303080186247826, -0.033504173159599304, -0.160215824842453, 0.05209432542324066, -0.035184845328330994, -0.050576332956552505, 0.02064165286719799, 0.04555574059486389, 0.20173560082912445, -0.1150084137916565, -0.23386450111865997, -0.06368783861398697, -0.03806185722351074, 0.12787917256355286, -0.054427340626716614, -0.06956097483634949, -0.17308126389980316, -0.0842171460390091, -0.09422138333320618, 0.007948850281536579, 0.04940275102853775, -0.015242496505379677, -0.08318758010864258, -0.3141162097454071, -0.024693338200449944, -0.06191844493150711, 0.052872974425554276, -0.10442057251930237, 0.007155174855142832, 0.09745537489652634, -0.29572391510009766, -0.06704483926296234, 0.009653715416789055, 0.07102875411510468, -0.08716872334480286, 0.01844615489244461, 0.25628504157066345, 0.0055530620738863945, -0.14683522284030914, 0.1252662092447281, 0.14585277438163757, 0.22863835096359253, 0.18411915004253387, 0.046159420162439346, 0.01755615323781967, 0.017062362283468246, 0.11862315237522125, -0.2326112687587738, 0.0342264287173748, 0.16707554459571838, 0.14724519848823547, 0.0812378004193306, 0.04480426758527756, -0.09830544888973236, -0.018691537901759148, 0.16673831641674042, -0.13525798916816711, 0.08364856243133545, -0.02257276140153408, -0.04323405772447586, -0.048593636602163315, -0.08194387704133987, 0.22222930192947388, 0.07028000056743622, -0.049256037920713425, -0.132375106215477, 0.16877929866313934, -0.12789908051490784, -0.013298649340867996, 0.1230936124920845, -0.05270806699991226, -0.095699742436409, -0.3085228204727173, 0.09683379530906677, 0.24834692478179932, 0.03685884550213814, -0.21818852424621582, -0.02044801414012909, -0.037168312817811966, -0.08871740102767944, -0.043849196285009384, -0.017158396542072296, -0.06997459381818771, -0.05006975680589676, -0.08203873038291931, -0.027448803186416626, 0.2952675521373749, -0.09030559659004211, 0.0621575266122818, 0.22173820436000824, 0.06230662763118744, -0.021918989717960358, -0.010073946788907051, 0.06312654912471771, -0.11073046922683716, -0.09910139441490173, -0.15424783527851105, 0.007648496888577938, 0.010408416390419006, -0.17944550514221191, -0.060165517032146454, 0.06943346560001373, -0.25388994812965393, 0.11604831367731094, -0.03812618926167488, -0.07918236404657364, -0.0730988010764122, 0.0002566406037658453, -0.018169455230236053, -0.02114908955991268, 0.19619542360305786, -0.2632826268672943, 0.25844860076904297, 0.17996101081371307, -0.06159647926688194, 0.05702009052038193, 0.08589151501655579, 0.06024079769849777, -0.013331585563719273, 0.019640550017356873, -0.05949029326438904, -0.20907928049564362, 0.040359802544116974, -0.0489649623632431, -0.0561373233795166, 0.07559660822153091]]
for x in temp:
ratiosToProcess.append(x)
indicesToProcess = []
for x in range(1, 21):
if(x <= 5):
indicesToProcess.append([0])
elif(x > 5 and x <= 10):
indicesToProcess.append([1])
elif(x > 10 and x <= 15):
indicesToProcess.append([2])
else:
indicesToProcess.append([3])
print(indicesToProcess)
X = np.array(ratiosToProcess)
y = np.array(indicesToProcess)
model = keras.Sequential()
class EarlyStoppingByLossVal(keras.callbacks.Callback):
def __init__(self, monitor='loss', value=0.000001, verbose=0):
super(keras.callbacks.Callback, self).__init__()
self.monitor = monitor
self.value = value
self.verbose = verbose
def on_epoch_end(self, epoch, logs={}):
current = logs.get(self.monitor)
if current is None:
print("Early stopping requires %s available!" % self.monitor)
exit()
if current < self.value:
if self.verbose > 0:
print("Epoch %05d: early stopping THR" % epoch)
self.model.stop_training = True
earlyStop = [EarlyStoppingByLossVal()]
model.add(keras.layers.Dense(200, input_dim=128, activation='relu'))
model.add(keras.layers.Dense(100, activation='relu'))
model.add(keras.layers.Dense(50, activation='relu'))
model.add(keras.layers.Dense(4, activation='softmax'))
model.compile(loss='sparse_categorical_crossentropy', optimizer='adam')
model.fit(X, y, batch_size=1, epochs=100000, callbacks=earlyStop)
model.save(currentUser + '.model')
exit(0)
if cv2.waitKey(20) & 0xFF == ord('q') :
break
video.release()
cv2.destroyAllWindows()