Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Commit

Permalink
final push
Browse files Browse the repository at this point in the history
  • Loading branch information
LeC-D committed Nov 30, 2018
1 parent c318a78 commit b521f9f
Show file tree
Hide file tree
Showing 31 changed files with 11 additions and 14 deletions.
2 changes: 0 additions & 2 deletions Projet/Bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def run(self):
for i in descs:
nw_letter = i[0]
nw_desc = [float(j) for j in re.findall(r"[\d.]+", i)]
print(desc_i)
print(nw_desc)
dist_actu = DescriptorGenerator.distance(desc_i, nw_desc)
if dist_actu < min_diff:
min_diff = dist_actu
Expand Down
5 changes: 3 additions & 2 deletions Projet/Classifier/DescriptorGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DescriptorGenerator:

@staticmethod
def generate_origin_descriptor():
return [0] * (DescriptorGenerator.desc_size + 1)
return [0] * (DescriptorGenerator.desc_size)

@staticmethod
def generate_descriptor(data):
Expand All @@ -30,7 +30,8 @@ def generate_descriptor(data):
new_ys = new_ys[1:]
new_ys = (np.array(new_ys) / new_ys[0]).tolist()
new_ys = new_ys[:DescriptorGenerator.desc_size]
new_ys.append(abs(complex(nb_fingertips, 0)))
#new_ys.append(abs(complex(nb_fingertips, 0)))
#print(new_ys)

return new_ys

