jeu_du_semaphore_dans_le_blender_game_engine
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
jeu_du_semaphore_dans_le_blender_game_engine [2019/01/15 12:55] – [Ressources] serge | jeu_du_semaphore_dans_le_blender_game_engine [2020/12/27 15:06] – serge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Jeu du sémaphore dans le Blender Game Engine ====== | ====== Jeu du sémaphore dans le Blender Game Engine ====== | ||
- | {{ shot_98_e.png? | + | <WRAP center round box 60% centeralign> |
+ | **{{tagpage> | ||
+ | </ | ||
+ | <WRAP center round box 60% centeralign> | ||
+ | **[[les_pages_intelligence_artificielle_en_details|Les Pages Intelligence Artificielle en détails]]** | ||
+ | </ | ||
- | <WRAP center round box 40% centeralign> | + | <WRAP center round box 80% centeralign> |
- | **{{tagpage> | + | **{{tagpage> |
+ | </ | ||
+ | <WRAP center round box 60% centeralign> | ||
+ | C'est quoi un sémaphore ? | ||
+ | {{ youtube> | ||
+ | </ | ||
+ | {{ media_05: | ||
+ | \\ \\ \\ | ||
+ | <WRAP center round box 60% centeralign> | ||
+ | Des images pour l' | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
</ | </ | ||
- | ===== Les souces | + | |
+ | |||
+ | ===== Le projet | ||
* **[[https:// | * **[[https:// | ||
+ | * **Réalisé sur Debian 10 Buster**, ne fonctionne pas sur Win$ | ||
+ | * **python 3.7** | ||
- | ===== Ressources ===== | ||
- | * **[[https:// | ||
- | * **[[http:// | ||
- | ===== Un alphabet possible ===== | + | ====Installation==== |
- | ====Ressources==== | + | * Blender 2.79b |
- | Tiré du lien ci-dessus | + | * opencv |
- | {{ semaphore_am.png? | + | * numpy |
+ | * mon module perso pymultilame | ||
+ | |||
- | {{code_a_i.jpg?300|}} {{::code_j_z.jpg?300|}} | + | sudo apt install python3-pip |
+ | sudo pip3 install numpy | ||
+ | sudo pip3 install opencv-python | ||
+ | sudo apt install blender | ||
+ | Mon module personnel: | ||
+ | sudo pip3 install -e git+https:// | ||
+ | Mise à jour: | ||
+ | sudo pip3 install --upgrade git+https:// | ||
+ | |||
+ | ====Excécution==== | ||
+ | Lancer ./semaphore.sh | ||
- | {{tag>bge sb ia realisations_materielles semaphore}} | + | et faire les 5 étapes, 3 heures et demi pour 1, et un certain temps pour les autres .... |
+ | |||
+ | Bug connu: le treminal se ferme à la fin de la création des shots avec Blender ! Relancer le terminal et continuer avec 2 | ||
+ | ===== L' | ||
+ | <WRAP group> | ||
+ | <WRAP third column> | ||
+ | Sortie Blender 320x320\\ | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | </WRAP> | ||
+ | <WRAP third column> | ||
+ | 40x40, floue en gris\\ | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | </ | ||
+ | <WRAP third column> | ||
+ | 40x40 en Noir et Blanc\\ | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | {{media_01: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====1 - Création de 70 000 images==== | ||
+ | Dans un jeu Blender, 70 000 images sont créées, 60 0000 pour entraîner l'IA, 10 000 pour la tester. | ||
+ | Ce jeu lit soit un texte en latin de Cicéron, sans caractères accentués ni spéciaux, soit l' | ||
+ | |||
+ | Chaque lettre est affiché dans le jeu, puis une capture de la fenêtre est enregistrée. La fréquence est maxi de 6 fps, en allant plus vite l' | ||
+ | |||
+ | <wrap em> | ||
+ | <wrap hi> | ||
+ | Ne jamais déplacer ou réduire la fenêtre de Blender pendant la création des images ! | ||
+ | </ | ||
+ | </ | ||
+ | ====2 - Retaillage et flou==== | ||
+ | Le Blender Game Engine 2.79b permet un affichage mini de 320x280. Les images du jeu sont donc en 320x320. Un script python3 avec opencv resize les images à 40x40, les floutent. | ||
+ | |||
+ | |||
+ | ====3 - Compression==== | ||
+ | Pour avoir une excécution plus rapide pour les étapes suivantes. | ||
+ | ====4 - Création du fichier de poids de l' | ||
+ | * **[[l_intelligence_du_semaphore|L' | ||
+ | |||
+ | ====5 - Test de l' | ||
+ | Le résultat s' | ||
+ | |||
+ | ====6 - Modification de la configuration==== | ||
+ | Choisir au moins 60000 images au total, avec: | ||
+ | <WRAP group> | ||
+ | <WRAP third column> | ||
+ | * training = 30000 | ||
+ | * testing | ||
+ | </ | ||
+ | <WRAP third column> | ||
+ | * training = 35000 | ||
+ | * testing | ||
+ | </ | ||
+ | <WRAP third column> | ||
+ | * training = 60000 | ||
+ | * testing | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Les meilleurs résultats sont obtenu avec: | ||
+ | * gray = 0 | ||
+ | * blur = 6 | ||
+ | * learningrate = 0.022 | ||
+ | ====Recherche de la meilleure configuration possible==== | ||
+ | **Les hyperparamètres sont tous les paramètres à optimiser : learningrate, | ||
+ | |||
+ | * **[[https:// | ||
+ | * http:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | Le fichier best_config_search.py fait ce boulot en autodidacte, | ||
+ | |||
+ | ====Molière==== | ||
+ | **Le chemin est long du projet à la chose.** | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Ressources sur les sémaphores et le télégraphe de Chappe ===== | ||
+ | * **[[https:// | ||
+ | * **[[http:// | ||
+ | |||
+ | ==== Un alphabet possible ==== | ||
+ | {{media_12: | ||
==== Notre alphabet ==== | ==== Notre alphabet ==== | ||
+ | **j = &** | ||
<WRAP group> | <WRAP group> | ||
<WRAP quarter column> | <WRAP quarter column> | ||
- | * **a** {{shot_0_a.png? | + | * **a** {{media_03:shot_0_a.png? |
- | * **b** {{shot_1_b.png? | + | * **b** {{media_03:shot_1_b.png? |
- | * **c** {{shot_2_c.png? | + | * **c** {{media_03:shot_2_c.png? |
- | * **d** {{shot_3_d.png? | + | * **d** {{media_03:shot_3_d.png? |
- | * **e** {{shot_4_e.png? | + | * **e** {{media_03:shot_4_e.png? |
- | * **f** {{shot_5_f.png? | + | * **f** {{media_03:shot_5_f.png? |
- | * **g** {{shot_6_g.png? | + | * **g** {{media_03:shot_6_g.png? |
</ | </ | ||
<WRAP quarter column> | <WRAP quarter column> | ||
- | * **h** {{shot_7_h.png? | + | * **h** {{media_03:shot_7_h.png? |
- | * **i** {{shot_8_i.png? | + | * **i** {{media_03:shot_8_i.png? |
- | * **j** {{shot_9_j.png? | + | * **j** {{media_03:shot_9_j.png? |
- | * **k** {{shot_10_k.png? | + | * **k** {{media_03:shot_10_k.png? |
- | * **l** {{shot_11_l.png? | + | * **l** {{media_03:shot_11_l.png? |
- | * **m** {{shot_12_m.png? | + | * **m** {{media_03:shot_12_m.png? |
- | * **n** {{shot_13_n.png? | + | * **n** {{media_03:shot_13_n.png? |
</ | </ | ||
<WRAP quarter column> | <WRAP quarter column> | ||
- | * **o** {{shot_14_o.png? | + | * **o** {{media_03:shot_14_o.png? |
- | * **p** {{shot_15_p.png? | + | * **p** {{media_03:shot_15_p.png? |
- | * **q** {{shot_16_q.png? | + | * **q** {{media_03:shot_16_q.png? |
- | * **r** {{shot_17_r.png? | + | * **r** {{media_03:shot_17_r.png? |
- | * **s** {{shot_18_s.png? | + | * **s** {{media_03:shot_18_s.png? |
- | * **t** {{shot_19_t.png? | + | * **t** {{media_03:shot_19_t.png? |
- | * **u** {{shot_20_u.png? | + | * **u** {{media_03:shot_20_u.png? |
</ | </ | ||
<WRAP quarter column> | <WRAP quarter column> | ||
- | * **v** {{shot_21_v.png? | + | * **v** {{media_03:shot_21_v.png? |
- | * **w** {{shot_22_w.png? | + | * **w** {{media_03:shot_22_w.png? |
- | * **x** {{shot_23_x.png? | + | * **x** {{media_03:shot_23_x.png? |
- | * **y** {{shot_24_y.png? | + | * **y** {{media_03:shot_24_y.png? |
- | * **z** {{shot_25_z.png? | + | * **z** {{media_03:shot_25_z.png? |
- | * **espace** {{shot_26_ .png?100|}} | + | * **espace** {{media_03:shot_26_.png? |
</ | </ | ||
- | |||
</ | </ | ||
+ | |||
+ | {{tag> bge ia sb semaphore }} | ||
+ | |||
jeu_du_semaphore_dans_le_blender_game_engine.txt · Dernière modification : 2020/12/27 15:06 de serge