Contrastive learning-based video quality assessment-jointed video vision transformer for video recognition
Authors: Jian Sun, Mohammad H. Mahoor
Organizations: Department Of Computer Science, University of Denver, 2155 E Wesley Ave, Denver, 80210, CO, United States of America. · Department Of Electrical and Computer Engineering, University of Denver, 2155 E Wesley Ave, Denver, 80210, CO, United States of America.
Video quality significantly affects video classification. We found this problem when we classified Mild Cognitive Impairment well from clear videos, but worse from blurred ones. From then, we realized that referring to Video Quality Assessment (VQA) may improve video classification. This paper proposed Self-Supervised Learning-based Video Vision Transformer combined with No-reference VQA for video classification (SSL-V3) to fulfill the goal. SSL-V3 leverages Combined-SSL mechanism to join VQA into video classification and address the label shortage of VQA, which commonly occurs in video datasets, making it impossible to provide an accurate Video Quality Score. In brief, Combined-SSL takes video quality score as a factor to directly tune the feature map of the video classification. Then, the score, as an intersected point, links VQA and classification, using the supervised classification task to tune the parameters of VQA. SSL-V3 achieved robust experimental results on two datasets. For example, it reached an accuracy of 94.87% on some interview videos in the I-CONECT (a facial video-involved healthcare dataset), verifying SSL-V3's effectiveness.
Figures & tables
Figure 1: The structure of the new proposed SSL-V3. In the upper branch, ViViT(FE) loads X1 and extracts Spatio-Temporal features fS1 . The VQA head and classification (CLS) head then process fS1 to compute VQS1 and CLS1 , respectively - output features from each head. VQA head contains Sequence Score Regressor and Video Score Regressor, while CLS head is Multi-branch Classifier. The Tune-CLS module updates CLS1 using VQS1 to produce the prediction score Y^1 . Simultaneously, the lower branch follows the same procedure to generate fS2 , VQS2 , CLS2 , and Y^2 .
Figure 2: The structure of Sequence Score Regressor. It has two channels. The first one, Sequence Feature Processor, is to drop the zcls1 and reshape fS1 from [bs, nt , d] to [bs, nt , d, 1]. The other one, Sequence Weight Estimate Network, is to generate weights, w~f for corresponding fS1 . Finally, it conducts weighted sum operation to get SQS1 . Ci,j is the jth cube from the ith sequence in a certain clip.
Figure 3: The structure of VSR. It has three channels. The central one is the SQS1 , denoted by s2 . The upper one does 1-D convolutional operation on SQS1 and captures the temporal motion effect, mj , of the SQS1,j . Then, we deploy the Softmax operation to normalize the weight vector m and output m^ . Multiplying SQS1 and m^ returns the temporal motion effect score s1 . Following the same pattern, we get the normalized temporal hysteresis effect h^ and the temporal hysteresis effect score s3 . Finally, the Temporal Memory-Based Fusion Module generates VQS1 by concatenating s1 , s2 , and s3 and loading them into a two-layers FC module.
Crafts Hobbies
Day Time TV Shows
Movie Genres
School Subjects
Subject Number
32
41
35
39
Male/Female
11/21
11/30
10/25
11/28
MCI/NC
20/12
20/21
21/14
22/17
Frame Number
691872
859872
770656
797968
Table 1: The details of researched themes. Subject Number is the total number of videos in the corresponding theme. Male/Female and MCI/NC show the gender distribution and category distribution. Frame Number is the total image number of each theme after converting videos into frames.
Figure 4: Two sample frames from the I-CONECT dataset. In (a), the window of the interviewee is bigger than that of the interviewer because the interviewer was speaking. Conversely, in (b), the interviewer was talking so that her window was bigger than the interviewee’s.
Figure 5: More subjects from Hockey Fight Detection dataset. The upper line represents high-quality frames. The bottom line stands for poor-quality frames.
Figure 6: Two samples from HF dataset. (a) is the scenario of fighting action. (b) presents the normal non-fight situation.
Test Theme
Crafts Hobbies
Day Time TV Shows
Movie Genres
School Subjects
Fold Num
11
14
11
13
Accuracy
30/32
37/41
31/35
37/39
93.75%
90.24%
88.57%
94.87%
F1
95.00%
90.00%
91.30%
95.65%
AUC
93.33%
90.24%
88.90%
94.12%
MCI/NC
20/12
20/21
21/14
22/17
Table 2: The prediction accuracy of detecting MCI on 4 themes using K-fold evaluation.
Data Modality
Accuracy
F1
Chen et al. Chen et al. (2020a)
Text
79.15%
-
Liu et al. Liu et al. (2022)
Text, MRI
87.00%
89.00%
Alsuhaibani et al. Alsuhaibani et al. (2024)
Video
87.50%
89.00%
MC-ViViT ( Sun et al., 2023a )
Video
90.63%
93.03%
SSL-V3 (No VQA)
Video
87.80%
86.49%
SSL-V3 (VQA)
Video
94.87%
95.65%
Table 3: Compare the performance of SSL-V3 with other models on the I-CONECT dataset. No VQA means to classify the videos without referring to the video quality, while VQA represents using VQA to classify videos.
Accuracy
F1
AUC
Sensitivity
Specificity
98.6 ± 0.8%
98.59 ± 0.81%
98.6 ± 0.8%
98.0 ± 1.26%
99.2 ± 0.99%
Table 4: The prediction accuracy of detecting violence on HF dataset. The report format is mean ± STD%
Accuracy
F1
CNN+SVM ( Eitta et al., 2021 )
93.7%
-
2D CNN ( Serrano et al., 2018 )
94.60 ± 0.6%
-
MobileNet ( Irfanullah et al., 2022 )
96.66%
-
C3D+SVM ( Sernani et al., 2021 )
97.86%
97.87%
Computationally Intelligent VD ( Ullah et al., 2022 )
98%
98.10%
Spatial Encoder ( Hanson et al., 2018 )
98.1 ± 0.58%
-
Table 5: Compare the performance of other models with SSL-V3 on the HF dataset.
SSR
VSR
Crafts Hobbies
Day Time TV Shows
Movie Genres
School Subjects
Hockey Fight
✗
✗
84.38%
87.80%
80.00%
82.05%
(95 ± 1.41)%
✓
87.50%
78.05%
88.57%
84.62%
(95.6 ± 1.36)%
✓
87.50%
87.80%
82.86%
76.92%
(95.6 ± 2.5)%
✓
✓
93.75%
90.24%
88.57%
94.87%
(98.6 ± 0.8)%
Table 6: The prediction accuracy on 4 I-CONECT themes and HF dataset with different regressors. SSR and VSR denotes Sequence Score Regressor and Video Score Regressor respectively.
Figure 7: The prediction accuracy on 4 themes (I-CONECT dataset) with different regressors.
FL
CL Loss
BCE Loss
Crafts Hobbies
Day Time TV Shows
Movie Genres
School Subjects
Hockey Fight
✓
81.25%
65.85%
54.29%
51.28%
(92.8 ± 1.6)%
✓
✓
84.38%
85.37%
71.43%
79.49%
(94.4 ± 1.96)%
✓
✓
81.25%
68.29%
71.43%
69.23%
(94.2 ± 1.47)%
✓
✓
✓
93.75%
90.24%
8 8.57%
94.87%
(98.6 ± 0.8)%
Table 7: The prediction accuracy on 4 I-CONECT themes and HF dataset with different loss functions. CL means Contrastive Learning.
Figure 8: The prediction accuracy on 4 themes (I-CONECT dataset) with different loss functions. CL means Contrastive Learning.
Figure 9: The extracted spatio-temporal feature maps on 16 consecutive frames from two datasets. SSL-V3 focuses more on the bright areas and less on the dark ones. Given that there are nt tubelets, where nt = tT = 416 = 4 , there are four feature maps. To simplify the visualization, we pick the first frame of each tubelet to represent it. Fig. 9a is from the I-CONECT dataset, while Fig. 9b is from HF one.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Test Themes
Crafts Hobbies
Day Time TV Shows
FL
FL + BCE
FL + CL
FL
FL + BCE
FL + CL
Accuracy
26/32
26/32
27/32
27/41
28/41
28/41
81.25%
81.25%
84.38%
65.85%
68.29%
85.37%
F1
82.35%
84.21%
85.71%
50.00%
68.29%
85.00%
AUC
85.00%
81.67%
87.50%
65.12%
68.33%
85.36%
MCI/NC
20/12
20/21
Appendix
Table 8: Specific results on 4 themes with different loss functions. CL means Contrastive Learning.
Test Themes
Crafts Hobbies
Day Time TV Shows
No VQA
VSR
SSR
No VQA
VSR
SSR
Accuracy
27/32
28/32
28/32
36/41
36/41
32/41
84.38%
87.50%
87.50%
87.80%
87.80%
78.05%
F1
87.18%
90.00%
90.00%
86.49%
87.18%
78.05%
AUC
86.67%
86.67%
86.67%
87.62%
87.74%
78.10%
MCI/NC
20/12
20/21
Appendix
Table 9: Specific results on 4 themes with different regression head.
Test Themes
Study Loss Function
FL
FL + CL
FL + BCE
Accuracy
(92.80 ± 1.60)%
(94.40 ± 1.96)%
(94.20 ± 1.47)%
F1
(92.92 ± 1.74)%
(94.38 ± 1.96)%
(94.19 ± 1.47)%
AUC
(92.80 ± 1.60)%
(94.40 ± 1.96)%
(94.20 ± 1.47)%
Sensitivity/
(90.80 ± 3.71)%/
(94.00 ± 4)%/
(94.00 ± 2.53)% /
Specificity
(94.80 ± 2.04)%
(94.80 ± 4.31)%
(94.40 ± 2.93)%
Appendix
Table 10: Specific results on HF dataset with different loss functions and regressors. CL means Contrastive Learning.