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/02/07 12:17] – [Recherche de la meilleure configuration possible] 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 ====== | ||
+ | |||
+ | <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 80% 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: | ||
+ | </ | ||
+ | |||
+ | |||
- | Une image pour l' | ||
- | Une image à décrypter {{shot_98_e.png? | ||
===== Le projet sur Github ===== | ===== Le projet sur Github ===== | ||
Ligne 11: | Ligne 31: | ||
* **Réalisé sur Debian 10 Buster**, ne fonctionne pas sur Win$ | * **Réalisé sur Debian 10 Buster**, ne fonctionne pas sur Win$ | ||
* **python 3.7** | * **python 3.7** | ||
+ | |||
====Installation==== | ====Installation==== | ||
Ligne 17: | Ligne 38: | ||
* numpy | * numpy | ||
* mon module perso pymultilame | * mon module perso pymultilame | ||
- | | + | |
sudo apt install python3-pip | sudo apt install python3-pip | ||
sudo pip3 install numpy | sudo pip3 install numpy | ||
sudo pip3 install opencv-python | sudo pip3 install opencv-python | ||
sudo apt install blender | sudo apt install blender | ||
+ | Mon module personnel: | ||
sudo pip3 install -e git+https:// | sudo pip3 install -e git+https:// | ||
Mise à jour: | Mise à jour: | ||
Ligne 29: | Ligne 52: | ||
Lancer ./ | Lancer ./ | ||
- | et faire les 5 étapes, 3 heures pour 1, et un certain temps pour les autres .... | + | et faire les 5 étapes, 3 heures |
- | ===== Etape 1 ===== | + | |
- | ====Création de 70 000 images==== | + | 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 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. | 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' | Ce jeu lit soit un texte en latin de Cicéron, sans caractères accentués ni spéciaux, soit l' | ||
Ligne 42: | Ligne 88: | ||
</ | </ | ||
</ | </ | ||
- | ====Retaillage, flou et compression==== | + | ====2 - Retaillage |
- | Les images sont en noir et blanc, | + | Le Blender Game Engine 2.79b permet un affichage mini de 320x280. |
- | Le Blender Game Engine 2.79 permet un affichage mini de 320x280. Les images du jeu sont donc en 320x320. Un script python3 avec opencv resize les images à 40x40 et 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' |
- | ====IA==== | + | ====5 - Test de l' |
- | Ensuite faire l'apprentissage de **{{tagpage> | + | Le résultat s'exprime par un pourcentage. L'objectif est d' |
- | | + | ====6 - Modification de la configuration==== |
+ | Choisir au moins 60000 images au total, avec: | ||
+ | <WRAP group> | ||
+ | <WRAP third column> | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | <WRAP third column> | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | <WRAP third column> | ||
+ | | ||
+ | * testing | ||
+ | </ | ||
+ | </ | ||
+ | Les meilleurs résultats sont obtenu avec: | ||
+ | * gray = 0 | ||
+ | * blur = 6 | ||
+ | * learningrate = 0.022 | ||
====Recherche de la meilleure configuration possible==== | ====Recherche de la meilleure configuration possible==== | ||
+ | **Les hyperparamètres sont tous les paramètres à optimiser : learningrate, | ||
+ | |||
* **[[https:// | * **[[https:// | ||
* http:// | * http:// | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | Le fichier best_config_search.py fait ce boulot en amateur, mais c'est un bricolage réservé aux spélialistes qui se sont plongés dans tout le project. | + | Le fichier best_config_search.py fait ce boulot en autodidacte, mais c'est un bricolage réservé aux spélialistes qui se sont plongés dans tout le projet. |
====Molière==== | ====Molière==== | ||
Ligne 68: | Ligne 134: | ||
- | ===== Etape 2 en travaux, pas vraiment commencé===== | + | |
- | En arrière plan, défile le documentaire **NOTHING TO HIDE** pour avoir un fond très varié: | + | |
- | {{ youtube> | + | |
===== Ressources sur les sémaphores et le télégraphe de Chappe ===== | ===== Ressources sur les sémaphores et le télégraphe de Chappe ===== | ||
Ligne 77: | Ligne 141: | ||
==== Un alphabet possible ==== | ==== Un alphabet possible ==== | ||
- | {{semaphore_am.png? | + | {{media_12:semaphore_am.png? |
==== Notre alphabet ==== | ==== Notre alphabet ==== | ||
Ligne 83: | Ligne 147: | ||
<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?30|}} | + | * **espace** {{media_03:shot_26_.png? |
</ | </ | ||
</ | </ | ||
- | {{tag> | + | {{tag> bge ia sb semaphore }} |
jeu_du_semaphore_dans_le_blender_game_engine.txt · Dernière modification : 2020/12/27 15:06 de serge