README.md 2.22 KB
Newer Older
1
2
3
# Object detection reference training scripts

This folder contains reference training scripts for object detection.
4
They serve as a log of how to train specific models, to provide baseline
5
6
training and evaluation scripts to quickly bootstrap research.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
To execute the example commands below you must install the following:

```
cython
pycocotools
matplotlib
```

You must modify the following flags:

`--data-path=/path/to/coco/dataset`

`--nproc_per_node=<number_of_gpus_available>`

Except otherwise noted, all models have been trained on 8x V100 GPUs. 
22

23
### Faster R-CNN ResNet-50 FPN
24
```
25
torchrun --nproc_per_node=8 train.py\
26
27
28
29
    --dataset coco --model fasterrcnn_resnet50_fpn --epochs 26\
    --lr-steps 16 22 --aspect-ratio-group-factor 3
```

30
31
### Faster R-CNN MobileNetV3-Large FPN
```
32
torchrun --nproc_per_node=8 train.py\
33
34
35
36
    --dataset coco --model fasterrcnn_mobilenet_v3_large_fpn --epochs 26\
    --lr-steps 16 22 --aspect-ratio-group-factor 3
```

37
38
### Faster R-CNN MobileNetV3-Large 320 FPN
```
39
torchrun --nproc_per_node=8 train.py\
40
41
42
43
    --dataset coco --model fasterrcnn_mobilenet_v3_large_320_fpn --epochs 26\
    --lr-steps 16 22 --aspect-ratio-group-factor 3
```

44
45
### RetinaNet
```
46
torchrun --nproc_per_node=8 train.py\
47
48
49
50
    --dataset coco --model retinanet_resnet50_fpn --epochs 26\
    --lr-steps 16 22 --aspect-ratio-group-factor 3 --lr 0.01
```

51
### SSD300 VGG16
52
```
53
torchrun --nproc_per_node=8 train.py\
54
55
56
57
58
    --dataset coco --model ssd300_vgg16 --epochs 120\
    --lr-steps 80 110 --aspect-ratio-group-factor 3 --lr 0.002 --batch-size 4\
    --weight-decay 0.0005 --data-augmentation ssd
```

59
### SSDlite320 MobileNetV3-Large
60
```
61
torchrun --nproc_per_node=8 train.py\
62
63
64
65
66
    --dataset coco --model ssdlite320_mobilenet_v3_large --epochs 660\
    --aspect-ratio-group-factor 3 --lr-scheduler cosineannealinglr --lr 0.15 --batch-size 24\
    --weight-decay 0.00004 --data-augmentation ssdlite
```

67
68
69

### Mask R-CNN
```
70
torchrun --nproc_per_node=8 train.py\
71
72
73
74
75
76
77
    --dataset coco --model maskrcnn_resnet50_fpn --epochs 26\
    --lr-steps 16 22 --aspect-ratio-group-factor 3
```


### Keypoint R-CNN
```
78
torchrun --nproc_per_node=8 train.py\
79
80
81
    --dataset coco_kp --model keypointrcnn_resnet50_fpn --epochs 46\
    --lr-steps 36 43 --aspect-ratio-group-factor 3
```