- go into workspace yolov8
cd yolov8
- create docker image
cd docker
docker build -t ultralytics .
- set up docker environment
cd ..
docker compose up -d --build lab
- goto container workspace ->
/root/code
- install requirements
pip install -r requirements.txt
- preprare thermal + RGB pair data
- create yaml file and set your custom dataset path in
/root/code/ultralytics/yolo/cfg/xxx.yaml
- your custom dataset should put like this
train_rgb: /root/code/ultralytics/yolo/datasets/LLVIP/RGB/images/train val_rgb: /root/code/ultralytics/yolo/datasets/LLVIP/RGB/images/val train_ir: /root/code/ultralytics/yolo/datasets/LLVIP/IR/images/train val_ir: /root/code/ultralytics/yolo/datasets/LLVIP/IR/images/val test_rgb: /root/code/ultralytics/yolo/datasets/LLVIP/RGB/images/val test_ir: /root/code/ultralytics/yolo/datasets/LLVIP/IR/images/val
- edit
default.yaml
data: xxx.yaml
- train with your curstom dataset
python train.py
- preprare thermal + RGB pair data
- edit
default.yaml
which in/root/code/ultralytics/yolo/cfg/
-
input data
data type should be a photo pair or a directory with lot of pair photos
source_rgb: "/root/code/ultralytics/yolo/datasets/LLVIP/RGB/images/val" source_ir: "/root/code/ultralytics/yolo/datasets/LLVIP/IR/images/val"
-
model
model: /root/code/best.pt # path to model file, i.e. yolov8n.pt, yolov8n.yaml
-
- predict
python predict_twostream.py