train_on_kunlun.md 1.6 KB
Newer Older
T
TTerror 已提交
1 2 3 4 5 6 7 8
# How to train on kunlun

## Prepare kunlun environment
[Paddle installation for machines with Kunlun XPU card](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/2.0-rc1/install/install_Kunlun_zh.html)

## yolov3

### Prepare data
9 10 11 12 13
Prepare data roadsign:
```shell
cd PaddleDetection/static/dataset/roadsign_voc/
python3.7 download_roadsign_voc.py
```
T
TTerror 已提交
14 15 16 17 18 19 20 21 22 23 24 25

### Train
```shell
python3.7 -u tools/train.py -c configs/yolov3_mobilenet_v1_roadsign.yml -o use_gpu=False use_xpu=True
```


### Eval
```shell
python3.7 -u tools/eval.py -c configs/yolov3_mobilenet_v1_roadsign.yml -o weights=output/yolov3_mobilenet_v1_roadsign/model_final.pdparams use_gpu=False use_xpu=True
```

26 27 28 29 30 31 32 33 34 35 36 37 38
### Train on Darknet
```shell
cd static/
python3.7 -u tools/train.py -c configs/yolov3_datknet_roadsign_kunlun.yml -o use_gpu=False use_xpu=True
```


### Eval on Darknet
```shell
cd static/
python3.7 -u tools/eval.py -c configs/yolov3_darknet_roadsign_kunlun.yml -o weights=output/yolov3_darknet_roadsign_kunlun/model_final.pdparams use_gpu=False use_xpu=True
```

T
TTerror 已提交
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

## ppyolo

### Prepare data
Prepare data roadsign


### Train
```shell
python3.7 -u tools/train.py --eval -c configs/ppyolo/ppyolo_roadsign_kunlun.yml
```


### Eval
```shell
python3.7 -u tools/eval.py -c configs/ppyolo/ppyolo_roadsign_kunlun.yml
```
Q
QingshuChen 已提交
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74


## mask_rcnn

### Prepare data
Download dataset from https://dataset.bj.bcebos.com/PaddleDetection_demo/cocome.tar and put it in the dataset directory.



### Train
```shell
python3.7 -u tools/train.py --eval -c configs/mask_rcnn_r50_1x_cocome_kunlun.yml
```


### Eval
```shell
python3.7 -u tools/eval.py -c configs/mask_rcnn_r50_1x_cocome_kunlun.yml
```