Learning representations from massive unlabeled data is a prominent research topic in computer vision for reducing the need for laborious and time-consuming manual annotations[chen2020simclr, he2020moco, swav, byol, simsiam]
. In the video analysis paradigm, which is the focus of our work, such unsupervised learning strategies are more crucial because of its increased labelling difficulty caused by the ambiguous association between videos and their labels. Early works manually design proxy tasks for learning videos, either by generalizing methods from the image domain[jing2018-3drotnet, kim2019cubic_puzzles] or by exploiting temporal properties of videos [xu2019vcop, luo2020vcp, diba2019dynamonet, benaim2020speednet], where visual structures and contents are learned through solving these proxy tasks. Inspired by the instance discimination task [wu2018ins_dis], contrastive based self-supervised approaches have achieved impressive performances [chen2020simclr, simsiam, he2020moco, han2019dpc, han2020memdpc, versatile], which shows its potential to learn advanced semantic information from unlabelled data. One of the key factors in the success of the contrastive learning framework is data augmentation for different views of the same instance, which prevents the model from trivial solution. Among common data augmentation strategies, it is shown in [chen2020simclr] that random cropping is one of the most effective operations.
Most current approaches for contrastive learning use random cropping with fixed scale range and completely random spatio-temporal location selections. This results in the statistical consistency in the difference of two cropped views along the training process, as showcased in grey in Figure 1(). In this work, we challenge this convention, and propose to control the cropping disparity between two views of the same instance. Inspired by curriculum learning, we increase the contrast difficulty in the later stage of contrastive training and an improvement in the representation is observed. Motivated by this, we present a parametric cubic cropping for video contrastive learning, dubbed ParamCrop, where cubic cropping refers to cropping a 3D cube from the input video. The central component of ParamCrop is a differentiable spatio-temporal cropping operation, which enables ParamCrop to be trained simultaneously with the video backbone and adjust the cropping strategy on the fly. We set the objective of ParamCrop to be adversarial to the video backbone, which is to increase the contrastive loss. Hence, initialized with the simplest setting where two cropped views largely overlaps, ParamCrop gradually increases the disparity between two views. It is worth noting that our objective in this paper is to discover an optimal cropping strategy so that the change in the differences between two augmented views are reasonably controlled. This is radically different from the auto augmentation approaches in the supervised setting [lim2019fastaugment, cubuk2019autoaugment, ho2019pba, cubuk2020randaugment], where the objectives are mostly to increase the diversity of the data so as to enhance the generalization ability.
We quantitatively evaluate the representations trained by ParamCrop on two downstream tasks, i.e., video action recognition and video retrieval. The empirical results demonstrate notable improvements on multiple mainstream contrastive learning frameworks and video backbones. Interestingly, when the change in disparity between two different views generated by ParamCrop is manually simulated, similar improvements in the representation quality are still observed over random augmentation baselines. It further demonstrates that the change process in the view differences is important for training a strong and generalized representation. Finally, we achieve state-of-the-art performance on both evaluated tasks on HMDB51 and UCF101.
Contributions. Our contributions can be mainly summarized as follows: (a) We propose to alter the cropping strategy in video contrastive learning by controlling the disparity between two cropped views; (b) An optimal change process is found by introducing a differentiable spatio-temporal cropping operation and training ParamCrop adversarially and simultaneously with the video backbone; (c) Extensive ablation studies decompose the effectiveness of different components and cropping strategies; (d) State-of-the-art performance is reached on multiple downstream action recognition datasets.
2 Related Work
Self-supervised video representation learning. To avoid laborious and time-consuming annotation process, a wide range of prior works have proposed different approaches for leveraging unlabelled data. Recent endeavors can be mainly divided into two categories, that is pretext task based approaches [jing2018-3drotnet, benaim2020speednet, diba2019dynamonet, wang2020video_peace, luo2020vcp, xu2019vcop] and contrastive learning based ones [han2019dpc, han2020memdpc, coclr, chen2020simclr, he2020moco, oord2018cpc]. The former ones usually introduce a proxy task for the model to solve. Besides the simple generalization from the image domain [rotation, noroozi2016jigsaw] such as rotation prediction [jing2018-3drotnet] and solving puzzles[kim2019cubic_puzzles, luo2020vcp], other tasks include predictions on the temporal dimension such as speed prediction [benaim2020speednet], frame/clip order prediction [lee2017sort_seq, xu2019vcop], and predicting future frames [diba2019dynamonet], etc. Closely related to our work is contrastive learning based approaches, which were inspired by the instance discrimination task [wu2018ins_dis]. It requires the model to discriminate augmented samples from the same instance from other instances and map different views of the same instance to the same representation. Based on the formulation in [oord2018cpc], [han2019dpc, han2020memdpc] contrast between the representation of the predicted future frames and that of the real ones. Some recent works exploit video pace variation as augmentation and contrast between representations with different paces [wang2020video_peace, chen2020rspnet]. Whether it is in the video paradigm, which is the focus of this paper, or in the image domain, augmentations are all shown to be critical to learning a strong representation. Yet all of them apply random cropping with completely random spatio-temporal location and uniform scale variation parameters along the whole training process. We build our approach for video contrastive learning upon the simplest contrastive framework [chen2020simclr, he2020moco] and show that parameterized cubic cropping controlling the change process is conducive to the improvement of learned representations.
The importance of the data augmentation has already been discovered in the supervised learning settings. The main objective of data augmentation in supervised settings is to enhance the diversity of the training data so that the model can learn generalized representations. The hand-craft data augmentations confuse the network by erasing information[random_erasing, cutout] or mixing difference samples [zhang2017mixup, hendrycks2019augmix]. To reduce the dependence on human expertise, automatic data augmentations are proposed to search the combination of augmentation policies by undifferentiable methods [cubuk2019autoaugment, ho2019pba, lim2019fastaugment] or online learnable strategy [li2020dada]. Although our approach is similar to automatic augmentation, our ParamCrop learn the cropping region that adaptive to the training process, rather than the combination of augmentations. Further, in unsupervised learning, Alex et al. [tamkin2020viewmaker] propose a learnable color transformation improve the robustness of the network. However, this work explore the automatic cropping operation to provide adaptive augmented views for video contrastive learning.
This section introduces the proposed parametric cubic cropping framework, ParamCrop, based on contrastive learning. The objective of ParamCrop is to adaptively control the cropping disparity between two generated views during the contrastive training process. To this end, we propose an differentiable spatio-temporal cropping operation, with the generation of the elements in the affine transformation matrix trainable. This enables the 3D cropping operation to be jointly optimized with the video backbone. Two identical but independent cropping modules are connected respectively to the each of the views. To gradually increase the disparity between views, we initialize the parameters so that two crops share a similar space-time location and train the parameters adversarially along with the video backbone using a gradient reversal operation. The overall framework as well as the detailed workflow is visualized in Figure 2.
3.1 Contrastive Learning
Our ParamCrop framework is built upon recent simplified contrastive learning frameworks [chen2020simclr, he2020moco], where the model is trained to maximize the agreement between two augmented views of the same instance and minimize that from different instances. Suppose there are different samples, we can generate augmented views and the contrastive loss can be written as:
where defines the loss between two paired samples:
is the cosine similarity between the representation of view, and is the temperature parameter. Typically, the two views are generated by the same set of augmentation, usually consisting of random cropping, color jittering, etc. In traditiontal contrastive methods, the augmentation strategy keeps unchanged along the training process. Hence, the view distribution is in fact consistent along the training process.
3.2 Differentiable 3D Affine Cropping
For the proposed ParamCrop to control the cropping disparity during the training process, the cropping operation is firstly required to be trainable. Therefore, we extend the image affine transformations to video 3D affine transformations and combine it with bilinear interpolation for cropping cubes from original videos in a differentiable way.
Cubic cropping with 3D affine transformations. Before introducing the 3D affine transformation, we first define mathematical notations , and , as the size and temporal interval in the original videos and cropped videos , as illustrated in Figure 3. With these notations, a 3-dimensional affine transformation matrix for calculating transformation relationship from the homogeneous coordinate in the cropped video to the original video can be defined as follows:
where indicates the region scale, indicates the spatial rotation angle, indicates the spatial center position offsets, indicates the temporal scale and indicates the temporal center position. We set , as and entangles space-time by changing the cropped location along temporal axis, which is unnecessary considering this essentially mimics camera motion that already exists in the videos. The value for are set to as well, so as to avoid confusion of the space-time boundary, where a frame sampled at time step may contain spatial information from multiple other time steps if and are none zero. Therefore, there are altogether six parameters that can be learned in the affine matrix.
With these parameters, the 3D affine matrix is essentially a coordinate transformation function that maps the coordinate system from the cropped video to the original video with scaling, rotation and translation in the spatial dimensions as well as scaling and translation in the temporal dimension. Given the homogeneous coordinate in the cropped videos , its corresponding coordinate in the original video can be calculated as follows:
where all the coordinates in both cropped and original videos are normalized, i.e., . By this means, we can calculate corresponding sampling coordinate for each position in the cropped video. Because the transformed coordinates are continuous rather than discrete, the pixel value is calculated in the output video by bilinear interpolation. This cropping process with the 3D affine transformation is visualized in Figure 4.
Generating transformation parameters.
As the naive application of this 3D affine transformation matrix leads to the same cropping strategy within a batch, it is required that some level of randomness is introduced for each transformation parameters to ensure the diversity of the cropped data. This is enabled by mapping a random generated vectorinto the aforementioned six 3D affine transformation parameters, by which we can generate a cropped view.
In particular, we employ a multi-layer perceptron to predict the transformation parameters by:
where are parameters of the multi-layer perceptron and
denotes ReLU activation between two linear layers. The output of MLPcorresponds to , which is a vector composed by the six controlling parameters in the 3D affine matrix
. The sigmoid functionis employed to constrain the range of output values to avoid generating meaningless views. Moreover, for and , a near-zero or zero value indicates that an extremely small cube is cropped, which is meaningless as well and degenerate the learned representation. Therefore, we set a limited interval for each transformation parameter in :
where indicates the element-wise multiplication and and represent the minimum and maximum value allowed during training, respectively. , , and . These constraints ensure that the cropped region will fall within the cube of the original video because of the large value of the spatial scale and the temporal scale during training, which avoids exceeding the boundary of the original video and yielding invalid views. The hyper-parameters are given empirically.
Our differentiable 3D affine cropping thus consists of a multi-layer perceptron that generates the transformation parameters and a 3D cubic cropping approach taking these parameters to generate the cropped views. A ParamCrop framework contains two independent affine cropping modules, with one for each view, as in Figure 2.
3.3 Objective, Optimization and Constraints
With the 3D affine transformation based sampling, the cropping operation can now be optimized simultaneously with the video backbone in the contrastive training process. Here we introduce the objective, the optimization approach and some constraints when optimizing for the objective. Recall that the objective of the ParamCrop framework is to adaptively control the cropping strategy. Inspired by curriculum learning, we aim for the differentiable 3D affine transformation to crop two views such that the disparity between two cropped views gradually increases along the training process.
Because the weights of the multi-layer perceptron for generating transformation parameters are randomly initialized, which usually contains small values, it generally maps the random noise vector to values around . This means that the initial cropped cubes largely overlaps and are thus very similar. Therefore, with this initialization condition, to achieve gradual increase in the disparity, we simply set the goal to be in the opposite direction of the video optimization direction, that is to be adversarial to the contrastive loss, i.e., . The rationale behind this training objective is that, two identical views for the same video naturally gives the lowest contrastive loss. Therefore, to gradually generate distinct views, what ParamCrop need to do is to gradually increase the contrastive loss.
For the optimization of this goal, we apply a simple gradient reversal strategy for the multi-layer perceptron during the back propagation. As the contrastive loss is calculated for minimization, this reversal operation in fact forces the cropping module to maximize the contrastive loss, as we have expected.
However, blindly maximizing the contrastive loss without any constraint for the cropping module during the adversarial training may cause the module to rapidly converge into an extreme position (two diagonal regions in the space-time cube) to fulfil the training goal, and keep yielding two in the extreme locations views until the end of the training process. This can deteriorate the resultant representation as the video backbone can not make full use of the complete visual semantics in videos, and simple memorization is probably enough for the video backbone since no diversity exists for the input clip across different epochs. Due to the adversarial training, the final views tend to converge to some extreme regions, which is demonstrated in our experiments as well.
To solve this problem, we propose to apply the early stopping strategy to avoid the extreme solution by:
where is the -th entry of , and and are the greatest upper and lower bounds.
With the early stopping strategy, the video backbone can endow the generated views with more diversities by avoiding the extreme saturation.
We pre-train the models on the training set of Kinetics-400[carreira2017k400] dataset, containing 240k training videos with each lasting about 10 seconds.
Pre-training settings. We adopt S3D-G [xie2018s3dg] and R2D3D [tran2018r2d3d] as our backbone, and employ SimCLR [chen2020simclr] and MoCo[he2020moco] as our contrastive learning frameworks. The 3D affine cropping module takes frames with resolution as inputs, and outputs the augmented views with spatial-temporal size to the video backbone. LARS [you2017lars] is employed as optimizer. The batch size, learning rate and weight decay are set to 1024, 0.3 and 1e-6 respectively. Color jittering and random horizontal flip are employed before our cropping module. We set the minimum scales and to 0.5 and the maximum scales and to 1.0. The bounds for early stopping are set as and . The rotation angle and both set to 0.0. When compared with other methods, the models are pre-trained with 100 epochs for a fair comparison. To reduce the costs of ablation studies, all the models are only pre-trained with 20 epochs.
Evaluations. The evaluations of the trained representaion are performed on two downstream tasks, i.e., action recognition and video retrieval, on two public datasets: (i) UCF101 [soomro2012ucf101] dataset with 13320 videos from 101 action categories; (ii) HMDB51 [jhuang2011hmdb51] dataset contains 6849 videos from 51 action classes.
Fully fine-tuning and Linear fine-tuning settings. The pre-trained models are fine-tuned on both UCF101 and HMDB51 with spatio-temporal size as input. Adam [kingma2014adam] optimizer is employed with batch size and weight decay 1e-3. The learning rate for fully fine-tuning is set to 0.0002, while 0.002 for linear fine-tuning. In the fine-tuning phase, the common data augmentation strategies are adopted, such as color jittering, random cropping and random horizontal flip. We report fully fine-tuning results if not otherwise specified.
4.1 Understanding ParamCrop
We first analyze the training process of the ParamCrop by visualizing the curve of spatio-temporal IoU and 3D center Manhattan distance between two cropped regions along the contrastive training in Figure 5.
At the initialization stage, two cropped cubes share a large portion of common visual contents, as showcased in Figure 5 . Observing along the training process, because the training objective of ParamCrop is to maximize the contrastive loss, the disparity between two cropped views gradually increases, in that the center distances gradually increases and the IoU decreases. Without the early stopping strategy, the maximum distance is quickly reached and two cropped views are distributed in two diagonal locations, as in Figure 5 , before the distance reduces and oscillates around 0.75, as in Figure 5 . This is probably because the learning process without early stopping has a strong momentum but in fact a distance around 0.75 is sufficiently large for it to have sufficiently small IoU to maximize the contrastive loss. However, ParamCrop with early stopping can prevent the extreme locations, which ensures enough shared semactic information between the two views, as in Figure 5 . Compared to random cropping, ParamCrop adapts the visual disparity between views along with the training process, while the difference in random cropping training are statistically consistent. Overall, this is what we have expected for the training process of ParamCrop. As in Table 1, ParamCrop outperforms random crop by 3.9% and 1.6% on HMDB51 and UCF101 respectively.
We further study this improvement by manually designing cropping strategy of various difficulties:
(i) Simple: Similar to () in Figure 5, there are much shared visual content between the two augmented views.
(ii) Hard: Similar to () and () in Figure 5, there are less shared visual contents.
(iii) Manual simulation: A smooth change in the difficulty is designed along the training process as in the trend for to in Figure 5.
(iv) AutoAugment [cubuk2019autoaugment]: An augmentation policy searched by [cubuk2019autoaugment].
It can be observed in Table 1 that neither fixing the disparity to be low or high gives a stronger representation, while if we manually simulate the cropping process as in ParamCrop, we can observe a notable improvement in the performance on both datasets. This demonstrate that the cropping strategy from low disparity to high disparity is conducive to a strong and generalized representation. The underperformance of manual simulation further show that the adaptive process by maximizing contrastive loss is beneficial. We also experiment the augmentation policy searched by AutoAugment [cubuk2019autoaugment], which does not promote performance, especially in HMDB51. Note that previous auto-augmentation methods [cubuk2019autoaugment, ho2019pba, lim2019fastaugment] are devoted to seeking a better augmentation combination among a large pool of candidates. Even our ParamCrop can be viewed as an auto augmentation technique, the motivation of ParamCrop is to design a auto cropping strategy from easy to hard in the training process.
4.2 Ablation Studies
Baseline comparisons. We first evaluate the proposed ParamCrop by comparing it with the baseline, as in Table 13. The baseline of ParamCrop is defined as a random cropping operation in replacement with the differentiable 3D affine cropping. By simply switching from random cropping operation to the proposed learnable cropping operation, improvements of 2% and 1.6% are observed in the fully finetune settings on respectively HMDB51 and UCF101, as well as 3.7% and 0.6% in the linear finetune settings on respective datasets. This has indicated not only a more generalized representation learned by ParamCrop compared to random cropping, it also shows that our learned weights serve as a good initialization for finetuning on downstream action recognition tasks. Note that the temporal cropping in only-ParamCrop settings is limited to crop from a -frames range because of the hardware constraint, which means with a more powerful computation hardware to store a longer frame period, the performance can be further improved. Additionally, we observe a larger improvement over the baseline by incorporating the traditional random cropping strategy to (e.g. perform random cropping before ParamCrop.). We believe this improvement benefits by more randomness provided by random cropping. And thus we use this combination for further experiments.
Effect of enabling spatial rotation. Spatial rotation is an important part of affine transformation. However, as shown in Table 13, introducing spatial rotation to ParamCrop in fact only has adverse effect on the representation. This is in line with previous research findings [chen2020simclr]. Hence we set the rotation angle and both to 0.0 in our other experiments.
|ParamCrop (Ours)||✗||56.0 (+0.0)||84.3 (-1.0)|
|✓||59.9 (+3.9)||86.9 (+1.6)|
Gradient reversal. Next we investigate the necessity of reversing the gradient for the cropping module. The result is listed in Table 3. The removal of gradient reversal aligns the training objective of cropping and representation learning, which means the cropping module now looks for views to maximize the shared visual content. Since we perform random spatio-temporal transformations before the cropping module, the performance without gradient reversal degenerates to random crop, and even lower since some random cropped spatio-temporal cubes may share visual content and maximizing agreement between cropped views encourages the model to find shortcuts.
Early stopping. Qualitatively, it is observed in Figure 5 (--) that early stopping promotes the diversity of the selected views, in that it avoids extreme locations (compared to no early stopping in Figure 5 (--)) and thus a wider range of cropping options are available. Quantitatively, the results are listed in Table 4. Although early stopping has less effect on the fully fine-tune performance, it notably improves the linear separability of the learned representation. This indicates that early stopping is a necessary strategy for learning a generalized representation.
Different frameworks and backbones. To evaluate the generalization ability of the proposed approach, ParamCrop is integrated to two mainstream contrastive learning frameworks SimCLR [chen2020simclr] and MoCo [he2020moco] and two common video backbones S3D-G [xie2018s3dg] and R-2D3D [tran2018r2d3d]. The results shown in Table 5 demonstrate that the benefit by introducing ParamCrop can be generalized to multiple contrastive frameworks and video backbones, and improvements as high as 3.9% and 2.2% are achieved on HMDB51 and UCF101 respectively.
|Backbone||ParamCrop||10% Label||50% Label|
Parameter size and computation cost of ParamCrop. The additional parameters and calculational overhead brought by ParamCrop are shown in Table 7. The ParamCrop only contains a MLP, which can be negligible for S3D-G both parameters and computations. Notably, the ablations for the layers of MLP show that a two-layer MLP achieve best performance compared with other settings. Since the one-layer MLP can result in poor nonlinear ability and the MLP with more layers may involve optimization difficulties.
ParamCrop with deeper networks. We explore the impact of backbones with different depths in Table 8. This is because the deeper networks may cause gradient disappearance or explosion, which can hinder the optimization of ParamCrop. However, it can be observed that ParamCrop is still effective even when the depth of backbone grows from 10 to 50. Combined with Table 5, our ParamCrop can be applied in any backbone and contrastive learning framework.
Sensitivity test. To study how the lower and upper bounds in Equation 7, e.g. and , affect the performance of ParamCrop, sensitivity tests are conducted for both HMDB51 and UCF101. The results are shown in Figure 6. We have the following observations:(1) When equals 0.0, it is equivalent to no Early Stopping, thus the performances of linear fine-tuning are unsatisfactory. (2) With , it may lead to inconsequential drop from the highest performance on fully fine-tuning. However, the performances of linear classification are boosted on both datasets. (3) When grows continuously to 0.4, the fully fine-tuning performance is decrease but the linear fine-tuning has a slight improvement, which shows a trade-off between them. Such results inspire us the better performance for initialize backbone does not always leads a better feature for linear classification. (4) If reaches 0.5, the performances for both fully fine-tuning and linear fine-tuning degrade dramatically, which is caused by detachment of the gradient, and the ParamCrop can not be optimized, rather than the sensitivity to .
4.3 Application on Semi-supervised method
We further evaluate the generalization ability of ParamCrop to semi-supervised learning paradigm, by applying the proposed parametric cubic cropping and the adversarial training to the classic semi-supervised framework MeanTeacher[tarvainen2017mean_teacher], as its framework is similar to MoCo [he2020moco], where two different views are required to be generated by data augmentation. We simply plug ParamCrop into MeanTeacher sequentially after random augmentations. Results in Table 6 show consistent improvements of ParamCrop over the baseline in both 10% and 50% label settings.
4.4 Comparison with the State-of-the-art
|MemDPC n.l. [han2020memdpc]||R-2D3D||K400||33.6||58.5|
Comparison with state-of-the-art methods in linear classification on HMDB51 and UCF101. ‘n.l.’ refers to a nonlinear classifier.
Action Recognition. We compare ParamCrop with state-of-the-art methods under full fine-tune setting on HMDB51 and UCF101, and the results are shown in Table 9. In these experiments, we choose SimCLR [chen2020simclr] as the base contrastive learning framework. From these results, we can draw three following conclusions: (i) ParamCrop outperforms current state-of-the-art methods on the two dataset. Especially, we surpasses SpeedNet [benaim2020speednet] by and on the two dataset respectively, when applying same dataset with backbone, i.e., Kinetics 400 and S3D-G; (ii) ParamCrop can be trained on less data but achieve remarkable performance. DynamoNet [diba2019dynamonet] is trained with 8M videos on Youtube8M dataset, while our method just use 240K videos but still obtain and gains; (iii) ParamCrop further closes the gap between the fully supervised pre-trained model on Kinetics400 and the models trained without manual annotations. Table 10 compares the linear classification performance in HMDB51 and UCF101, which evaluates the linear separability of the representations trained with self-supervised learning and can serve as a good indicator of the representation quality. Compared with MemDPC [han2020memdpc], the proposed ParamCrop gains and with R-2D3D as backbone on HMDB51 and UCF101 respectively, demonstrating the superiority of the extracted feature by models pretrained with ParamCrop.
Video Retrieval. In the video retrieval task, we mainly follow the settings in previous works [xu2019vcop, luo2020vcp, han2020memdpc]. The models pre-trained by ParamCrop on Kinetics400 based on SimCLR framework are directly employed as feature extractors without fine-tuning. Each video in the dataset is divided uniformly along the temporal dimension into 10 clips and a video-level feature is obtained by averaging the features for the 10 clips. Each video in the testing set is used to query -nearest videos in the training set, and a retrieval is considered successful if the retrieved video share the same label with the test video. Recall rate at top
is the evaluation metric. We conduct experiments on both HMDB51 and UCF101 dataset, and compare with state-of-the-art approaches in Table11 and Table 12 respectively. Results show that ParamCrop exceeds the state-of-the-art MemDPC [han2020memdpc] by and with the same backbone on HMDB51 and UCF101 respectively, which indicates that our learnt representation is more generalized.
In this work, we motivate ourself by challenging the traditional random cropping strategy in its consistent difference between two cropped views along the training process. We propose an parametric cubic cropping for adaptively controlling the disparity between two cropped views along the training process. Specifically, we enable online training by first extending affine transformation matrix to the 3D affine transformation and learn to regress the transformation paramters such that the cropping operation is fully differentiable. For the optimization, the parametric cubic cropping operation is trained with an adversarial objective to the video backbone, and optimized using a simple gradient reversal operation. We additionally show that an early stopping strategy in the optimization process is beneficial for the video backbone to learn better representations. Empirical results demonstrate that the adaptively controlled disparity between views is indeed effective for improving the representation quality. Extensive ablation studies validates the effectiveness of each proposed components and state-of-the-art performance is achieved on both action recognition tasks as well as video retrieval on HMDB51 and UCF101.
In this supplemental material, we provide additional details on the (a) temporal sampling strategy, (b) evaluation of ParamCrop on the different training epochs in comparison with random cropping, (c) further decomposition of ParamCrop into spatial and temporal components, (d) few-shot evaluation of the model initialized with ParamCrop pre-training and (e) visualization of the cropping area by different variants of ParamCrop.
Appendix A Temporal Sampling
In our 3D affine cropping, especially in the spatial dimensions, pixel values in the output video are obtained using bilinear interpolation. However, simply performing bilinear interpolation on the temporal axis can cause the merge of two frames, which is physically meaningless. Therefore, we employ a differentiable way to round down the temporal coordinates in the original video corresponding to the pixels in the cropped video :
Appendix B Training Epochs
Here, we provide performance comparisons between ParamCrop and its random crop counterpart with different training periods in Figure 7. Overall, a longer training period gives a better classification accuracy in the downstream tasks. In compairison with random corpping, with the extension of training time, ParamCrop achieves a consistent improvement on both HMDB51 and UCF101.
Appendix C Further Decomposing ParamCrop
We further decompose the ParamCrop into the parametric spatial crop and the parametric temporal crop and evaluate them independently by fixing the other one to sample the whole video. That is, we select the same 16 frames for the parametric spatial crop, and select the whole spatial area for the parametric temporal crop. The results are demonstrated in Table 13. Compared to random cropping, the parametric temporal crop yields a slightly lower performance, while the parametric spatial crop gives a notable improvement. In terms of linear finetune, both only-spatial and only-temporal ParamCrop underperform the random cropping one. However, the combination of temporal and spatial ParamCrop notably boost the performance in the linear finetune, and the representation thus achieves a better linear separability compared to the random cropping baseline, which means that the parametric cubic crop helps the network to learn a more generalized representation.
Appendix D Few-shot Finetuning
We evaluate the pre-trained models by applying less labeled videos in the fine-tune stage on HMDB51 and UCF101. In particular, we randomly select , , and labeled videos from each category in training set. Then the selected videos are used for fully finetuning, after which we calculate the performance on the whole validation set, as shown in Table 14. Results show a steady improvement in the performance in all label settings, which demonstrate that the pretrained models by ParamCrop are not sensitive to the data used by downstream tasks.
Appendix E Visualization
To better comprehend what views are generated by ParamCrop, we first visualize the cropped area of ParamCrop along the training process of 20 epochs in Figure 8, namely (a) in the initialization stage, (b) trained 10 epochs, and (c) trained 20 epochs. In the initialization stage, two views are initialized to share most visual contents. With the process of training ParamCrop, two views gradually become more distinct. But with the early stopping strategy, even at the end of the training process, there still exists shared content between two views, which is shown to be beneficial to the final representation. This process is also demonstrated quantitatively in Figure 5 in the manuscript.
Futher, we visualize four cases comparing random cropping and different variants of ParamCrop in Figure 9 and Figure 10, i.e., (a) random crop, (b) ParamCrop without gradient reversal, (c) ParamCrop without early stopping, and (d) ParamCrop. Figures show that: (a)
Random crop generates views that are uniform distributed in the spatial and temporal dimension, and the visual content in both cropped views are shared to a large extent.(b) ParamCrop Without gradient reversal always outputs all spatial contents for two views that are uniformly distributed on the temporal axis, as this variant aims to minimize contrastive loss by preserving more visual cues shared by two augmented views. (c) ParamCrop Without early stopping convergences to extreme regions and generates completely different views. Although this strategy can learn a good initialization for backbone, it will hurt the performance of linear finetune. (d) The two cropped views generated by ParamCrop are different, but the ratio of the shared content between two views is relatively increased compared to no early stopping and decreased compared to no gradient reversal and random cropping.