Video-Based Sexual Harassment Detection Using Fine-Tuned Video Transformers
Organizations: Department of CSE, Manarat International University, Dhaka, Bangladesh · Department of Computer Science, Florida Polytechnic University, Lakeland, Florida, USA
Abstract
Sexual harassment represents a pervasive societal challenge, with a substantial proportion of incidents remaining unreported due to insufficient evidence and delayed intervention mechanisms. Smart surveillance systems capable of detecting such incidents in real-time could assist law enforcement and serve as a deterrent. However, video-based harassment detection poses significant challenges, including variations in clothing, illumina- tion, partial occlusions, low resolution, and diverse camera view- points. Despite its social importance, this problem has received limited research attention, primarily due to the scarcity of large- scale annotated video datasets. To address this gap, we extend the Sexual Harassment Video (SHV) dataset to 600 short video clips sourced from YouTube and annotated into harassment and non-harassment categories using consistent labeling guidelines. We fine-tune three state-of-the-art video transformer models, VideoMAE, ViViT, and TimeSformer, pretrained on Kinetics- 400, for binary harassment classification. Experimental results show that all three models achieve competitive classification performance, with TimeSformer attaining the highest test accu- racy of 92.27%, outperforming VideoMAE 91.71% and ViViT 91.16% on the extended SHV test set. Our analysis reveals that performance is notably influenced by dataset size, video quality, frame sampling strategy, and model architecture. This work presents a comprehensive evaluation of modern video transformers for this sensitive real-world task.
Figures & tables
| Description | Details |
|---|---|
| Total Classes | 2 |
| Total Videos | 600 |
| Harassment Videos | 282 |
| Non-Harassment Videos | 318 |
| Training Set (Harassment) | 197 |
| Training Set (Non-Harassment) | 222 |
| Configuration | VideoMAE | ViViT | TimeSformer |
|---|---|---|---|
| Pretrained Checkpoint | MCG-NJU/videomae-base-finetuned-kinetics | google/vivit-b-16x2-kinetics400 | facebook/timesformer-base-finetuned-k400 |
| Image Size | 224 | 224 | 224 |
| Num. Frames | 16 | 32 | 8 |
| Patch Size | 16 | 16 2 | 16 |
| Hidden Size | 768 | 768 | 768 |
| Num. Attention Heads | 12 | 12 | 12 |
| Model | Class | Test Loss | TP | FP | FN | TN | Precision | Recall | F1-Score | Macro F1 |
| VideoMAE | Harassment | 0.2601 | 88 | 8 | 7 | 78 | 0.907 | 0.918 | 0.912 | 0.917 |
| Non-Harassment | 78 | 7 | 8 | 88 | 0.926 | 0.917 | 0.921 | |||
| ViViT | Harassment | 0.2474 | 93 | 3 | 13 | 72 | 0.960 | 0.847 | 0.900 | 0.910 |
| Non-Harassment | 72 | 13 | 3 | 93 | 0.877 | 0.969 | 0.921 | |||
| TimeSformer | Harassment | 0.2079 | 94 | 2 | 12 | 73 | 0.973 | 0.859 | 0.912 | 0.922 |
| Non-Harassment | 73 | 12 | 2 | 94 | 0.887 | 0.979 | 0.931 |
| Hyperparameter | Value |
|---|---|
| Batch Size | 2 |
| Max Epochs | 20 |
| Initial Learning Rate | |
| Weight Decay | |
| Optimizer | AdamW |
| Loss Function | Cross-Entropy Loss |
| Model | Accuracy (%) |
|---|---|
| VideoMAE | 91.71 |
| ViViT | 91.16 |
| TimeSformer | 92.27 |
| CNN-LSTM [ 1 ] | 70 |
Video Content Moderation
Video content moderation detects and explains harmful, misleading, or policy-violating material in videos, including its visual, audio, and temporal context.
See all 23 papers