You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** all our models were trained on 8 nodes with 8 V100 GPUs each for a total of 64 GPUs. Expected training time for 64 GPUs is 24 hours, depending on the storage solution.
25
-
**Note 2:** hyperparameters for exact replication of our training can be found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/video/README.md). Some hyperparameters such as learning rate are scaled linearly in proportion to the number of GPUs.
25
+
**Note 2:** hyperparameters for exact replication of our training can be found on the section below. Some hyperparameters such as learning rate must be scaled linearly in proportion to the number of GPUs. The default values assume 64 GPUs.
26
26
27
27
### Single GPU
28
28
@@ -40,3 +40,70 @@ Since the original release, additional versions of Kinetics dataset became avail
40
40
Our training scripts support these versions of dataset as well by setting the `--kinetics-version` parameter to `"600"`.
41
41
42
42
**Note:** training on Kinetics 600 requires a different set of hyperparameters for optimal performance. We do not provide Kinetics 600 pretrained models.
43
+
44
+
45
+
## Video classification models
46
+
47
+
Starting with version `0.4.0` we have introduced support for basic video tasks and video classification modelling.
48
+
For more information about the available models check [here](https://pytorch.org/docs/stable/torchvision/models.html#video-classification).
49
+
50
+
### Video ResNet models
51
+
52
+
See reference training script [here](https://github.com/pytorch/vision/blob/main/references/video_classification/train.py):
53
+
54
+
- input space: RGB
55
+
- resize size: [128, 171]
56
+
- crop size: [112, 112]
57
+
- mean: [0.43216, 0.394666, 0.37645]
58
+
- std: [0.22803, 0.22145, 0.216989]
59
+
- number of classes: 400
60
+
61
+
Input data augmentations at training time (with optional parameters):
62
+
63
+
1. ConvertImageDtype
64
+
2. Resize (resize size value above)
65
+
3. Random horizontal flip (0.5)
66
+
4. Normalization (mean, std, see values above)
67
+
5. Random Crop (crop size value above)
68
+
6. Convert BCHW to CBHW
69
+
70
+
Input data augmentations at validation time (with optional parameters):
71
+
72
+
1. ConvertImageDtype
73
+
2. Resize (resize size value above)
74
+
3. Normalization (mean, std, see values above)
75
+
4. Center Crop (crop size value above)
76
+
5. Convert BCHW to CBHW
77
+
78
+
This translates in the following set of command-line arguments. Please note that `--batch-size` parameter controls the
79
+
batch size per GPU. Moreover note that our default `--lr` is configured for 64 GPUs which is how many we used for the
80
+
Video resnet models:
81
+
```
82
+
# number of frames per clip
83
+
--clip_len 16 \
84
+
# allow for temporal jittering
85
+
--clips_per_video 5 \
86
+
--batch-size 24 \
87
+
--epochs 45 \
88
+
--lr 0.64 \
89
+
# we use 10 epochs for linear warmup
90
+
--lr-warmup-epochs 10 \
91
+
# learning rate is decayed at 20, 30, and 40 epoch by a factor of 10
92
+
--lr-milestones 20, 30, 40 \
93
+
--lr-gamma 0.1 \
94
+
--train-resize-size 128 171 \
95
+
--train-crop-size 112 112 \
96
+
--val-resize-size 128 171 \
97
+
--val-crop-size 112 112
98
+
```
99
+
100
+
### Additional video modelling resources
101
+
102
+
-[Video Model Zoo](https://github.com/facebookresearch/VMZ)
[0]_D. Tran, H. Wang, L. Torresani, J. Ray, Y. LeCun and M. Paluri_: A Closer Look at Spatiotemporal Convolutions for Action Recognition. _CVPR 2018_ ([paper](https://research.fb.com/wp-content/uploads/2018/04/a-closer-look-at-spatiotemporal-convolutions-for-action-recognition.pdf))
108
+
109
+
[1]_W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, M. Suleyman, A. Zisserman_: The Kinetics Human Action Video Dataset ([paper](https://arxiv.org/abs/1705.06950))
0 commit comments