Skip to content

Commit

Permalink
feat: saving on data automatically with name
Browse files Browse the repository at this point in the history
  • Loading branch information
Natanco1 committed Nov 16, 2023
1 parent 00be766 commit cc9d9b8
Show file tree
Hide file tree
Showing 16 changed files with 932 additions and 268 deletions.
9 changes: 5 additions & 4 deletions app/routes/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ def update_session_by_id():


def calib_results():
file_name = json.loads(request.form['file_name'])
fixed_points = json.loads(request.form['fixed_circle_iris_points'])
calib_points = json.loads(request.form['calib_circle_iris_points'])

# Generate csv dataset of calibration points
os.makedirs(
f'{Path().absolute()}/public/calib_test/', exist_ok=True)
csv_file = f'{Path().absolute()}/public/calib_test/fixed_train_data.csv'
f'{Path().absolute()}/app/services/calib_validation/csv/data/', exist_ok=True)
csv_file = f'{Path().absolute()}/app/services/calib_validation/csv/data/{file_name}_fixed_train_data.csv'
csv_columns = ['left_iris_x', 'left_iris_y',
'right_iris_x', 'right_iris_y', 'point_x', 'point_y']
try:
Expand All @@ -159,8 +160,8 @@ def calib_results():

# Generate csv of iris points of session
os.makedirs(
f'{Path().absolute()}/public/calib_test/', exist_ok=True)
csv_file = f'{Path().absolute()}/public/calib_test/predict_train_data.csv'
f'{Path().absolute()}/app/services/calib_validation/csv/data/', exist_ok=True)
csv_file = f'{Path().absolute()}/app/services/calib_validation/csv/data/{file_name}_predict_train_data.csv'
csv_columns = ['left_iris_x', 'left_iris_y',
'right_iris_x', 'right_iris_y']
try:
Expand Down
46 changes: 46 additions & 0 deletions app/services/calib_validation/csv/data/45_fixed_train_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
left_iris_x,left_iris_y,right_iris_x,right_iris_y,point_x,point_y
539.2788696289062,211.80516052246094,463.6880798339844,203.3787078857422,50,50
540.7474975585938,212.14483642578125,464.3573303222656,203.34173583984375,50,50
540.6564331054688,213.37240600585938,464.5620422363281,204.50628662109375,50,50
540.39453125,212.91067504882812,464.3207702636719,204.0515899658203,50,50
540.6805419921875,213.77415466308594,464.5569763183594,205.3712921142578,50,50
543.9282836914062,217.46446228027344,468.0135192871094,207.2159881591797,50,373
544.2457885742188,217.2082061767578,467.5550231933594,208.0738067626953,50,373
544.4293212890625,217.50257873535156,467.9703674316406,207.6362762451172,50,373
544.171630859375,217.88906860351562,467.93328857421875,208.1413116455078,50,373
544.60009765625,218.04127502441406,468.25189208984375,208.0455780029297,50,373
542.5425415039062,217.97512817382812,466.0091857910156,208.9198760986328,50,696
542.6817626953125,218.17066955566406,464.9992980957031,209.00790405273438,50,696
542.0150146484375,217.72738647460938,465.18243408203125,208.8598175048828,50,696
541.8087768554688,217.73220825195312,465.011962890625,208.8629913330078,50,696
541.6148071289062,217.556640625,464.6623229980469,208.6676025390625,50,696
537.1560668945312,214.4562530517578,459.68658447265625,205.7871551513672,747.5,50
537.0223999023438,214.5308837890625,459.91412353515625,205.7122039794922,747.5,50
537.204345703125,214.27362060546875,459.9078674316406,205.5329132080078,747.5,50
536.7568969726562,214.18270874023438,459.5489501953125,205.67550659179688,747.5,50
536.5592041015625,214.0586700439453,459.48089599609375,205.3594207763672,747.5,50
534.9010620117188,214.70535278320312,457.2903747558594,207.48704528808594,747.5,373
534.647705078125,214.9772186279297,456.76739501953125,207.38327026367188,747.5,373
533.8953247070312,214.26846313476562,456.9015197753906,206.61077880859375,747.5,373
534.1907348632812,214.4733428955078,456.61907958984375,206.45697021484375,747.5,373
534.2296752929688,214.1300811767578,456.3311767578125,206.77687072753906,747.5,373
533.4176635742188,215.44410705566406,456.5327453613281,208.22421264648438,747.5,696
533.6256103515625,215.52931213378906,456.5426025390625,207.8355255126953,747.5,696
533.3279418945312,215.0949249267578,456.4804992675781,208.45614624023438,747.5,696
533.5704956054688,215.71435546875,456.25164794921875,207.84909057617188,747.5,696
533.3585815429688,215.63812255859375,456.42205810546875,208.296630859375,747.5,696
530.0648193359375,212.56881713867188,452.941650390625,205.15121459960938,1445,50
529.7655639648438,212.5930938720703,452.15228271484375,205.22337341308594,1445,50
529.7787475585938,212.29049682617188,452.3106384277344,205.11268615722656,1445,50
529.082275390625,212.35610961914062,451.6707458496094,205.49473571777344,1445,50
529.6409301757812,212.47518920898438,452.2537536621094,205.1057586669922,1445,50
529.4942016601562,212.99855041503906,452.03973388671875,205.83309936523438,1445,373
530.4422607421875,212.6458740234375,452.3713073730469,205.66957092285156,1445,373
529.7753295898438,212.99708557128906,452.3727111816406,205.79380798339844,1445,373
529.3705444335938,212.5830535888672,451.8752746582031,205.14031982421875,1445,373
529.626708984375,212.38882446289062,452.0613098144531,205.343505859375,1445,373
529.4449462890625,213.82321166992188,451.560791015625,206.92031860351562,1445,696
529.2161254882812,213.7880401611328,451.7881774902344,207.09909057617188,1445,696
529.3328247070312,213.71969604492188,451.7834167480469,206.2530059814453,1445,696
528.9851684570312,213.8326873779297,451.99896240234375,206.9969482421875,1445,696
528.9038696289062,213.9066619873047,451.3482666015625,206.81784057617188,1445,696
Expand Down
46 changes: 46 additions & 0 deletions app/services/calib_validation/csv/data/45_predict_train_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
left_iris_x,left_iris_y,right_iris_x,right_iris_y
528.9437255859375,213.95462036132812,450.8257141113281,207.3035125732422
528.9437255859375,213.95462036132812,450.8257141113281,207.3035125732422
528.9437255859375,213.95462036132812,450.8257141113281,207.3035125732422
528.9437255859375,213.95462036132812,450.8257141113281,207.3035125732422
528.9437255859375,213.95462036132812,450.8257141113281,207.3035125732422
710.3279418945312,280.6650695800781,609.1846923828125,270.91949462890625
710.70654296875,280.5082702636719,609.1276245117188,271.6042785644531
710.0228271484375,280.5461730957031,608.9152221679688,271.0467529296875
710.48388671875,280.3873596191406,609.064697265625,270.6380615234375
710.6949462890625,280.7400817871094,609.1803588867188,271.5344543457031
709.8419799804688,282.2939147949219,608.6744384765625,272.9172058105469
710.1687622070312,282.2437744140625,608.5874633789062,272.25799560546875
709.51123046875,282.4054260253906,608.0258178710938,273.05865478515625
708.899169921875,282.08587646484375,607.86474609375,272.778564453125
708.2932739257812,282.51776123046875,607.2283935546875,273.4652099609375
704.6095581054688,277.2314453125,603.11279296875,268.0970764160156
703.5577392578125,277.01287841796875,603.0186767578125,267.7371826171875
703.6367797851562,276.4847717285156,602.2587890625,267.6726379394531
702.427734375,277.0708923339844,601.2603149414062,268.1640930175781
701.8861694335938,277.23089599609375,600.9785766601562,268.55914306640625
699.6259765625,279.8243713378906,597.419189453125,271.3876037597656
699.8939819335938,279.56890869140625,597.4751586914062,271.47625732421875
699.7460327148438,278.8913879394531,597.759765625,270.9107971191406
699.5048828125,279.1535949707031,598.0452270507812,271.60235595703125
699.0911865234375,279.8656311035156,597.885498046875,271.5057067871094
700.904541015625,281.5262756347656,598.5244140625,274.0208740234375
698.9230346679688,281.48687744140625,597.756103515625,274.0222473144531
699.959716796875,281.4571838378906,598.0194091796875,273.9317932128906
698.7950439453125,281.8291015625,597.3529052734375,274.26092529296875
698.0433959960938,281.3887023925781,596.0116577148438,274.51593017578125
693.3295288085938,277.59564208984375,590.6666259765625,271.1240539550781
692.5985717773438,277.5851135253906,590.9342651367188,271.3164978027344
692.7180786132812,277.5454406738281,590.8973388671875,270.8216857910156
692.3603515625,277.0846862792969,590.2362060546875,270.91949462890625
692.5269165039062,277.86431884765625,589.347412109375,270.8388366699219
692.810546875,278.9435119628906,590.9154052734375,272.1461486816406
693.6307983398438,278.461181640625,591.2677001953125,271.8505859375
693.7315063476562,279.09136962890625,590.7843017578125,272.1077880859375
692.9755249023438,278.23272705078125,591.18798828125,271.94793701171875
693.2957763671875,278.5891418457031,591.2301635742188,271.9783935546875
693.3897094726562,280.1484680175781,591.2279052734375,273.90264892578125
693.2025756835938,280.1899719238281,590.8729248046875,273.9638671875
693.750244140625,280.458984375,590.2013549804688,273.8131408691406
692.922119140625,280.3198547363281,591.1008911132812,273.7641906738281
692.5569458007812,280.1663513183594,590.9345092773438,274.1396484375
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
left_iris_x,left_iris_y,right_iris_x,right_iris_y,point_x,point_y
531.8463134765625,190.76095581054688,449.27569580078125,183.5783233642578,50,696
531.3447875976562,190.19442749023438,449.4643859863281,183.39939880371094,50,696
530.8168334960938,190.47459411621094,448.70306396484375,183.85177612304688,50,696
527.1141357421875,186.1988525390625,443.402099609375,180.02215576171875,1445,696
526.85107421875,186.99337768554688,443.73126220703125,181.00502014160156,1445,696
526.7803344726562,186.54750061035156,444.2590637207031,180.41119384765625,1445,696
527.5036010742188,185.20909118652344,444.2901611328125,178.9979248046875,1445,696
527.721923828125,184.0361328125,445.42340087890625,177.64874267578125,1445,696
527.3644409179688,182.22799682617188,444.77069091796875,176.00955200195312,1445,696
525.9432373046875,179.12863159179688,443.83685302734375,173.35626220703125,1445,696
524.7091674804688,176.4644775390625,443.6340637207031,170.77711486816406,1445,696
523.4464111328125,173.47743225097656,443.5777282714844,168.2051544189453,1445,696
522.9495849609375,170.50270080566406,443.5469665527344,164.9893035888672,1445,696
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
left_iris_x,left_iris_y,right_iris_x,right_iris_y
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
522.2919311523438,169.32827758789062,443.4385681152344,164.40489196777344
685.1935424804688,216.17857360839844,585.3272705078125,211.7491455078125
678.9020385742188,216.36416625976562,580.4168701171875,212.61367797851562
674.89208984375,216.3444061279297,577.1229858398438,213.47926330566406
676.1482543945312,216.2308349609375,578.6073608398438,214.10108947753906
676.4957275390625,217.09152221679688,577.9269409179688,214.1095428466797
675.6854858398438,217.5979766845703,577.3013305664062,214.07595825195312
672.92578125,218.7222137451172,574.2276611328125,216.73281860351562
671.3641357421875,219.1707000732422,571.6339111328125,217.8141632080078
670.87451171875,219.22300720214844,570.2341918945312,216.9476776123047
666.0309448242188,220.7873077392578,564.8421630859375,218.28680419921875
665.465576171875,220.91490173339844,563.3004150390625,218.65823364257812
659.1757202148438,221.49227905273438,556.9194946289062,220.38949584960938
Expand Down
Loading

0 comments on commit cc9d9b8

Please sign in to comment.