Skip to content
ModelListedExternal
Download

TimesFormer Baseline

This model is a fine-tuned version of TimeSformer (Time-Space Transformer) for video action recognition, trained on the UCF101 dataset.

KindOtherVersionRevision 603747eBgrade

Model source

Kind
Other
File size
464 MB
Version
vRevision 603747e
Updated
Oct 24, 2026
Downloads
9
Source
Hugging Face

Source description

🎬 TimeSformer Fine-Tuned for Video Action Recognition

This model is a fine-tuned version of TimeSformer (Time-Space Transformer) for video action recognition, trained on the UCF101 dataset.


📌 Model Overview

  • Base Model: facebook/timesformer-base-finetuned-k400
  • Task: Video Classification / Action Recognition
  • Dataset: UCF101 (101 action classes)
  • Framework: PyTorch + Hugging Face Transformers
  • Training Environment: Kaggle (GPU)

🧠 Training Strategy

Due to Kaggle’s 12-hour session limit, training was performed in multiple stages:

  1. Initial training run
  2. Checkpoint saving (best model)
  3. Resume training from best checkpoint
  4. Further fine-tuning across sessions

This approach ensures efficient long training without losing progress.


📊 Training Results

🔹 Initial Training

EpochTrain LossTrain AccVal LossVal Acc
14.50660.06224.10890.4245
23.57210.47112.52760.8007
32.32390.73231.43210.8993

🔹 Continued Training (Checkpoint Resume)

EpochTrain LossTrain AccVal LossVal Acc
41.82890.79911.18020.9199
51.71190.80941.13720.9128
61.63650.81531.10850.9191
71.59820.81391.08680.9218
81.50530.81941.07630.9262
91.46730.82011.08240.9225

🏆 Best Performance

  • Best Validation Accuracy: 92.62%
  • F1 Score: 0.9244
  • Precision: 0.9315
  • Recall: 0.9262
  • Achieved at Epoch 8

📈 Additional Metrics

MetricValue
Precision0.9315
Recall0.9262
F1 Score0.9244

⚙️ Training Details

  • Mixed Precision Training (torch.cuda.amp)
  • GPU Memory Usage: ~9.3–9.8 GB
  • Training Time per Epoch: ~2.5 hours
  • Evaluation Time per Epoch: ~20 minutes
  • Best model checkpoint saved automatically

🚀 Usage

Install Dependencies

pip install torch torchvision transformers

Sources

1 source
Hugging FacePrimaryVersion 603747e53ede5714b45cc3f61568fdf5789808d4
huggingface.co/sumit7488/TimesFormer_Baseline/tree/603747e53ede5714b45cc3f61568fdf5789808d4

Verified Oct 24

Model artifacts

1 artifact

model.safetensors

safetensors · 464 MB · SHA-256 fb1375856969…2b06 · Hugging Face

Download file

Source excerpts

3 excerpts

--- license: mit tags: - video-classification - timesformer - action-recognition - ucf101 - pytorch datasets: - ucf101 --- # 🎬 TimeSformer Fine-Tuned for Video Action Recognition This model is a fine-tuned version of **TimeSformer (Time-Space Transformer)** for **video action recognition**, trained on the **UCF101 dataset**. --- ## 📌 Model Overview - **Base Model:** facebook/timesformer-base-finetuned-k400 - **Task:** Video Classification / Action Recognition - **Dataset:** UCF101 (101 action classes) - **Framework:** PyTorch + Hugging Face Transformers - **Training Environment:** Kaggle (GPU) --- ## 🧠 Training Strategy Due to Kaggle’s **12-hour session limit**, training was performed in **multiple stages**: 1. Initial training run 2. Checkpoint saving (best model) 3. Resume training from best checkpoint 4. Further fine-tuning across sessions This approach ensures efficient long training without losing progress. --- ## 📊 Training Results ### 🔹 Initial Training | Epoch | Train Loss | Train Acc | Val Loss | Val Acc | |------|------------|-----------|----------|---------| | 1 | 4.5066 | 0.0622 | 4.1089 | 0.4245 | | 2 | 3.5721 | 0.4711 | 2.5276 | 0.8007 | | 3 | 2.3239 | 0.7323 | 1.4321 | 0.8993 | --- ### 🔹 Continued Training (Checkpoint Resume) | Epoch | Train Loss | Train Acc | Val Loss | Val Acc | |------|------------|-----------|----------|---------| | 4 | 1.8289 | 0.7991 | 1.1802 | 0.9199 | | 5 | 1.7119 | 0.8094 | 1.1372 | 0.9128 | | 6 | 1.6365 | 0.8153 | 1.1085 | 0.9191 | | 7 | 1.5982 | 0.8139 | 1.0868 | 0.9218 | | 8 | 1.5053 | 0.8194 | 1.0763 | **0.9262** | | 9 | 1.4673 | 0.8201 | 1.0824 | 0.9225 | --- ## 🏆 Best Performance - **Best Validation Accuracy:** **92.62%** - **F1 Score:** 0.9244 - **Precision:** 0.9315 - **Recall:** 0.9262 - Achieved at **Epoch 8** --- ## 📈 Additional Metrics | Metric | Value | |-------|------| | Precision | 0.9315 | | Recall | 0.9262 | | F1 Score | 0.9244 | --- ## ⚙️ Training Details - Mixed Precision Training (`torch.cuda.amp`) - GPU Memory Usage: ~9.3–9.8 GB - Training Time per Epoch: ~2.5 hours - Evaluation Time per Epoch: ~20 minutes - Best model checkpoint saved automatically --- ## 🚀 Usage ### Install Dependencies ```bash pip install torch torchvision transformers

Source context: 9 downloads · 0 likes · Pipeline video-classification · Repo sumit7488/TimesFormer_Baseline

Source context: 3 downloads · 0 likes · Pipeline video-classification · Repo sumit7488/TimesFormer_Baseline