739 B
739 B
Test YOLO (feuilles/plantes)
1) Créer et activer un venv
python3 -m venv .venv
source .venv/bin/activate
2) Installer les dépendances
pip install --upgrade pip
pip install ultralyticsplus==0.0.28 ultralytics==8.0.43 opencv-python matplotlib
3) Lancer un test
python3 test_yolo/test_yolo_leaf.py --image /chemin/vers/ma_plante.jpg
Sorties générées :
test_yolo/output/detections.jsontest_yolo/output/annotated.jpg
4) Paramètres utiles
python3 test_yolo/test_yolo_leaf.py \
--image /chemin/vers/ma_plante.jpg \
--conf 0.25 \
--iou 0.45 \
--max-det 1000 \
--json-out test_yolo/output/detections.json \
--image-out test_yolo/output/annotated.jpg