CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hukaixuan19970627

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: hukaixuan19970627/yolov5_obb
Path: blob/master/sh/ddp_train.sh
Views: 475
1
python -m torch.distributed.launch --nproc_per_node 3 train.py \
2
--batch 32 \
3
--data '/home/test/Persons/hukaixuan/yolov5/datasets/package/data.yaml' \
4
--weights 'runs/train/exp_multi_aug_yolov5n/weights/last.pt' \
5
--hyp 'data/hyps/hyp.finetune_package.yaml' \
6
--device 2 \
7
--epochs 50 \
8
--img 512 \
9
--cache \
10
--sync-bn
11
12
13
tensorboard --logdir runs/train/exp
14
15
# 测试 train/val/test 数据集的情况
16
python val.py \
17
--weights runs/train/exp_close_mosaic/weights/last.pt \
18
--img 480 \
19
--half \
20
--batch 1 \
21
--conf 0.001 --iou 0.65 \ # mAP 测精度的标准
22
--conf 0.25 --iou 0.45 \ # speed 测速标准
23
--task 'val' or 'train' or 'test'
24
25
# speed模式
26
python val.py \
27
--weights runs/train/exp_close_mosaic/weights/best.pt runs/train/exp_close_mosaic/weights/last.pt \
28
--img 480 \
29
--half \
30
--task 'speed' \
31
--device 'cpu' \
32
--batch 1
33
34
#mAP
35
python val.py --task 'test' --batch 16 --save-json --name 'yolov5t_dotav1_test_split'
36
python tools/TestJson2VocClassTxt.py \
37
--json_path 'runs/val/yolov5t_DroneVehicle_val/best_obb_predictions.json' \
38
--save_path 'runs/val/yolov5t_DroneVehicle_val/splited_obb_prediction_Txt'
39
python DOTA_devkit/ResultMerge_multi_process.py \
40
--scrpath 'runs/val/yolov5t_dotav1_test_split/splited_obb_prediction_Txt' \
41
--dstpath 'runs/val/yolov5t_dotav1_test_split/Merged_obb_prediction_Txt'
42
python DOTA_devkit/results_obb2hbb.py \
43
--srcpath 'runs/val/yolov5t_dotav1_test_split/Merged_obb_prediction_Txt' \
44
--dstpath 'runs/val/yolov5t_dotav1_test_split/Merged_hbb_prediction_Txt'
45
46