Object detection tests

Now develops 2 ways for solution 'object detection purpose':

  • Torchvision pipeline

  • YOLO pipeline like submodules

Main pipelines is available in Wolf SSH server with path /data/CNN_object_detectors.

Data for import exists in Label studio server in VLG Navmii Label Studio

Project gitlab : https://gitlab.navmii.com/AI/cnn_object_detectors

Labels is in proj/configs_for_models/datasetYolo.yaml - for yolo (imported labels is in proj/projDataset/yolo/classes.txt)
proj/customModel/config.py - for custom

Labels:

Training /data/CNN_object_detectors:

docker build -f ./Dockerfile -t image_detector . docker run -p 8888:8888 -v $(pwd)/proj:/proj --gpus=all --ipc=host -it --rm image_detector /bin/bash

Torchvision (custom) pipeline:

cd ./proj python3 ./train.py

YOLO:

cd proj/YOLOv5 python3 train.py --img 800 --batch 8 --epochs 100 --workers 0 --name yolov5-custom --data ../configs_for_models/datasetYolo.yaml --weights ../pretrained_weights/yolov5s.pt

Between trainings with different yolo versions, dont forget clean dataset cache

Test /data/CNN_object_detectors:

 

Torchvision (custom) pipeline:

If you want testing model with own data, insert path to VALID_DS_DIR in config.py

YOLO(detect.py as test script):

actual on WolfSSH yolov5 model - yolov5-custom3

If you want testing model with own data, insert path to --source

Or after successful ONNX stage in export.py :

Please choose VALID_DS_DIR, OUT_INF_DIR, YOLO_VERSION and Sizes for using YoloCustomOnnxTest.py in there