yolo_darknet_sur_un_portable_optimus
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édente | ||
| yolo_darknet_sur_un_portable_optimus [2019/04/15 06:10] – [Training] serge | yolo_darknet_sur_un_portable_optimus [2020/12/27 15:09] (Version actuelle) – serge | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ======Yolo Darknet sur un portable Optimus====== | ======Yolo Darknet sur un portable Optimus====== | ||
| - | <WRAP center round box 80% centeralign> | + | <WRAP center round box 60% centeralign> |
| - | **{{tagpage> | + | **{{tagpage> |
| + | </WRAP> | ||
| + | <WRAP center round box 60% centeralign> | ||
| + | **[[les_pages_intelligence_artificielle_en_details|Les Pages Intelligence Artificielle | ||
| </ | </ | ||
| + | <WRAP center round box 60% centeralign> | ||
| + | **{{tagpage> | ||
| + | </ | ||
| + | <WRAP center round box 60% centeralign> | ||
| C'est quoi un sémaphore ? | C'est quoi un sémaphore ? | ||
| {{ youtube> | {{ youtube> | ||
| - | {{ chappe.jpeg? | + | {{ media_05:chappe.jpeg? |
| - | <WRAP center round box 80% centeralign> | + | </ |
| + | \\ \\ | ||
| + | <WRAP center round box 60% centeralign> | ||
| // | // | ||
| //**Test avec des images du sémaphore**// | //**Test avec des images du sémaphore**// | ||
| Ligne 14: | Ligne 23: | ||
| - | {{ : | + | |
| =====Considération générales===== | =====Considération générales===== | ||
| - | * **Xubuntu 18.04 CUDA 10.0 CUDNN 7.4.1.5 ** Ne pas utiliser | + | * **Xubuntu 18.04 CUDA 10.0 CUDNN 7.4.1.5 |
| + | * **Ne pas utiliser | ||
| * **Sur Ubuntu, l' | * **Sur Ubuntu, l' | ||
| + | * **Ce tuto a été écrit avec des tests réalisés sur un portable avec une carte 765GTX et sur une tour avec une carte 1060GTX** | ||
| =====Ressources et documentation de YOLO Darknet===== | =====Ressources et documentation de YOLO Darknet===== | ||
| ===Darknet=== | ===Darknet=== | ||
| Ligne 27: | Ligne 38: | ||
| ====Installation du driver Nvidia==== | ====Installation du driver Nvidia==== | ||
| Avec le Gestionnaire de pilotes supplémentaires | Avec le Gestionnaire de pilotes supplémentaires | ||
| - | ====Installation==== | + | ====Installation |
| Le tout va télécharger 3 à 4 Go ! | Le tout va télécharger 3 à 4 Go ! | ||
| < | < | ||
| Ligne 39: | Ligne 50: | ||
| sudo apt-get install --no-install-recommends cuda-10-0 | sudo apt-get install --no-install-recommends cuda-10-0 | ||
| sudo apt-get install --no-install-recommends libcudnn7=7.4.1.5-1+cuda10.0 | sudo apt-get install --no-install-recommends libcudnn7=7.4.1.5-1+cuda10.0 | ||
| - | sudo apt-get install cmake clang python3-pip libopencv-dev libopencv-core-dev libopencv-highgui-dev libopencv-flann-dev libopencv-photo-dev libopencv-video-dev libopencv-dev | + | sudo apt-get install cmake clang python3-pip libopencv-dev libopencv-core-dev libopencv-highgui-dev libopencv-flann-dev libopencv-photo-dev libopencv-video-dev |
| - | sudo pip3 install opencv-python==3.4.5.20 | + | sudo pip3 install opencv-python==3.4.5.20 |
| </ | </ | ||
| + | |||
| + | Après installation, | ||
| + | |||
| + | Pour faire les mises à jour, il faudrait d' | ||
| + | |||
| + | ====Installation complémentaire pour mes projets==== | ||
| + | Installation de mon module personnel: [[: | ||
| + | |||
| + | |||
| + | |||
| =====Installation de YOLO Darknet===== | =====Installation de YOLO Darknet===== | ||
| Dans les [[https:// | Dans les [[https:// | ||
| + | |||
| + | Pour ajouter la libération de la RAM GPU entre 2 détections dans un script python, | ||
| + | [[Darknet Letters unload GPU RAM in python script|Darknet Letters unload GPU RAM in python script]] | ||
| ====Options de Makefile avec GPU avec CUDA avec OPENCV==== | ====Options de Makefile avec GPU avec CUDA avec OPENCV==== | ||
| < | < | ||
| Ligne 52: | Ligne 76: | ||
| AVX=0 | AVX=0 | ||
| OPENMP=0 | OPENMP=0 | ||
| - | LIBSO=0 | + | LIBSO=1 |
| ZED_CAMERA=0 | ZED_CAMERA=0 | ||
| </ | </ | ||
| Ligne 65: | Ligne 89: | ||
| </ | </ | ||
| L' | L' | ||
| + | |||
| + | Le fichier libdarknet.so de 1060GTX: {{ media_07: | ||
| =====Préparation===== | =====Préparation===== | ||
| Voir la page **[[yolo_avec_mes_propres_images|Yolo avec mes propres images]]** pour la construction de **60 000 images 640x640** et des fichiers *.txt correspondants. | Voir la page **[[yolo_avec_mes_propres_images|Yolo avec mes propres images]]** pour la construction de **60 000 images 640x640** et des fichiers *.txt correspondants. | ||
| - | {{:2019_04: | + | Ici nous utilisons **[[https://github.com/ |
| - | {{: | + | |
| - | {{: | + | |
| - | {{: | + | |
| - | {{: | + | |
| - | Les commandes | + | Les axes blanc sont probablement important |
| - | | + | |
| + | {{media_01:shot_53_z.jpg? | ||
| + | {{media_01: | ||
| + | {{media_01: | ||
| + | {{media_01: | ||
| + | {{media_01: | ||
| | | ||
| **darknet53.conv.74** | **darknet53.conv.74** | ||
| Ligne 113: | Ligne 140: | ||
| ===train.txt et test.txt=== | ===train.txt et test.txt=== | ||
| Les créer en collant le script **[[https:// | Les créer en collant le script **[[https:// | ||
| - | * installer [[pymultilame|pymultilame]] | + | * installer [[:pymultilame|pymultilame]] |
| * adapter le chemin vers le dossier root des images dans le script | * adapter le chemin vers le dossier root des images dans le script | ||
| python3 create_train_test_txt.py | python3 create_train_test_txt.py | ||
| Ligne 126: | Ligne 153: | ||
| =====Training===== | =====Training===== | ||
| - | export PATH=/ | ||
| ./darknet detector train axe/ | ./darknet detector train axe/ | ||
| - | {{ :2019_04: | + | {{ media_01: |
| ===Message final=== | ===Message final=== | ||
| Ligne 166: | Ligne 192: | ||
| for thresh = 0.25, precision = 0.97, recall = 0.95, F1-score = 0.96 | for thresh = 0.25, precision = 0.97, recall = 0.95, F1-score = 0.96 | ||
| for thresh = 0.25, TP = 5699, FP = 188, FN = 301, average IoU = 87.69 % | for thresh = 0.25, TP = 5699, FP = 188, FN = 301, average IoU = 87.69 % | ||
| - | |||
| IoU threshold = 50 %, used Area-Under-Curve for each unique Recall | IoU threshold = 50 %, used Area-Under-Curve for each unique Recall | ||
| mean average precision (mAP@0.50) = 0.982366, or 98.24 % | mean average precision (mAP@0.50) = 0.982366, or 98.24 % | ||
| - | Total Detection Time: 78.000000 Seconds | ||
| - | |||
| - | Set -points flag: | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| | | ||
| - | Saving weights to axe/ | ||
| - | Saving weights to axe/ | ||
| - | Saving weights to axe/ | ||
| </ | </ | ||
| - | |||
| - | Le fichier final obtenu: | ||
| =====Testing===== | =====Testing===== | ||
| ====Test sur une image==== | ====Test sur une image==== | ||
| - | | + | ./darknet detector test axe/ |
| - | | + | |
| Le résultat est dans l' | Le résultat est dans l' | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP half column> | <WRAP half column> | ||
| - | {{:2019_03: | + | {{media_01: |
| </ | </ | ||
| <WRAP half column> | <WRAP half column> | ||
| - | {{:2019_03: | + | {{media_01: |
| shot_36_space.jpg: | shot_36_space.jpg: | ||
| space: 40% | space: 40% | ||
| Ligne 202: | Ligne 214: | ||
| | | ||
| ====Test sur une video et enregistrement du résultat==== | ====Test sur une video et enregistrement du résultat==== | ||
| - | ./darknet detector demo axe/ | + | ./darknet detector demo axe/ |
| - | {{ : | + | |
| - | ====Test avec webcam==== | + | {{ vimeo> |
| + | ====Test avec webcam | ||
| Pour webcam=0 | Pour webcam=0 | ||
| - | ./darknet detector demo axe/ | + | ./darknet detector demo axe/ |
| + | {{ vimeo> | ||
| + | =====Avec un vrai sémaphore===== | ||
| + | * **[[yolo_darknet_avec_un_vrai_semaphore|Yolo Darknet avec un vrai sémaphore]]** | ||
| + | * **[[https:// | ||
| + | {{tag> ia sb semaphore yolo_darknet }} | ||
| - | {{tag> ia sb semaphore yolo_darknet}} | ||
yolo_darknet_sur_un_portable_optimus.1555308620.txt.gz · Dernière modification : de serge