Expand Down
Binary file modified Projet/Classifier/__pycache__/DescriptorGenerator.cpython-35.pyc
Binary file not shown.
16 changes: 8 additions & 8 deletions Projet/TrainedModel/model.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
w1.0 0.9870267806503344 0.9735362460720288 0.9592011029025258 0.9444022989991473 0.9297016926464909 0.9151825506371228 0.9006585487464958 0.886078303648402 0.8716498276384175 0.8572174514383347 0.8427728456855207 0.8283871042253792 0.8139705129568293 0.7997401909060731 0.7854649036910545 0.7713265261892785 0.7571625616602837 0.7431998005953263 0.7293491527161432 3.0
u1.0 0.990458439758131 0.9809945324129336 0.9715460351773836 0.9620734074294379 0.9526160991975022 0.9432082954380068 0.9337661627924588 0.9243103782572862 0.9148578948608076 0.9053949760523091 0.8959455305382876 0.8865070039223456 0.8771391752180615 0.8677121618699647 0.8582783900101427 0.8488472646547812 0.8394453664053069 0.8300278380951315 0.8206303887905347 2.6666666666666665
i1.0 0.9900330805393018 0.9799267684402521 0.969930105294399 0.959881692786049 0.9499156444225191 0.9398973109387505 0.9299774093264649 0.9200253729792116 0.9100629703796151 0.9001260117635439 0.8901920518403313 0.8801535582036658 0.8700370433409732 0.86009749990915 0.850073645335427 0.8399486477413898 0.8298637313668864 0.8198221593662403 0.8097006638519503 1.2
k1.0 0.9890627882870118 0.9782829326972156 0.9674863521904538 0.956866694995331 0.9461545671250953 0.9355640241069237 0.9249872258319893 0.9144955222106349 0.9039873220128651 0.8934687466801673 0.8829877804977714 0.8725835462755951 0.8622110014706869 0.851791511046461 0.8414312611982354 0.8311457952825035 0.8209161550728566 0.8107271068871501 0.8005378277464835 2.6666666666666665
v1.0 0.9908625429770358 0.9812518791129468 0.9712776041163959 0.9608201778717635 0.9504642891241538 0.9400845283761637 0.9296254565969266 0.9192627027758454 0.9089493279242049 0.8988023964646481 0.8885606365705078 0.8783739810800189 0.8682272127224749 0.8580528867725095 0.8479810197435752 0.8378830644394221 0.8278841577993532 0.8177546513048264 0.8077600172155925 3.3333333333333335
l1.0 0.9886313261973856 0.9772047725728248 0.9657746123152318 0.9544108668081015 0.9430958457951536 0.9317388494016104 0.920402854335435 0.9089975231231584 0.8976785449994307 0.8864096334358293 0.8750702218313482 0.8637831231836044 0.8525010664051405 0.8412772553760819 0.8300644250778888 0.8188846300851933 0.8077280304571433 0.7966288375514582 0.7854463833800481 5.0
f1.0 0.9909766928148457 0.981913793867278 0.9729159200132932 0.9639032400225703 0.9548842260070639 0.9458745952659744 0.9368670203501704 0.9278850208101751 0.918888478304557 0.9099011066950535 0.9009319996927229 0.8919469882340932 0.8829966311604174 0.8740314694311492 0.8650507613342873 0.8560921775643651 0.8471387147037911 0.8381668533120411 0.8292185503444749 2.0
b1.0 0.9907304352236308 0.9810954099217086 0.9714609406327653 0.9619155900916428 0.9523781397271012 0.9428540324598401 0.9332770587485351 0.9237059365225558 0.9142210614543377 0.9046273708905108 0.8950912494060923 0.8855549966533088 0.8760235850325813 0.8665141183845557 0.8569448773155468 0.8474593414751496 0.8379623097120816 0.8284928692949312 0.8190007298770767 2.8
f1.0 0.9909766928148457 0.981913793867278 0.9729159200132932 0.9639032400225703 0.9548842260070639 0.9458745952659744 0.9368670203501704 0.9278850208101751 0.918888478304557 0.9099011066950535 0.9009319996927229 0.8919469882340932 0.8829966311604174 0.8740314694311492 0.8650507613342873 0.8560921775643651 0.8471387147037911 0.8381668533120411 0.8292185503444749
v1.0 0.9908625429770358 0.9812518791129468 0.9712776041163959 0.9608201778717635 0.9504642891241538 0.9400845283761637 0.9296254565969266 0.9192627027758454 0.9089493279242049 0.8988023964646481 0.8885606365705078 0.8783739810800189 0.8682272127224749 0.8580528867725095 0.8479810197435752 0.8378830644394221 0.8278841577993532 0.8177546513048264 0.8077600172155925
b1.0 0.9907304352236308 0.9810954099217086 0.9714609406327653 0.9619155900916428 0.9523781397271012 0.9428540324598401 0.9332770587485351 0.9237059365225558 0.9142210614543377 0.9046273708905108 0.8950912494060923 0.8855549966533088 0.8760235850325813 0.8665141183845557 0.8569448773155468 0.8474593414751496 0.8379623097120816 0.8284928692949312 0.8190007298770767
k1.0 0.9890627882870118 0.9782829326972156 0.9674863521904538 0.956866694995331 0.9461545671250953 0.9355640241069237 0.9249872258319893 0.9144955222106349 0.9039873220128651 0.8934687466801673 0.8829877804977714 0.8725835462755951 0.8622110014706869 0.851791511046461 0.8414312611982354 0.8311457952825035 0.8209161550728566 0.8107271068871501 0.8005378277464835
u1.0 0.990458439758131 0.9809945324129336 0.9715460351773836 0.9620734074294379 0.9526160991975022 0.9432082954380068 0.9337661627924588 0.9243103782572862 0.9148578948608076 0.9053949760523091 0.8959455305382876 0.8865070039223456 0.8771391752180615 0.8677121618699647 0.8582783900101427 0.8488472646547812 0.8394453664053069 0.8300278380951315 0.8206303887905347
l1.0 0.9886313261973856 0.9772047725728248 0.9657746123152318 0.9544108668081015 0.9430958457951536 0.9317388494016104 0.920402854335435 0.9089975231231584 0.8976785449994307 0.8864096334358293 0.8750702218313482 0.8637831231836044 0.8525010664051405 0.8412772553760819 0.8300644250778888 0.8188846300851933 0.8077280304571433 0.7966288375514582 0.7854463833800481
i1.0 0.9900330805393018 0.9799267684402521 0.969930105294399 0.959881692786049 0.9499156444225191 0.9398973109387505 0.9299774093264649 0.9200253729792116 0.9100629703796151 0.9001260117635439 0.8901920518403313 0.8801535582036658 0.8700370433409732 0.86009749990915 0.850073645335427 0.8399486477413898 0.8298637313668864 0.8198221593662403 0.8097006638519503
w1.0 0.9870267806503344 0.9735362460720288 0.9592011029025258 0.9444022989991473 0.9297016926464909 0.9151825506371228 0.9006585487464958 0.886078303648402 0.8716498276384175 0.8572174514383347 0.8427728456855207 0.8283871042253792 0.8139705129568293 0.7997401909060731 0.7854649036910545 0.7713265261892785 0.7571625616602837 0.7431998005953263 0.7293491527161432
2 changes: 0 additions & 2 deletions Projet/Training/Trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def train(self):
data = Pipeline().run(img)
nw_desc = DescriptorGenerator.generate_descriptor(data)

print(descs[actu_letter])

descs[actu_letter] = [list(map(add, descs[actu_letter][0], nw_desc)), descs[actu_letter][1] + 1]

for key in descs:
Expand Down
Binary file modified Projet/Training/__pycache__/Trainer.cpython-35.pyc
Binary file not shown.
Binary file added Projet/TrainingSet/b_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Projet/__pycache__/Bootstrap.cpython-35.pyc
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/A_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/C2_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/C3_test.jpeg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/C3_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/C_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/D_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/E_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/G_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/H_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/J_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/N_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/O_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/P_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/Q_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/R_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/S_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/T_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/X_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/Y_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/Z_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/nothing_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/space_test.jpg
Binary file not shown.
Binary file removed Projet/asl_alphabet_test/test.jpg
Binary file not shown.

0 comments on commit b521f9f

Please sign in to comment.